mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Further improvements to rendering subsystem
This commit is contained in:
parent
83f8864f0a
commit
cd6a40d816
17 changed files with 475 additions and 336 deletions
28
render/gles3/shaders.c
Normal file
28
render/gles3/shaders.c
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include "render/gles3.h"
|
||||
#include <GLES3/gl3.h>
|
||||
|
||||
const GLchar vertex_src[] =
|
||||
"uniform mat4 proj;\n"
|
||||
"attribute vec2 pos;\n"
|
||||
"attribute vec2 texcoord;\n"
|
||||
"varying vec2 v_texcoord;\n"
|
||||
"void main() {\n"
|
||||
" gl_Position = proj * vec4(pos, 0.0, 1.0);\n"
|
||||
" v_texcoord = texcoord;\n"
|
||||
"}\n";
|
||||
|
||||
const GLchar fragment_src_RGB[] =
|
||||
"precision mediump float;\n"
|
||||
"varying vec2 v_texcoord;\n"
|
||||
"uniform sampler2D tex;\n"
|
||||
"void main() {\n"
|
||||
" gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb, 1.0);\n"
|
||||
"}\n";
|
||||
|
||||
const GLchar fragment_src_RGBA[] =
|
||||
"precision mediump float;\n"
|
||||
"varying vec2 v_texcoord;\n"
|
||||
"uniform sampler2D tex;\n"
|
||||
"void main() {\n"
|
||||
" gl_FragColor = texture2D(tex, v_texcoord);\n"
|
||||
"}\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue