Take it back,

Very likely this is a bug in the gles backend of clutter.
Since I can only check with the PVR emulator I am not sure who to accuse yet, but clearly the cogl_setup_viewport implementation is different between gl and gles.

Michael

Michael Boccara wrote:
Thanks Ere,

Turns out this is a bug in the PVR SGX OpenGLES emulator on PC !
I tried with clutter instead of clutter-eglx and I get the same result as you.

Michael

ere wer wrote:
Hi,

I have tested you code and it seams ok: http://img139.imageshack.us/img139/980/capturezk3.jpg

In general using depth 0 should give you the expected 2d UI results, for this ortho proj is not needed...

Out of a curiosity, for what do you need an ortho proj?
I myself consider it just "a cool view", not something important :)

MihailNaydenov




----- Original Message ----
From: Michael Boccara <[EMAIL PROTECTED]>
To: clutter <[email protected]>
Sent: Monday, October 27, 2008 9:58:25 AM
Subject: [clutter] Clutter and ortho projection

Hi all,

Clutter is using perspective projection by default.
More than that, I couldn't find a way to make it use orthogonal projection. Internally, ClutterStage uses cogl_setup_viewport, which uses cogl_perspective. There is a commented out call to cogl_wrap_glOrtho which seems to tell that there was an attempt to support orthogonal projection, which was apparently abandoned.

It results in some offset from expected x,y position, even when depth is 0.
See the code example attached in test_ortho.c.
It basically creates a rectangle which should be exactly 1 pixel within the stage window on all sides. Instead, the rectangle shows up 10 pixels from the top and 3 pixels from the right side. Left and bottom are correctly 1 pixel.

Any idea how to get the right orthogonal projection without changing clutter's internal code ?

In general, I would have expected clutter to use orthogonal projection by default, since it is used mostly for UI.

Thanks,

Michael






--
Michael Boccara
Graphtech
Herzliya, Israel


--
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to