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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:44:27+00:00 2026-06-15T20:44:27+00:00

I’m using openGL ES to display a YUV420 video on a UIView . I’m

  • 0

I’m using openGL ES to display a YUV420 video on a UIView. I’m following this thread (CADisplayLink OpenGL rendering breaks UIScrollView behaviour) to achieve a 30fps. Everything seems to be okay. The playback is smooth. Now thought I running my app through Instruments and I get few warnings:

  1. Logical Buffer Load – Summary => slow framebuffer load
  2. GPU Wait on Texture – Summary => CPU wait for GPU on Texture Upload
  3. Texture Upload Non-Optimal GPU Utilization – Summary => Mid-frame texture upload

In my callback I do the following:

[EAGLContext setCurrentContext:_context];
glClear(GL_COLOR_BUFFER_BIT);

// load the color components into OpenGL
glBindTexture(GL_TEXTURE_2D, _textures[TEXTURE_Y]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, frameWidth, frameHeight, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, (UInt8*)yuvFrame.luma.bytes);

glBindTexture(GL_TEXTURE_2D, _textures[TEXTURE_U]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, frameWidth/2, frameHeight/2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, (UInt8*)yuvFrame.chromaB.bytes);

glBindTexture(GL_TEXTURE_2D, _textures[TEXTURE_V]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, frameWidth/2, frameHeight/2, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, (UInt8*)yuvFrame.chromaR.bytes);

// draw
glDrawElements(GL_TRIANGLE_STRIP, sizeof(indices)/sizeof(indices[0]), GL_UNSIGNED_SHORT, 0);
[_context presentRenderbuffer:GL_RENDERBUFFER];

And prior to this call, in the init method of the UIView, I generate the textures and set some params, like this:

glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);

glGenTextures(NUM_TEXTURES, _textures);

glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, _textures[TEXTURE_Y]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glUniform1i(_uniformSamplers[SAMPLER_Y], TEXTURE_Y);

glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, _textures[TEXTURE_U]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glUniform1i(_uniformSamplers[SAMPLER_U], TEXTURE_U);

glActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_2D, _textures[TEXTURE_V]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glUniform1i(_uniformSamplers[SAMPLER_V], TEXTURE_V);

Although, like I said the playback seems to perform pretty well, I would like to try to fix those warnings. I tried several things without success. The only way I was able to remove them was by calling glGenTextures(NUM_TEXTURES, _textures)/glDeleteTextures(NUM_TEXTURES, _textures) at the beginning/ending of my callback but I don’t think that is the right way.

Does anyone have any suggestions?

  • 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-15T20:44:29+00:00Added an answer on June 15, 2026 at 8:44 pm

    The first warning on your list can sometimes be a false positive in Instruments, so it may not be a real issue at all. However, it may indicate that you haven’t properly cleared out the previous state of the framebuffer, so you could check to make sure that you don’t also have a depth buffer that needs to be cleared in addition to your GL_COLOR_BUFFER_BIT.

    The other two are simply telling you that it’s taking a while to upload your image data via glTexImage2D() on each frame. If you’re doing this on iOS 5.0, you could look at using texture caches to speed this upload process (CVOpenGLESTextureCacheCreate() and friends). They might help you squeeze out a little extra performance.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

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.