Anybody here endure C/Cpp? (.h to .inc conversion)
From: marcus (mrpier_at_juno.com)
Date: 01/01/05
- Next message: wolfgang kern: "Re: wanna do something nerdy and cool?"
- Previous message: vjnthrhs_at_sk.com: "LOL..... I Just Found A Gwenyth Paltrow Sex Video Online. Take A Look....... 7K67"
- Next in thread: Martin Jürgens: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Reply: Martin Jürgens: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Reply: NoDot: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Reply: Beth: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Maybe reply: Phil Carmody: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 01 Jan 2005 00:37:45 -0800
I'm attempting to convert .h files to .INC as something useable in ASM
syntax. And I'm a bit of a newbiean.
Can you tell me what this really does?:
typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC)
(GLenum pname, GLfloat param);
They mentioned a macro. I'm thinking the macro would be APIENTRY?
but the only thing that looks like it might be a function is:
GLAPI extern
Does * mean that PFNGLPOINTPARAMETERFEXTPROC is a pointer?
Why 2 sets of parenthesis?
The pname and param are to end up as function params in a call:
call glPointParameterfEXT, GLenum, GLfloat
but who's pointer comes from whom? and what gets where how and from
whence? :)
I dont see how C++ claims easier understanding. Everything's abstracted
from abstractions. Where's the beef?!
ANY clue would be greatly appreciated.
regards,
marcus
The whole thing is to get extensions for OpenGL using wglGetProcAddress
and the rest of it is like this:
*************** glext.h: ****************
#ifndef GL_EXT_point_parameters
#define GL_EXT_point_parameters 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname,
GLfloat param);
#endif
****************
**************** glext.h
#ifdef _WIN32
typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC)
(GLenum pname, GLfloat param);
#endif
<GL/gl.h> header file may already have these typedefs declared if your
<GL/gl.h> defines the
GL_EXT_point_parameters macro. Now declare global variables of the type of
these function
prototype typedefs like this:
#ifdef _WIN32
PFNGLPOINTPARAMETERFEXTPROC glPointParameterfEXT;
#endif
int hasPointParams = isExtensionSupported("GL_EXT_point_parameters");
#ifdef _WIN32
if (hasPointParams) {
glPointParameterfEXT = (PFNGLPOINTPARAMETERFEXTPROC)
wglGetProcAddress("glPointParameterfEXT");
}
#endif
- Next message: wolfgang kern: "Re: wanna do something nerdy and cool?"
- Previous message: vjnthrhs_at_sk.com: "LOL..... I Just Found A Gwenyth Paltrow Sex Video Online. Take A Look....... 7K67"
- Next in thread: Martin Jürgens: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Reply: Martin Jürgens: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Reply: NoDot: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Reply: Beth: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Maybe reply: Phil Carmody: "Re: Anybody here endure C/Cpp? (.h to .inc conversion)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|