I have noticed that glDisable(GL_RASTERIZER_DISCARD); will not take any effect until I rebind target draw buffer.
The thing is I try to use glEnable(GL_RASTERIZER_DISCARD); in transform feedback code that have to be call every time I render an object
The transform feedback code is for camera-Z calculation for sorting transparent polygon since the same mesh maybe drawn on screen at many different position at the same time , the TF cannot be done as a preprocessing (there only one structure per mesh to store transformed Z for the said mesh).
The problem is after calling glEnable(GL_RASTERIZE_DISCARD) even if I try to turn the discarding off by calling glDisable(GL_RASTERIZE_DISCARD) any thing render after that will not write to target draw buffer unless I rebind the draw buffer first.
1 . bind target draw buffer 2 . call glEnable(GL_RASTERIZE_DISCARD); 3 . do TF (actually even if I didnt do TF the result are the same) 4 . call glDisable(GL_RASTERIZE_DISCARD); 5 . render a BOX
with the code above a box will not get render even after calling glDisable(GL_RASTERIZE_DISCARD); but if I rebind target drawbuffer before render a box , it render fine
Can anyone familiar with this feature give me some info on this ?
Using OpenGL 3.2 core profile on ATI HD4670 with catalyst 10.6.