Browse Source

Fix compilation of transform feedback test shaders on Mesa.

Apparently they need to write something to gl_Position.
pull/110/head
Vladimír Vondruš 11 years ago
parent
commit
eb00614ece
  1. 3
      src/Magnum/Test/PrimitiveQueryGLTest.cpp
  2. 6
      src/Magnum/Test/TransformFeedbackGLTest.cpp

3
src/Magnum/Test/PrimitiveQueryGLTest.cpp

@ -163,6 +163,9 @@ void PrimitiveQueryGLTest::transformFeedbackPrimitivesWritten() {
"out mediump vec2 outputData;\n"
"void main() {\n"
" outputData = vec2(1.0, -1.0);\n"
/* Mesa drivers complain that vertex shader doesn't write to
gl_Position otherwise */
" gl_Position = vec4(1.0);\n"
"}\n").compile());
#ifndef MAGNUM_TARGET_GLES
attachShader(vert);

6
src/Magnum/Test/TransformFeedbackGLTest.cpp

@ -199,6 +199,9 @@ XfbShader::XfbShader() {
"out mediump vec2 outputData;\n"
"void main() {\n"
" outputData = inputData + vec2(1.0, -1.0);\n"
/* Mesa drivers complain that vertex shader doesn't write to
gl_Position otherwise */
" gl_Position = vec4(1.0);\n"
"}\n").compile());
#ifndef MAGNUM_TARGET_GLES
attachShader(vert);
@ -308,6 +311,9 @@ XfbMultiShader::XfbMultiShader() {
"void main() {\n"
" output1 = inputData + vec2(1.0, -1.0);\n"
" output2 = inputData.x - inputData.y;\n"
/* Mesa drivers complain that vertex shader doesn't write to
gl_Position otherwise */
" gl_Position = vec4(1.0);\n"
"}\n").compile());
#ifndef MAGNUM_TARGET_GLES
attachShader(vert);

Loading…
Cancel
Save