Computer Graphics

Moderators: Sephiroth
Number of threads: 1263
Number of posts: 2665

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
bugs in the DirectX coordinate system ?? Posted by Stefan K. on 15 Dec 2001 at 9:29 AM
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




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.