Texturing points in opengl
Two questions actually:
1)
For some texture, I want to sample the color of the texture at a specific texture coordinate. I tried using feedback mode by rendering the point with tex coords using the feedback type, GL_3D_COLOR_TEXTURE. The four return values of the color components are all 1.0. I''m assuming all that tells me is that it''s completely lit. I was hoping the texture component would give me the colors, all I got were some funky numbers. The red and blue books both seem to imply that the returned values are texture coordinates. Is there a better way to do this????
2)
Another thing...I tried rendering GL_POINTS with tex coords. But no matter where the texture coordinates were located on the texture, the colors rendered was nothing but the whole texture averaged out. For example, my texture was a simply a gradient from red to blue. However, the points I rendered were all purple (rgb is somewhere around 255, 0, 255). I used GL_NEAREST for filtering...
Help?
1/ use glGetTexImage( ... ) to get the RGB/RGBA texture data
2/ points cannot be textured use a billboarded quad instead
http://members.xoom.com/myBollux
2/ points cannot be textured use a billboarded quad instead
http://members.xoom.com/myBollux
thanks for the reply zed...actually, you might have misinterpreted my question. You CAN texture a point...that''ll give you the texture color at the point''s texture coordinate. That''s how I wanted to sample the texture''s color (via feedback mode) and completely avoid having to keep an accessible copy of the texture data. I figured out what was wrong, so thanks again!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement