Hi.
I started to re-write some OpenGL programs i wrote in C using masm32.
I have some trouble with the gluPerspective function because it takes 8 arguments.
Normally it takes just 4 arguments.
I cant find any information on what the 4 additional arguments are good for...
Hope you can help me :)
I started to re-write some OpenGL programs i wrote in C using masm32.
I have some trouble with the gluPerspective function because it takes 8 arguments.
Normally it takes just 4 arguments.
I cant find any information on what the 4 additional arguments are good for...
Hope you can help me :)
It takes 4 QWORDs, when Serge wrote his includes he recommend using MACROs to call all the functions. Thereofore he used DWORDs as the type checking would be inherent in the macros.
Ultimatly 4 QWORDS = 8 DWORDS in size, but you can't used invoke to call the procedures. :(
Ultimatly 4 QWORDS = 8 DWORDS in size, but you can't used invoke to call the procedures. :(
You may go to
http://nehe.gamedev.net
to download an example for an opengl program in masm32 to see how he solved this problem:
by this macro:
_gluPerspective MACRO a,b,c,d
gl_dpush d
gl_dpush c
gl_dpush b
gl_dpush a
mov eax, eax
mov ebx, ebx
call gluPerspective
ENDM
_glClearDepth MACRO t ;this is not defined in hardcode include files
gl_dpush t ;so here it is.
mov eax, eax
mov ebx, ebx
call glClearDepth
ENDM
try it
http://nehe.gamedev.net
to download an example for an opengl program in masm32 to see how he solved this problem:
by this macro:
_gluPerspective MACRO a,b,c,d
gl_dpush d
gl_dpush c
gl_dpush b
gl_dpush a
mov eax, eax
mov ebx, ebx
call gluPerspective
ENDM
_glClearDepth MACRO t ;this is not defined in hardcode include files
gl_dpush t ;so here it is.
mov eax, eax
mov ebx, ebx
call glClearDepth
ENDM
try it
Thanks. That will help.