mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-30 03:38:55 -05:00
OpenGL modernization: make shaders code compatible with OpenGL ES 2.0
This commit is contained in:
parent
dcbd61904c
commit
f4f8c3d2f5
@ -103,8 +103,8 @@ void GLShaderSimple::cleanup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QString GLShaderSimple::m_vertexShaderSourceSimple = QString(
|
const QString GLShaderSimple::m_vertexShaderSourceSimple = QString(
|
||||||
"uniform mat4 uMatrix;\n"
|
"uniform highp mat4 uMatrix;\n"
|
||||||
"attribute vec4 vertex;\n"
|
"attribute highp vec4 vertex;\n"
|
||||||
"void main() {\n"
|
"void main() {\n"
|
||||||
" gl_Position = uMatrix * vertex;\n"
|
" gl_Position = uMatrix * vertex;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
@ -125,10 +125,10 @@ void GLShaderTextured::cleanup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QString GLShaderTextured::m_vertexShaderSourceTextured = QString(
|
const QString GLShaderTextured::m_vertexShaderSourceTextured = QString(
|
||||||
"uniform mat4 uMatrix;\n"
|
"uniform highp mat4 uMatrix;\n"
|
||||||
"attribute vec4 vertex;\n"
|
"attribute highp vec4 vertex;\n"
|
||||||
"attribute vec2 texCoord;\n"
|
"attribute highp vec2 texCoord;\n"
|
||||||
"varying vec2 texCoordVar;\n"
|
"varying mediump vec2 texCoordVar;\n"
|
||||||
"void main() {\n"
|
"void main() {\n"
|
||||||
" gl_Position = uMatrix * vertex;\n"
|
" gl_Position = uMatrix * vertex;\n"
|
||||||
" texCoordVar = texCoord;\n"
|
" texCoordVar = texCoord;\n"
|
||||||
@ -136,8 +136,8 @@ const QString GLShaderTextured::m_vertexShaderSourceTextured = QString(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const QString GLShaderTextured::m_fragmentShaderSourceTextured = QString(
|
const QString GLShaderTextured::m_fragmentShaderSourceTextured = QString(
|
||||||
"uniform sampler2D uTexture;\n"
|
"uniform lowp sampler2D uTexture;\n"
|
||||||
"varying vec2 texCoordVar;\n"
|
"varying mediump vec2 texCoordVar;\n"
|
||||||
"void main() {\n"
|
"void main() {\n"
|
||||||
" gl_FragColor = texture2D(uTexture, texCoordVar);\n"
|
" gl_FragColor = texture2D(uTexture, texCoordVar);\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user