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 8281771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:09:00+00:00 2026-06-08T10:09:00+00:00

My texture itself has a transparent background, and I would like to render it

  • 0

My texture itself has a transparent background, and I would like to render it as-is.

glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glPushMatrix();

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glTranslatef(x, y, 0.0f);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
glVertexPointer(2, GL_FLOAT, 0, undoVertCoord);
glTexCoordPointer(2, GL_FLOAT, 0, undoTexCoord);
glBindTexture(GL_TEXTURE_2D, texUndo);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

The problem is with glColor4f. That function seems to overwrite the transparency of the texture, making parts opaque when it should be transparent. But if I feed glColor4f with alpha value of 0, the whole texture becomes transparent.

SO, can you render a texture that ignores glColor4f, rendering the texture as-is? Or in a way that doesn’t affect the alpha values?

  • 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-06-08T10:09:02+00:00Added an answer on June 8, 2026 at 10:09 am

    What is your GL_TEXTURE_ENV_MODE set to? Try setting it to GL_REPLACE.

    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question I'd like the CSS background texture for my content area to begin immediately
I want to apply texture to the transparent png(bitmap), but I don't want to
I have an OpenGL texture with transparent and opaque pixels (eg, texture contains a
I can comfortably render a scene to a texture and map that texture back
texture is not loading properly it has lines and it is backwards. what is
I have a texture onto which I render 16 drawings. The texture is 1024x1024
When I render to texture, and then draw the same image, it seems to
I have a texture that is semi-transparent with varying opacity at different locations. I
The problem i am encountering is that i cannot get my texture to render
EDIT: SOLVED I encountered a problem while attempting to render into a texture. I

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.