Android Question Opengl

Victor Fung

Member
Licensed User
Hello:

In Java, the function glClear() commonly uses an argument like this (the argument is a bitwise OR)

glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

However this argument cannot be used in B4A, since GL10.GL_DEPTH_BUFFER_BIT is an Int. In other words, this is an error in B4A: GL10.glClear(GL10.GL_DEPTH_BUFFER_BIT Or GL10.GL_COLOR_BUFFER_BIT)

My question is: how is this done in B4A?

I see B4A has these members: GL_COLOR_WRITEMASK, and GL_DEPTH_WRITEMASK, and I suspect they might be of the solution I am looking for, but I don´t know.

Thank you.
 
Last edited:

Victor Fung

Member
Licensed User
Thanks Informatix, I am aware of libGdx, and I hope I will eventually get there. For now I am trying to learn the basics, starting with OGL.

However, I got stuck. I am trying to port the java example in the Pro OpenGL ES for Android book, in B4A. First example worked great, 2nd example does not fly. I am baffled.
 
Upvote 0
Top