| View previous topic :: View next topic |
| Author |
Message |
GORETHRASHER
Joined: 10 Sep 2008 Posts: 12
|
Posted: Fri Sep 12, 2008 2:22 pm Post subject: intraFont and openGL |
|
|
Hi, is intraFont compatible with openGL?
For example, use openGL to init everything and use intrafont to draw text?
Or alternatively, can I mix openGL code with sceGu code, ie use sceGuDrawArray to draw my ploygons?
Thanks for your time |
|
| Back to top |
|
 |
GORETHRASHER
Joined: 10 Sep 2008 Posts: 12
|
Posted: Fri Sep 12, 2008 5:52 pm Post subject: |
|
|
After playing around with intraFont and openGL, it seems it may be possible, I gave up after getting useless artifacts on the screen for text.
I then began to play around with intraFont and the cube GU sample, where I encountered the same artifacts. Long story short, intraFont is set up so it works with:
| Code: | | sceGuFrontFace(GU_CW); |
instead of
| Code: | | sceGuFrontFace(GU_CCW); |
Since I thought the openGL code was useless I deleted it.... time to try again.
EDIT
Would repeated calls to sceGuFrontFace() make any performance impact?
Is there any overhead involved, or does it just set a flag? |
|
| Back to top |
|
 |
Noko
Joined: 06 Sep 2008 Posts: 23
|
Posted: Fri Sep 12, 2008 7:26 pm Post subject: |
|
|
| Code: | /*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2005 Jesper Svennevid
*/
#include "guInternal.h"
void sceGuFrontFace(int order)
{
if (order)
sendCommandi(155,0);
else
sendCommandi(155,1);
} |
Apparently it just sends one command to graphical processor.
You could call sceGuFrontFace a lot of times in a loop and then see how long each call takes. |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Sat Sep 13, 2008 3:46 am Post subject: |
|
|
| Noko wrote: | | Code: | /*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2005 Jesper Svennevid
*/
#include "guInternal.h"
void sceGuFrontFace(int order)
{
if (order)
sendCommandi(155,0);
else
sendCommandi(155,1);
} |
Apparently it just sends one command to graphical processor.
You could call sceGuFrontFace a lot of times in a loop and then see how long each call takes. |
It takes as long as it takes to write a 32bit word into a memory location (plus function calling overhead), which is a couple of handfull of cpu cycles. It's neglectible really. _________________ <Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl |
|
| Back to top |
|
 |
|