2d and 3d rendering

Started by
6 comments, last by cryo75 20 years, 7 months ago
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
Advertisement
Yes


That is what RHW is, and billboards.
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
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??
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]
Can I have different FVF''s that describe that different objects in the scene??
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.
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
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!!
Hi!

Have a look on this.
The tutorials show how to use transformed vertices for 2D.

The Wild Wild West - Desperado!
The Wild Wild West - Desperado!

This topic is closed to new replies.

Advertisement