| View previous topic :: View next topic |
| Author |
Message |
skwi
Joined: 16 May 2006 Posts: 22
|
Posted: Tue May 16, 2006 4:53 am Post subject: Problem with sceGuDrawArray |
|
|
hello everybody
I can use sceGuDrawArray to draw in 2D with GU_TRANSFORM_2D but in 3D with GU_TRANSFORM_3D only sceGumDrawArray work, but sceGuDrawArray draw nothing, why ?
my program use the same GU initialisation as the sample "cube", and in the sample "cube" too, when I replace sceGumDrawArray by sceGuDrawArray, nothing is draw, why ? and what can I do to draw things in 3D with sceGuDrawArray
thank you for the answer |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue May 16, 2006 5:30 am Post subject: |
|
|
Because sceGumDraw*()-functions flush the matrix-cache before it calls sceGuDraw*(). Use sceGumUpdateMatrix() prior to sceGuDrawArray() if you use the gum-library to transform your geometry. _________________ GE Dominator |
|
| Back to top |
|
 |
skwi
Joined: 16 May 2006 Posts: 22
|
Posted: Tue May 16, 2006 6:34 am Post subject: |
|
|
| thank you, I'll try to change things |
|
| Back to top |
|
 |
skwi
Joined: 16 May 2006 Posts: 22
|
Posted: Fri May 19, 2006 6:50 am Post subject: |
|
|
| but is guDrawArray faster as gumDrawarray? is there any advantages to use guDrawArray instead of gumDrawArray ? |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Fri May 19, 2006 3:53 pm Post subject: |
|
|
sceGuDrawArray() is the function that actually renders anything. sceGumDrawArray() is a convenience-function in PSPGUM that makes sure that matrices modified by sceGum*()-functions are flushed to the hardware. It's basically this: | Code: | void sceGumDrawArray(...)
{
sceGumUpdateMatrix();
sceGuDrawArray(...);
} |
_________________ GE Dominator |
|
| Back to top |
|
 |
skwi
Joined: 16 May 2006 Posts: 22
|
Posted: Tue May 23, 2006 4:57 am Post subject: |
|
|
thank you a lot
i think i understand now
but i'll continue programming later cause my psp screen is broken |
|
| Back to top |
|
 |
|