Home > other >  The source of data for glDrawTransformFeedbackStream problem
The source of data for glDrawTransformFeedbackStream problem

Time:12-25

OpenGl programming guide inside the source code with a geometry shader renders two examples of tetrahedron, actual through on the left side of the tetrahedron geometry shader output data to the feedback Object point of 0 # binding cache, data input to the feedback will be on the right side of the tetrahedron 1 binding point of the Object in the cache, and then apply colours to a drawing using glDrawTransformFeedbackStream function,
GlPolygonMode (GL_FRONT_AND_BACK GL_FILL);
GlBindVertexArray (vaos [0]);
GlDrawTransformFeedbackStream (GL_TRIANGLES, Tfb, 0);

GlPolygonMode (GL_FRONT_AND_BACK GL_LINE);
GlBindVertexArray (vaos [1]);
GlDrawTransformFeedbackStream (GL_TRIANGLES, Tfb, 1);

And so on the left side of the tetrahedron is filling mode, the right side of the tetrahedron is wireframe mode, but I will exchange glDrawTransformFeedbackStream index parameters, become
GlPolygonMode (GL_FRONT_AND_BACK GL_FILL);
GlBindVertexArray (vaos [0]);
GlDrawTransformFeedbackStream (GL_TRIANGLES, Tfb, 1);

GlPolygonMode (GL_FRONT_AND_BACK GL_LINE);
GlBindVertexArray (vaos [1]);
GlDrawTransformFeedbackStream (GL_TRIANGLES, Tfb, 0);

Should be on the left side of the tetrahedron is wireframe mode, and the right side of the tetrahedron is filling pattern, but is still on the left side of the tetrahedron is filling mode, the right side of the tetrahedron is wireframe mode, namely did not change after the modification of parameters, is this why?
  • Related