Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6014529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:42:19+00:00 2026-05-23T02:42:19+00:00

hi everyone ive got quite an error here it seems like c++ is not

  • 0

hi everyone ive got quite an error here it seems like c++ is not finding glActiveTextureARB(GL_TEXTURE0_ARB);
im using codeblocks and i’ve got glext.h so whenever i right click glActiveTextureARB and find declaration it actually finds it… ive got a 64bits system and ive tried putting glext.h in the GL folder and also in my project and im getting the same error any ideas would help tyvm

heres my code in case u need it.. it is in spanish btw but it doesnt matter cuz the error i think its not in the code

#include "objetos.h"
#include "glext.h"
#include <cassert>

Objetos::Objetos()
{
    m_OBJS = NULL;
}

Objetos::Objetos(OBJETO d,int txt)
{
    m_OBJS = NULL;
    box = 0;
    triangle = 0;
    circle = 0;
    CTargaImage image;

    image.Load("TGAs/caja1.tga");
    glGenTextures(1, &m_texturaCaja[0]);
    glBindTexture(GL_TEXTURE_2D, m_texturaCaja[0]);
    gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB,
                   image.GetWidth(), image.GetHeight(),
                   GL_RGB, GL_UNSIGNED_BYTE, image.GetImage());

    image.Release();


    image.Load("TGAs/caja2.tga");
    glGenTextures(1, &m_texturaCaja[1]);
    glBindTexture(GL_TEXTURE_2D, m_texturaCaja[1]);
    gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB,
                   image.GetWidth(), image.GetHeight(),
                   GL_RGB, GL_UNSIGNED_BYTE, image.GetImage());

    image.Release();

switch(d)
    {
        case TRIANGULO:
        //borrarlo antes de dibujarlo siempre;
        glActiveTextureARB(GL_TEXTURE0_ARB);
        glBindTexture(GL_TEXTURE_2D, m_texturaTriangulo[txt]);
        glEnable(GL_TEXTURE_2D);
        glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
        glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_REPLACE);
        m_OBJS = glmReadOBJ("materiales/triangulo.obj");
        m_Posicion.x = 0.0f;
        glDisable(GL_TEXTURE_2D);
        break;

        case CIRCULO:
        glActiveTextureARB(GL_TEXTURE1_ARB);
        glBindTexture(GL_TEXTURE_2D, m_texturaEsfera[2]);
        glEnable(GL_TEXTURE_2D);
        glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
        glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_REPLACE);
        m_OBJS = glmReadOBJ("materiales/circulo.obj");
        m_Posicion.x = -0.43f;
        glDisable(GL_TEXTURE_2D);
        break;

        case CAJA:
        glActiveTextureARB(GL_TEXTURE2_ARB);
        glBindTexture(GL_TEXTURE_2D, m_texturaCaja[1]);
        glEnable(GL_TEXTURE_2D);
        glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
        glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_REPLACE);
        m_OBJS = glmReadOBJ("materiales/caja.obj");
        m_Posicion.x = 0.43f;
        glDisable(GL_TEXTURE_2D);
        break;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:42:20+00:00Added an answer on May 23, 2026 at 2:42 am

    glActiveTextureARB is an extension function. As such under the Windows plattform it does not suffice to include glext.h to make it usable. You also have to define a function pointer and load it with

    PFNGLGETACTIVETEXTUREARB __myglextActiveTextureARB;
    #define glActiveTextureARB __myglextActiveTextureARB
    
    void initGLextensions() {
        __myglextActiveTextureARB = (PFNGLGETACTIVETEXTUREARB) wglGetProcAddress("glActiveTextureARB);
    }
    

    That macro juggling is neccesary to keep the library namespace clean.

    Since it would be so tedious doing all this extension loading from scratch there are extension wrapper libraries like GLEW ( http://glew.sourceforge.net ) or GLEE ( http://www.opengl.org/sdk/libs/GLee/ ) reducing the whole process into including their headers instead of the standard OpenGL includes, adding it to the linked libraries list and doing a glewInit() for GLEW and for GLEE optionally a GLeeInit() after context creation and be done with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got three tables I would like to query for a single dataset. Here
I've got a Server where VisualSVN is running on. Its using HTTP protocol. Everyone
Ive got some data (not that the data actually exists until after I solved
everyone. I've got a string looks like var s = 2qf/tqg4/ad(d=d,s(f)d) And I've got
Hi everyone I've got a huge issue that I don't quite understand why it's
hey everyone... so i'm working on a database design class for university. I've got
I've been working on my own django based blog (like everyone, I know) to
I've read many answers here about this topic, but everyone suggests the BCP ||
everyone. This is a piece of code from using sqlite in android tutorial: return
Hey everyone, got a quick question that I can't seem to find anything about...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.