Jump to content
  • Advertisement

Archived

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

cryo75

2d and 3d rendering

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

Hi all, How is it possible to rendering a 2d scene and 3d scene together into 1 scene... that is... I have a 2d scene which displays the interface and the 3d world where the action is... now how are both scenes displayed on the screen?? btw... I''m using dx9. Thanks, Ivan

Share this post


Link to post
Share on other sites
Advertisement
I''m drawing my 2d scene (just UI elements) using the OrthoLH function, etc...

Does this mean that I have to change the code so that the scene to use billboards??

Share this post


Link to post
Share on other sites
As RhoneRanger mentioned you can use D3DFVF_XYZRHW to specify transformed and lit vertices. You can then specify x,y in usual screen coordinates (The z reflects the z-depth, usually set to 0.0f if using D3DCMP_LESSEQUAL and reseting zbuffer to 1.0f with Clear).

Lookup "Vertex Formats" in the DX9 docs.

[edited by - UdayK on September 25, 2003 4:05:22 AM]

Share this post


Link to post
Share on other sites
Yes, that is why the function SetFVF( FVF) is their for.

You change that to match the FVF of the object you want to render.

BUT be careful with this, cause it takes about as much time to do this as it does to change textures. Sort your objects by Texture, as well as FVF.

Share this post


Link to post
Share on other sites
jeez how much things i still have to learn!!!

is there no book which explains directx and the 3d stuff involved. I''ve look at the resources pages but nothing looks that interesting!!

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!