forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

intraFont and openGL

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
GORETHRASHER



Joined: 10 Sep 2008
Posts: 12

PostPosted: Fri Sep 12, 2008 2:22 pm    Post subject: intraFont and openGL Reply with quote

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
View user's profile Send private message
GORETHRASHER



Joined: 10 Sep 2008
Posts: 12

PostPosted: Fri Sep 12, 2008 5:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
Noko



Joined: 06 Sep 2008
Posts: 23

PostPosted: Fri Sep 12, 2008 7:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Sat Sep 13, 2008 3:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group