Advertisement

Return RGB value up to 127 as byte

Started by March 09, 2002 04:54 AM
5 comments, last by Waldoo 22 years, 11 months ago
I am only able to get up to 127 return RGB value from glReadPixel. Do you know whats wrong with it? Waldoo
Make sure you''re using unsigned bytes to read the values into.

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
Advertisement
How do you do that in Visual Basic?

Waldoo
I have absolutely no idea, I use only C/C++/C#

-----------------------
"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else''s drivers, I assume it is their fault" - John Carmack
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
use GL_UNSIGNED_BYTE instead of GL_BYTE
I have trouble trying to get unsigned byte from glReadPixel RGB return value because VB only give me limited options which is pxlBitmap, pxlByte, pxlFlost, pxlLong, and pxlShort. These options was given inside glReadPixel. I only get up to 127 from pxlByte. Is there a way around it?

I am able to declare variable as glubyte it is gl unsigned byte. But the problem is that glReadPixel''s limited output is glbyte and these options.

Waldoo

Advertisement
I think I need to make new data type for it especially for VB with OpenGL

Waldoo

This topic is closed to new replies.

Advertisement