Schlogenburg
08-03-2000, 09:48 AM
Can someone tell me the useage of glReadPixels? Here's my simple
requirements:
read from RED(0-255 colors)
read one single pixel
return it to an integer called 'select'
DFrey
08-03-2000, 12:33 PM
Well, it is very simple:
glReadPixels(x,y,1,1,GL_RED,GL_INT,&select);
But also be sure you use glReadBuffer to read from the correct buffer. Also watch out for dithering artifacts if you are using this method to select polys. I think it would be better to use either the selection buffer or your own collision detection for selection code.
Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.