PDA

View Full Version : Multi Texturing



yossi
08-15-2000, 03:58 AM
How do I use Multi Texturing on windows NT?
Only OpenGL 1.1 is available for Windows and don't have the LIBs and definition file to use this feature. My Permedia3 Create card support this feature.
Many thanks

Bob
08-15-2000, 04:53 AM
You must load the functions yourself (this applies to all extensions you want to use). First, look in your GL/gl.h and look near the bottom of the file. There you can see come typedefs called PFNGL*PROC. Those typedefs declares a functionpoionter to an extensionfunction. You create a functionpointer, and then load the function with wglGetProcAddr, like this:




PFNGLARRAYELEMENTEXTPROC glArrayElementEXT;

glArrayElementEXT = wglGetProcAddr("glArrayElementEXT");

if(glArrayElementEXT==NULL) return;


Now, if all this passes, you can use the function like a regular function.

If typedefs for multitexturing is missing, you need to create then yourself. You can look at the predefined typedefs and do a similar on your own. Prototypes can be found in the documtent describing the extension. Look at the Extension registry (http://oss.sgi.com/projects/ogl-sample/registry/) for this.