bugs in the DirectX coordinate system ?? - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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
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


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

Anzeige.IMCanvas1.backSurface.GetSurfaceDesc desc

' Initializes vertices used to render the background

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.