Skip to main content
gamedev.net
🔒 Locked

Multitexturing Extention Problem

Started by Merlino Oct 6, 2006 at 5:38 PM 4 replies 850+ views
Original Post
Merlino
Merlino
Hi,I am quite new to OpenGL and i am making my first steps through multitexturing. However, it seems like i don't "have" the multitexturing extention... ... my compiler doesn't recongnise the following functions: glActiveTexture(GL_TEXTURE0); //GL_TEXTURE0,1 and so on are not reconised neither... GL_MAX_TEXTURE_UNITS So, how do i make my compiler recognise these functions?? Is there anything i must download?? Thanks in advance, Merlino
Merlino
Merlino
Also, I have a Sapphire X800GTO2
Lord Faron
Lord Faron
You have multitexturing but you don't have the necessary functions and constants defined. First download glext.h (I don't remember the address; google it). Second use wglGetProcAddress() to get the necessary function addresses. Then you can use the extension you want.
if (time() == $) { $ = 0; }
Merlino
Merlino
Ok, i got the file, but I don't understand how to use the wglGetProcAdress() function...

So, say I want to use the function glActiveTexture(): I write in the winmain.cpp:

PROC adress = wglGetProcAdress("glActiveTextureARB");

And then? What do I do??

I tried to use the function normally but I got an error saying that it was undeclared.

Thanks again
Lord Faron
Lord Faron
If you have glext.h then do something like this:

PFNGLACTIVETEXTUREPROC glActiveTexture = (PFNGLACTIVETEXTUREPROC)wglGetProcAddress("glActiveTexture");


Then you can use glActiveTexture normally. The same goeas for other functions that aren't in standard OGL libs.
if (time() == $) { $ = 0; }
Merlino
Merlino
Thanks, now everything works just fine :D

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.