Multi-texturing
Hi,
I''ve been working on getting a program of mine to support multi-texturing using OpenGL. The thing is, wglGetProcAddress always returns NULL pointers, and I know I have support for multi-texturing. I even tried directly copying other people''s code to make sure I hadn''t made a typo... same result. Anyone here have an idea as to why?
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Here''s my func :
// **********************************************
bool Init_MultiTexturing_Extension(void) // Initialisation du multi-texturing
{
// Pour donner le nom de l''extension
char *Extension;
Extension = (char *) glGetString(GL_EXTENSIONS);
if (!(strstr(Extension, "GL_ARB_multitexture")) == 1)
{
// L''extension "GL_ARB_multitexture" n''est pas supportée ==> PAS DE MULTITEXTURING
KillGLWindow();
MessageBox(NULL,"GL_ARB_multitexture","ERREUR : Extension non supportée :",MB_ICONERROR);
exit (0);
}
else
{
// L''extension "GL_ARB_multitexture" est supportée ==> MULTITEXTURING
// Initialisation du MultiTexturing
glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress("glMultiTexCoord2fARB");
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress("glClientActiveTextureARB");
if (!glActiveTextureARB || !glMultiTexCoord2fARB || !glClientActiveTextureARB)
{
// Une erreur ???
KillGLWindow();
MessageBox(NULL,"GL_ARB_multitexture","ERREUR : Impossible d''initialiser l''extension",MB_ICONERROR);
exit (0);
}
}
return true;
}
And in your "InitGL()"
// Initialisation du MultiTexturing si l''extension est supportée
if (!Init_MultiTexturing_Extension())
{
MultiTexturing = false;
}
else MultiTexturing = true;
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
// **********************************************
bool Init_MultiTexturing_Extension(void) // Initialisation du multi-texturing
{
// Pour donner le nom de l''extension
char *Extension;
Extension = (char *) glGetString(GL_EXTENSIONS);
if (!(strstr(Extension, "GL_ARB_multitexture")) == 1)
{
// L''extension "GL_ARB_multitexture" n''est pas supportée ==> PAS DE MULTITEXTURING
KillGLWindow();
MessageBox(NULL,"GL_ARB_multitexture","ERREUR : Extension non supportée :",MB_ICONERROR);
exit (0);
}
else
{
// L''extension "GL_ARB_multitexture" est supportée ==> MULTITEXTURING
// Initialisation du MultiTexturing
glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress("glMultiTexCoord2fARB");
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress("glClientActiveTextureARB");
if (!glActiveTextureARB || !glMultiTexCoord2fARB || !glClientActiveTextureARB)
{
// Une erreur ???
KillGLWindow();
MessageBox(NULL,"GL_ARB_multitexture","ERREUR : Impossible d''initialiser l''extension",MB_ICONERROR);
exit (0);
}
}
return true;
}
And in your "InitGL()"
// Initialisation du MultiTexturing si l''extension est supportée
if (!Init_MultiTexturing_Extension())
{
MultiTexturing = false;
}
else MultiTexturing = true;
========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
My rendering context is valid. I''ll try your function Yann L.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Heh. Wrong person. I''m trying Leyder Dylan''s.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement