Re: Problems with OpenGL asm program.

Frank Kotler <[email protected]>
Newsgroups org.kernel.vger.linux-assembly
Message-ID <[email protected]>
Lauri Pihlajakangas wrote:

...
>     fild dword [esp+20] ;width
>     fild dword [esp+24] ;height
>     sub esp,8
>     fdiv st1, st0
>     fstp qword [esp] ; BUG?

Looks like the "result" is in st1, and you store st0? Perhaps try "fdivp"?

...
>     sub esp,32
>     fldz
>     fst qword [esp]
>     fst qword [esp]
>     fst qword [esp]
>     fstp qword [esp]
>         call glClearColor
>     add esp, 32

Here, you seem to be storing the result in the same place 4 times. 
Probably want "fst qword [esp]"/"fst qword [esp + 8]"/"fst qword [esp + 
16]", etc. ???

...
>     fild dword [esp+20] ;width
>     fild dword [esp+24] ;height
>     sub esp,8
>     fdiv st1, st0
>     fstp qword [esp] ; BUG?

As above...

I don't have a clue about GL, but those look "suspicious" to me... Hope 
it helps.

Best,
Frank
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.