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

  • Home
  • SEARCH
  • 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 3217228
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:23:12+00:00 2026-05-17T15:23:12+00:00

When I bind a specific texture for drawing a quad in OpenGL, it affects

  • 0

When I bind a specific texture for drawing a quad in OpenGL, it affects all the display : if I use a red BMP file, I see all the screen like if I was wearing red glasses (same for every color : in black I see very dark, in white everything looks almost OK).

This is for texture-mapping fonts, which work well (currently I have only drawn numbers and the rest of the texture is black), but I have this weird behavior on every other surface.

No problem with other BMP files, though. It might come from this BMP file I created, but I had no problem with opening it in various image editors, and I manually check headers and data in my program which look OK.

Anybody has a clue on what could be the problem here ?

edit : this is my code to display a font :

static const GLfloat tfVertices[] = {
    -.5f, -.5f, .1f,
    -.5f,  .5f, .1f,
     .5f, -.5f, .1f,
     .5f,  .5f, .1f
};
GLfloat tfTextureCoords[] = {
     // I compute here the coords of the desired font, that works fine.
     // 4 lines of 2 float values (x, y)
};

glColor4ub(255, 255, 255, 255);
glBindTexture(GL_TEXTURE_2D, FontTextureGLnb); // when removing this (so use default texture instead of the one with fonts) I have no display bug.
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, tfVertices);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, 0, tfTextureCoords);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
  • 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-17T15:23:12+00:00Added an answer on May 17, 2026 at 3:23 pm

    There is no problem, that’s how OpenGL works. If you want textures, enabled them, if you don’t want textures, disable them. If you set the vertex color state to red, everything will be drawn red until you change that state.

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

Sidebar

Related Questions

I'd like to bind a configuration file to my executable. I'd like to do
I need to render quite alot (tens of thousands) images off-screen using OpenGL. I
Can anyone tell me how to bind to specific child class at run time
I am attempting to grep out bind for a specific user from an LDAP
I'm trying to bind a list of custom objects to a WPF Image like
I'm trying to bind the following shortcut: Ctrl + W to close tabs How
After a bind a method to an event of a Tkinter element is there
If I want to bind a collection to a some form of listing control
I'm trying to bind controls in a WPF form to an interface and I
When I try to bind port 80 to a socket in c, i always

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.