Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Android Color Buffer problem!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Newbie
    Join Date
    Jan 2013

    Android Color Buffer problem!!

    Hi all,

    I'm creating an application type finger paint in Android, but a bit more complex. I found many examples on this topic, but the techniques used are rather slow. I simply used a technique very fast. The technique consists in not erase the color buffer, so that each touch drawn is accumulated in the color buffer, without having the need to reshape it after each rendering:
    Code :
    public void onDrawFrame(GL10 gl) {
        // gl.glClear(GL10.GL_COLOR_BUFFER_BIT); <-- no

    Unfortunately, on some devices work properly, while others dispositivii the image is erased at the first touch, or the picture is divided into 4 portions. I want to know if the color buffer in OpenGL is treated differently by the various devices? Will disappear? Or this is a wrong technique? Or you need to set something?


  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    It is a wrong technique. You cannot simply reuse the color buffer of previous frames directly. Have you considered double buffering? Not to mention that the behavior of the default framebuffer is defined by the windowing system, thus unless you explicitly request e.g. a single buffered context or you explicitly request a double buffered context and handle it accordingly, you'll not get a portable solution.
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog:

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2013
    thanks for the reply. I do not have much experience with opengl. I wanted to ask if there is a way to define a custom framebuffer? To handle it in my own way? I want to use the VBO, but I do not know if this is the solution, or has nothing to do

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts