Jump to content
  • Advertisement
Sign in to follow this  
GotenRulezU

Direct3d question.

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

Is it possible to render a texture into space and not on a polygon? AFAIK all of the tutorials out there show how to render textures onto polygons. Is there a reason?

Share this post


Link to post
Share on other sites
Advertisement
Well, what other ways are there to represent a "space"?
Whenever you use textures, you still need to specify some sort of geometrical representation, whether it be a floating cube or a 2D square across the whole screen. In the end polygons are the only thing the graphics card will understand.

Or perhaps I misunderstood...

Share this post


Link to post
Share on other sites
if you want just a flat texture floating there, render the texture to a 2D plain(draw a square with 2 triangles)in 3D space.

Think of a texture not as a phisical thing, not like a "cover" for a mesh but a way to describe the way light bounces off an object....Just like blue isnt a "thing" its the way light bounces of things with that particular property.

So if there is nothing there(no mesh, no normals) for the "light" to bounce off then there is nothing there to see hence nothing to apply a texture to...

Sorry if that sounds a little esoteric.. its late and im a newb myself so i could be totaly wrong ... but thats how i understamd it.

Share this post


Link to post
Share on other sites
GotenRulezU,

If you're not particularly fond of "3D space" as JDUK mentioned, you're also able to render your texture to a "Transformed" polygon.

In this case you are using screen coordinates (x,y) rather than 3d world coordinates. (x,y,z). To render your polygon as transformed, simply change your FVF to D3DFVF_XYZRHW, update your vertex format, and then set your vertex positions in the range of 0,0 to 640,480 or whatever your particular resolution may be.

I find that drawing "overlays" in this fashion can sometimes be easier.

If you have further questions, feel free to ask a follow-up.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!