intraFont and openGL

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
GORETHRASHER
Posts: 12
Joined: Wed Sep 10, 2008 12:28 pm

intraFont and openGL

Post by GORETHRASHER »

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
GORETHRASHER
Posts: 12
Joined: Wed Sep 10, 2008 12:28 pm

Post by GORETHRASHER »

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: Select all

sceGuFrontFace(GU_CW);
instead of

Code: Select all

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?
Noko
Posts: 23
Joined: Sat Sep 06, 2008 8:35 pm

Post by Noko »

Code: Select all

/*
 * 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.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Noko wrote:

Code: Select all

/*
 * 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
Post Reply