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

What is everyone's favorite way to sanitize user data? I've been using Javascript, but
I've got a query joining several tables and returning quite a few columns. An
Setup using a simple example: I've got 1 table ( Totals ) that holds
Hey everyone, got a quick question that I can't seem to find anything about...
So Ive got a pretty big array of data and need to sort them
Ive got a project to make for a party, its called in holland a
Everyone remembers google browser sync right? I thought it was great. Unfortunately Google decided
Everyone I work with is obsessed with the data-centric approach to enterprise development and
Everyone has accidentally forgotten the WHERE clause on a DELETE query and blasted some
Everyone (at least everyone who uses a compiled language) has faced compilation errors but

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.