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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:20:00+00:00 2026-06-15T23:20:00+00:00

I draw two textures, first Texture A and then Texture B. I always appears

  • 0

I draw two textures, first Texture A and then Texture B. I always appears that A is always above b and even if some part of texture A is completely transparent, it just display the background color of screen. The background color here means the color i set with glClearColor. And however i change my code and picture, the transparent part of texture always has the same color of background color.

Here is my shader language source code.

precision mediump float;
uniform sampler2D u_sampler; 
varying vec2 v_TexCoord;
void main() {
    gl_FragColor = texture2D(u_sampler, v_TexCoord);
}

And i have already enabled blending function.

glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  • 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-15T23:20:01+00:00Added an answer on June 15, 2026 at 11:20 pm

    Are you rendering this with 2 draw calls or are you using multi-texture. If you are doing it as 2 draw calls then turn off the depth-test as the second texture will always fail the depth test (as its not in front of the polygon in the same place as it) and hence won’t get drawn.

    If you are using multi-texture then your problem probably lies with how you are setting up alpha.

    I really suspect it the former though.

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

Sidebar

Related Questions

i use two blocks to draw some buttons on my subview dynamically. One calculates
i want to draw line, i have two textfiled in which i enter some
I'm trying to draw grayscale image in color as texture in OpenGL using two
I'm trying to draw two objects using two different textures with one shader program
The above is a UITableViewCell containing two UILabels. The cell has a transparent background
I have this code that is supposed to draw two volume icons to the
How can I draw two different rectangles with black background without using subclass of
I'm trying to draw two sprites on the same screen. I have defined the
I am new to DirectX and I am trying to draw two rectangles in
In my SVG, which you can see on pastebin here , I draw two

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.