Jump to content
  • Advertisement
Sign in to follow this  
L. Spiro

OpenGL Emulating Tex Gen

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

DirectX provides several built-in texture-coordinate-generation methods used for spheric mapping, cube mapping, depth shadows, etc. I would like to generate custom ones of my own. Using DirectX 9.0c, without shaders, is there a way to do this? In OpenGL it is easy because you just set the texture-coordinate pointer to your new generated textures, but DirectX forces its vertices to be packed, so the texture coordinates have to be part of the vertex data sent in DrawPrimitives(). Generating your own texture coordinates would mean modifying the vertex data, which is not always possible and never a good idea. So how can I go about this in DirectX with the fixed-function pipeline? L. Spiro

Share this post


Link to post
Share on other sites
Advertisement
DirectX doesn't force its vertices to be packed. Are you using vertex declarations or FVF? Vertex declarations allow you to split your data into multiple streams, just like OpenGL.

Share this post


Link to post
Share on other sites
I think streams were new for DirectX 8. Cards supporting them would likely be heavily software based (pre hardware T&L, ie: pre-GeForce 256/GeForce 2), or shader based (GeForce3+). In order to use streams on the cards in the middle (hardware T&L w/out shaders) you'll have to ask for software vertex processing.

Share this post


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

  • 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!