Jump to content
  • Advertisement
Sign in to follow this  
Merlino

OpenGL Multitexturing Extention Problem

This topic is 4450 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!