May 24, 2024, 07:51:43 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


some conversion help?

Started by ZeroDog, October 02, 2009, 09:58:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ZeroDog

doing some conversions here.... came across:
GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
... any ideas?  whats the 'ull' at the end?
I've set it to
const GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFF
but im not sure if this is going to be correct.

Also:
typedef void GLvoid;
I dont know what to use for a void in EB...
I used:
typedef GLvoid char
would this be the same result?


... and just guessing as to the conversion here:
GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);

my conversion:
declare import,glBlendColor alias PFNGLBLENDCOLORPROC (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
'{command}glBlendColor




Am I on the right track here?

sapero

October 02, 2009, 10:44:12 AM #1 Last Edit: October 02, 2009, 10:48:05 AM by sapero
Hi ZeroDog!
ull is from unsigned long long, also UINT64. I think you can't define hexadecimal constants in 64-bits yet, so you will need to convert it to to a decimal value:
const GL_TIMEOUT_IGNORED = 18446744073709551615qu
or
const GL_TIMEOUT_IGNORED = -1qu

void alone is not a type, void* is a pointer. You need to find GLvoid with an asterix (GLvoid*) and replace it (both tokens) with pointer, or define GLvoid as pointer, and replace GLvoid* with GLvoid.

GLAPI void APIENTRY glBlendColor(GLclampf, GLclampf, GLclampf, GLclampf);
GLAPI is probably an alias to __declspec(dllimport) or extern, ignore it if so.
APIENTRY is an alias for WINAPI, and WINAPI is an alias to __stdcall (also not cdecl). Use declare import, glBlendColor(parameters),retvaltype
again, void here is alone, so glBlendColor does not return any values:
declare import, glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)

The following typedef for PFNGLBLENDCOLORPROC declares a template for function call. You can define it as UINTtypedef PFNGLBLENDCOLORPROC UINT, or convert to template definition:
declare PFNGLBLENDCOLORPROC(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)

ZeroDog

Thanks a bunch, much appreciated  :)