sceGuStart question

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

Moderators: cheriff, TyRaNiD

Post Reply
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

sceGuStart question

Post by sauron_le_noir »

with the sceGuStart function you provide a buffer where the GE can store the commands for processing. Those commands are generated by the several sceGu* functions but why must we define the buffer as a 16-bit-aligned int array.
Is it a question of performance ? or is it related how the GE accesthe buffer to retrieve the instruction to be draw ?
why not use sceGuGetMemory for it ?
Sorry i'm very noob in GU programming i have always use frameworks like opentri,sdl,osl etc ...

I have found a excelent tutorial about gu programming at:
http://jj.iamjunkie.net/docs/vertex_array_dcache.html
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

1.) because the gu hardware requires aligned memory to be able to access it. And IIRC the buffer must even be 32bit aligned, since each single gu command is stored in one single 32bit value.

2.) because sceGuGetMemory just returns a memory location *inside* the display buffer that was given by the last sceGuStart command.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

thx for the reply using a high level graphic library is one thing but if you use directly
GU it's another.
I have saw many samples copy of some code but little documentation
Post Reply