PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

iPhone / OpenGLES / FillRect

pocketjoris · 02 Apr 2009, 07:20 UTC
Hi,

I have some iPhone project working, it draws some images, which works (I had to manually enable GL_BLEND to get transparency to work though)
Now I want to draw a rectangle with an alpha channel, so that the screen is overlayed with a blue tone.
However, nothing works.

Any hints on how to get this to work?
Hi Joris,

I've answered your question in the OpenGL questions topic. Use ClassEDisplay::FillRect.
pocketjoris · 18 Apr 2009, 13:43 UTC
Thanks! That worked :)
Now I have (of course) yet another question about Clipping. I noticed the SetClipper() method, but that's unavailable on display.

Is it possible to do clipping somehow with OpenGL? Or should I use glScissors and enable GL_SCISSOR_TEST? I tried that, but I think I'm passing the wrong values though for x/y/w/h.


Also, I have a question about licensing etc. If we get a licens now, what will happen wit version 4? Is there a v4 planned? And will iPhone OS3.0 be supported (officially?)

Thanks!
Hi Joris,

Clipping to the display (and therefore in OpenGL) will be added in an upcoming EDGELIB release.

When using glScissor, remember that the screen coordinates go from bottom to top, instead of top to bottom (which you're probably used to).
pocketjoris · 20 Apr 2009, 17:44 UTC
Hi, thanks for the reply. glScissor worked. I mixed up the coodinates exactly like you said.

Thanks