mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
OpenGL display driver
This commit is contained in:
17
AerofoilSDL/ShaderCode/DrawQuadV.cpp
Normal file
17
AerofoilSDL/ShaderCode/DrawQuadV.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#define GP_GL_SHADER_CODE_DRAWQUADV_GLSL "uniform vec4 ndcOriginAndDimensions;\n"\
|
||||
"uniform vec4 surfaceDimensions_TextureRegion;\n"\
|
||||
"attribute vec2 posUV;\n"\
|
||||
"varying vec4 texCoord;\n"\
|
||||
"\n"\
|
||||
"void main()\n"\
|
||||
"{\n"\
|
||||
" vec2 ndcPos = ndcOriginAndDimensions.xy + posUV.xy * ndcOriginAndDimensions.zw;\n"\
|
||||
"\n"\
|
||||
" gl_Position = vec4(ndcPos.x, ndcPos.y, 0.0, 1.0);\n"\
|
||||
" texCoord = vec4(posUV.xyxy * surfaceDimensions_TextureRegion.zwxy);\n"\
|
||||
"}\n"
|
||||
|
||||
namespace GpBinarizedShaders
|
||||
{
|
||||
const char *g_drawQuadV_GL2 = GP_GL_SHADER_CODE_DRAWQUADV_GLSL;
|
||||
}
|
||||
Reference in New Issue
Block a user