Sign in to follow this  
Followers 0
LarsJ

OpenGL glOrtho() gives different results as a 32 and 64 bit program? [Solved]

3 posts in this topic

#1 ·  Posted (edited)

I'm using these five statements to resize an OpenGL window:

glViewport( 0, 0, $w, $h )
glMatrixMode( $GL_PROJECTION )
glLoadIdentity()
glOrtho( $dLeft, $dRight, $dBottom, $dTop, $zNear, $zFar )
glMatrixMode( $GL_MODELVIEW )

If I print the projection matrix before and after the glOrtho() command I get these results when the program is run as a 32 bit program:

GL_PROJECTION_MATRIX Before
( [0], [1], [2], [3] ) = 1.00, 0.00, 0.00, 0.00
( [4], [5], [6], [7] ) = 0.00, 1.00, 0.00, 0.00
( [8], [9], [10], [11] ) = 0.00, 0.00, 1.00, 0.00
( [12], [13], [14], [15] ) = 0.00, 0.00, 0.00, 1.00

GL_PROJECTION_MATRIX After
( [0], [1], [2], [3] ) = 0.19, 0.00, 0.00, 0.00
( [4], [5], [6], [7] ) = 0.00, 0.19, 0.00, 0.00
( [8], [9], [10], [11] ) = 0.00, 0.00, -0.19, 0.00
( [12], [13], [14], [15] ) = -0.00, -0.00, -1.19, 1.00

And these results when the program is run as a 64 bit program:

GL_PROJECTION_MATRIX Before
( [0], [1], [2], [3] ) = 1.00, 0.00, 0.00, 0.00
( [4], [5], [6], [7] ) = 0.00, 1.00, 0.00, 0.00
( [8], [9], [10], [11] ) = 0.00, 0.00, 1.00, 0.00
( [12], [13], [14], [15] ) = 0.00, 0.00, 0.00, 1.00

GL_PROJECTION_MATRIX After
( [0], [1], [2], [3] ) = 1.00, 0.00, 0.00, 0.00
( [4], [5], [6], [7] ) = 0.00, 1.00, 0.00, 0.00
( [8], [9], [10], [11] ) = 0.00, 0.00, 1.00, 0.00
( [12], [13], [14], [15] ) = 0.00, 0.00, 0.00, 1.00

It seems as if the glOrtho() command isn't working when the program is run as a 64 bit program. What am I doing wrong?

This is the demo program I have used to print the results in the Scite console.

tst01.au3

Regards Lars.

Edited by LarsJ

Share this post


Link to post
Share on other sites



There was a bug with AutoIt regarding DllCall double type argumens. The fix was committed 30.12.2011. at 18:00:15 precisely wih description

Fixed: x64 DllCall not setting double type parameters correctly.

That means you can try with beta version of AutoIt 3.3.9.0. and above and it should work.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0