The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How to clear a region of a window in OpenGL-ES

Hi,

I know what i am asking is a silly question, but somehow i am not able to get the answer of it. I want to create a window & then clear a particular area of that window with a given color. I am able to clear the whole buffer/window using glClearColor, but not able to achieve clearing a specific region. I am putting my code here, if any one please point out where i am going wrong, it would be great.Thanks a lot.

Re: How to clear a region of a window in OpenGL-ES

Your vertices are far outside the clip volume. Try something like the code below to set up your protection matrix if you want to be able to specify pixel coordinates. Also, you might want to make sure that backface culling is disabled so the vertex winding order makes no difference, i.e. glDisable(GL_CULL_FACE).