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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:12:35+00:00 2026-06-10T21:12:35+00:00

I am trying to switch my application over to using framebuffer/renderbuffer objects (looking to

  • 0

I am trying to switch my application over to using framebuffer/renderbuffer objects (looking to render to texture later) but whenever I use the framebuffer/renderbuffer, nothing renders. When the default framebuffer is left on, as is the default, it renders fine; All colour, depth and stencil related features work exactly as expected.

Initialisation code:

if(frameBuffer == 0 || !GLES20.glIsFramebuffer(frameBuffer)){
    int[] retVal = new int[1];
    GLES20.glGenFramebuffers(1, retVal, 0);
    frameBuffer = retVal[0];
    retVal[0] = 0;

    if(renderBufferColour != 0 || !GLES20.glIsRenderbuffer(renderBufferColour)){
        GLES20.glGenRenderbuffers(1, retVal, 0);
        renderBufferColour = retVal[0];
    }

    if(renderBufferDepth != 0 || !GLES20.glIsRenderbuffer(renderBufferDepth)){
        GLES20.glGenRenderbuffers(1, retVal, 0);
        renderBufferDepth = retVal[0];
    }

    if(renderBufferStencil != 0 || !GLES20.glIsRenderbuffer(renderBufferStencil)){
        GLES20.glGenRenderbuffers(1, retVal, 0);
        renderBufferStencil = retVal[0];
    }
}

Framebuffer enabling code (commenting this out allows rendering using the default buffer):

GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, frameBuffer);

GLES20.glBindRenderbuffer(GLES20.GL_RENDERBUFFER, renderBufferColour);
GLES20.glRenderbufferStorage(GLES20.GL_RENDERBUFFER, GLES20.GL_RGBA4, width, height);
GLES20.glFramebufferRenderbuffer(
        GLES20.GL_FRAMEBUFFER,
        GLES20.GL_COLOR_ATTACHMENT0,
        GLES20.GL_RENDERBUFFER,
        renderBufferColour);

GLES20.glBindRenderbuffer(GLES20.GL_RENDERBUFFER, renderBufferDepth);
GLES20.glRenderbufferStorage(GLES20.GL_RENDERBUFFER, GLES20.GL_DEPTH_COMPONENT16, width, height);
GLES20.glFramebufferRenderbuffer(
        GLES20.GL_FRAMEBUFFER,
        GLES20.GL_DEPTH_ATTACHMENT,
        GLES20.GL_RENDERBUFFER,
        renderBufferDepth);

GLES20.glBindRenderbuffer(GLES20.GL_RENDERBUFFER, renderBufferStencil);
GLES20.glRenderbufferStorage(GLES20.GL_RENDERBUFFER, GLES20.GL_STENCIL_INDEX8, width, height);
GLES20.glFramebufferRenderbuffer(
        GLES20.GL_FRAMEBUFFER,
        GLES20.GL_STENCIL_ATTACHMENT,
        GLES20.GL_RENDERBUFFER,
        renderBufferStencil);

if (GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER) != GLES20.GL_FRAMEBUFFER_COMPLETE)
    throw new RuntimeException(String.format("Failed to make complete framebuffer object %x", GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER)));

The exception at the end is not thrown and when checking glGetError() after each step, no error is returned. Am I missing something 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-06-10T21:12:36+00:00Added an answer on June 10, 2026 at 9:12 pm

    Ok, after reading the OpenGLES 2.0 manual, I came across this paragraph:

    By allowing the images of a renderbuffer to be attached to a framebuffer,
    OpenGL ES provides a mechanism to support off-screen rendering. Further, by
    allowing the images of a texture to be attached to a framebuffer, OpenGL ES provides
    a mechanism to support render to texture.
    

    It appears to me that application render buffers are always off-screen not on-screen as I had expected. This, if I have read correctly, is why there is no image on the screen.

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

Sidebar

Related Questions

I'm trying to switch my Ember application over to using the Ember.Router but am
I'm trying to switch views in an iPhone application, but whenever I click on
I'm trying to switch over to using HAML for my views but I keep
I am trying to use the following method to switch to a different application:
I'm trying to switch over to using app.yaml instead of web.xml and app-engine-web.xml. I've
I'm really trying to switch to emacs, but learning to setup the environment is
When trying to use a Switch Case with switch(string) for an android project ,
I'm trying to use jquery to switch between three images once you click on
Trying to switch to SQLNCLI so I can use varchar(max) fields in my ASP
I an trying to develop a windows application using C# that can play streamed

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.