• Advertisement
Sign in to follow this  

how to use glSelectBuffer

This topic is 4294 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello guys, i'm tring to render water with reflection, so i need to render the scene on a texture first to do the reflection scene. but the question is how to use glSelectBuffer cause every time i run the program, i got the error of stack overflaw. i think that i must be wrong somewhere. here is the code: GLuint bmp[1024*768*3]; glColor4ub(255,255,255,255); glSelectBuffer(1024*768*3,bmp); glRenderMode(GL_SELECT); btw, how to specify the size of the buffer? cause the glSelectBuffer function does not specify the color format like rgba or rgb. thanks

Share this post


Link to post
Share on other sites
Advertisement
whats the select buffer got to do with tring to render water with reflection??

Share this post


Link to post
Share on other sites
render the current scene in to a texture and project to the water sufface to do the reflection

Share this post


Link to post
Share on other sites
try to use glReadBuffer/glCopyTexture to copy the buffer

Share this post


Link to post
Share on other sites
there seems to be no such function as glCopyTexture?

i find this function on the article about render to texture in a nvidia article but i just can not use it? why

Share this post


Link to post
Share on other sites
glSelectBuffer has nothing to do with RGB/RGBA/bmp. Nothing is actually rendered in Selection Mode. Check the docs.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement