diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-08-08 19:01:53 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2012-08-08 19:11:42 +0200 |
commit | e1bf9c5c196bff9f134a553dbc6f7a92864109ff (patch) | |
tree | 1bdc9869ff09234ab64e53ea18c4f168618a2929 /src/static_fill.frag | |
parent | c677377e0447efdd0aeb5128ded7c614651951a1 (diff) |
uterm: video: drm: implement .blit, .blend and .fill callbacks
This implements the static 2D blitting callbacks for the DRM backend. It
uses OpenGL to push the images with textures through the rendering
pipeline. Please note that this is horribly slow when used like 2D
blitting. However, it is a safe backend and better than nothing.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src/static_fill.frag')
-rw-r--r-- | src/static_fill.frag | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/static_fill.frag b/src/static_fill.frag new file mode 100644 index 0000000..de1836e --- /dev/null +++ b/src/static_fill.frag @@ -0,0 +1,37 @@ +/* + * kmscon - Fragment Shader + * + * Copyright (c) 2011-2012 David Herrmann <dh.herrmann@googlemail.com> + * Copyright (c) 2011 University of Tuebingen + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Default Fragement Shader + * A basic fragment shader which applies a color directly. + */ + +varying vec4 col; + +void main() +{ + gl_FragColor = col; +} |