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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:30:23+00:00 2026-05-23T20:30:23+00:00

I am drawing non-textured triangles whose alpha is being explicitly set to to 0.5

  • 0

I am drawing non-textured triangles whose alpha is being explicitly set to to 0.5 in the pixel shader for testing purposes. My application is based on the Opengl ES prefab provided by Xcode. I have not touched my EAGLView class.

I call

glEnable(GL_ALPHA)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SC_ALPHA)
glDrawArrays(...)

My clearColor is 0,0,0,1 and CAEAGLayer’s format is RGBA8.

The result I see is that no blending of any sort takes place and drawn pixels simply replace what’s underneath. I have also attempted to use GL_ONE,GL_ONE.

I tried to set the opaque property of my CAEAGLayer to false. The result seems to be that regardless of blend mode, the color of the drawn pixels is blended with white based on the alpha value. So gl_FragColor of 1,0,0,1 comes out as 1,0,0,1 but 1,0,0,0 comes out as 1,1,1,?

This behavior is consistent on the device and simulator. What could be wrong here?

  • 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-23T20:30:23+00:00Added an answer on May 23, 2026 at 8:30 pm

    You have to enable GL_BLEND and not GL_ALPHA. The GL_ALPHA constant has a completely different purpose (as a color channel identifier). So your glEnable call actually causes a GL_INVALID_ENUM error or something the like.

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

Sidebar

Related Questions

I am repeatedly drawing to an offscreen bitmap context non-destructivly on iphone. Right now
I've looked at Microsoft GLEE (non-commerical use) and other libraries for drawing graphs, but
When drawing OpenGL ES textures, they seem to snap to round pixel locations, as
I'm drawing a shadow of various non-rectangular shapes inside the CIImage object. I did
Good afternoon, I am having a little trouble with .net's internal (System.Drawing) based MetaFile
I'm debugging a crash where a non-main thread uses UIKit drawing methods. I'd like
I'm drawing a tile-based game. Some tiles can rotate, about their centre. It appears
Greetings, I'm trying to get a JFrame drawing in a non screen device. The
You know how System.Drawing.Rectangle was replaced by System.Windows.Int32Rect? (As far as non-floating-point shapes are
I'm drawing a non-traditional ring-clock in canvas. The time is represented by a second

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.