Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

davidko

OpenGL Texturing points in opengl

This topic is 6485 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

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!