News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Tell me please ...

Started by iulik, June 27, 2005, 07:11:04 PM

Previous topic - Next topic

iulik

Tell me please, how can I invoke a function like glVertex3f that requires floating point arguments,
and how to do it using a minimal  CPU time ?

hutch--

iulik,

To use invoke, you must have a prototype for the function you want to call but you can write prototypes that use FP data types. Post in a little more info on the OpenGL function you are trying to use and perhaps someone can help you.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

raymond

The glVertex3f function requires "floats" as arguments. In Windows system, a "float" is a single precision 32-bit floating point value. It can thus be pushed on the stack just like any other 32-bit value.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

MichaelW

In Franck Charlet's OPENGL.ASM (\masm32\examples\EXAMPLE8\OPENGL) there are examples of passing floats and doubles with invoke.

eschew obfuscation

raymond

If your 3 parameters are in consecutive memory locations, you can also use the glVertex3fv instruction which needs only a single parameter, i.e. a pointer to the array where the x/y/z parameters are located.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com