Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

bugs in the DirectX coordinate system ??

I'm trying to write a program that shows simply a single picture as a
double picture by using DX7 and a driver for shutter glasses (ELSA
Revelator 3D). To make it possible to change the horizontal shift
between the two pictures I changed the z-coordinate of the texture
that contains the picture. When changing the z-coordinate (between 0
and 1) it would be logical if the shift between the shown two pictures
would increase linear. But when first increasing the z-coordinate in
runtime and then decreasing the shift between the shown pictures is
zero while the z-coordinate is not zero. While decreasing the
z-coordinate of the texture the shift between the shown pictures
becomes shorter in bigger steps than while increasing the
z-coordinate.
Could it be possible that a matrix is changing ?
How can I manage it that changing the z-coordinate brings a
standardized change of the shift between the double pictures ?

Thanks a lot for any help !

Stefan Kallenberger

------------------------

Do Until MustExit

On Local Error Resume Next

Render

ChangeZ --------------------------
l
DoEvents l
l
Loop l
l
[...] l
l
Sub ChangeZ() <--------



Dim desc As DDSURFACEDESC2
Anzeige.IMCanvas1.backSurface.GetSurfaceDesc desc



' Initializes vertices used to render the background


ll
ll
ll
/
V
With Anzeige.IMCanvas1
DX.CreateD3DTLVertex 0, desc.lHeight, ZCoordinate, 0.5,
&HFFFFFFFF, 0, 0, 1, m_Background(0)
DX.CreateD3DTLVertex 0, 0, ZCoordinate, 0.5, &HFFFFFFFF,
0, 0, 0, m_Background(1)
DX.CreateD3DTLVertex desc.lWidth, desc.lHeight,
ZCoordinate, 0.5, &HFFFFFFFF, 0, 1, 1, m_Background(2)
DX.CreateD3DTLVertex desc.lWidth, 0, ZCoordinate, 0.5,
&HFFFFFFFF, 0, 1, 0, m_Background(3)

End With



Set Texture1 = Nothing


Set Texture1 = Anzeige.IMCanvas1.
CreateTextureSurface(TexFile,0, 0, 0)



End If

End Sub

Sign In or Register to comment.