PDA

View Full Version : [D3D] Mixing 2d and 3d



chronozphere
20-05-2006, 08:23 AM
Hi all 8)

I already know 2 ways of drawing 2d using D3D:
Those are:

** Using Transformed Vertices.
** Using The Orthographic Perspecitve

These are mentioned in this thread (http://www.pascalgamedevelopment.com/forums/viewtopic.php?t=3143).
Now i want my engine to be able to mix up 2d and 3d in the same scene.

For 2d i can used Transformed vertices and for the 3d Untransformed and Unlit vertices.
So i need a way to use different vertex types in one render- sequence.

I tried calling SetPixelShader but it seems to raise an AV in D3D8.DLL when its called between beginscene and endscene.

Can someone explain me how to Mix 2d with 3d in the same scene, how do you guys do this???

Thanx in advance. :)
Chronozphere[/url]

Clootie
20-05-2006, 03:37 PM
Calling SetPixelShader between BeginScene / EndScene is OK. So you should look at bugs in your code.

alexione
20-05-2006, 07:24 PM
Check if you have correctly built your vertex data. This is one of the things Direct3D doesn't check and may cause AV.

Clootie
21-05-2006, 05:50 AM
Actually checking for bogus data inside index buffer - is a WHQL requirenment, so at this side everything should be OK (depending on that video driver you are using)

chronozphere
21-05-2006, 06:23 AM
aaaarrrghh... It seems that i mixed up SetVertexData and SetPixelData... silly me :oops: :oops:

However... Thanx for pointing me to the right direction. :)

P.S Srry that i couldn't post this earlier.