| View previous topic :: View next topic |
| Author |
Message |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Fri Dec 04, 2009 10:43 pm Post subject: Why doesn't this draw a triangle? (Probably stupid mistake) |
|
|
I am trying to do a combination between GU+Intrafont+Gamestates system dut it doesn't draw the triangle in drawtest.
http://code.google.com/p/crazyengine/source/browse/
Can someone review my code and tell me why it doesn't draw the triangle. (Probably a stupid mistake). _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Sat Dec 05, 2009 1:04 am Post subject: |
|
|
Steps to track down the error:
- does the intraFont draw/draw correctly?
- disable lighting
- disable blending (each frame, as intraFont will probably enable it again)
- disable depth testing (each frame, as intraFont will enable it each time)
- set GU_TRANSFORM_2D to check if your projection is wrong
- try to not load so many fonts statically, rather load them on-need _________________ <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 |
|
 |
a_noob
Joined: 17 Sep 2006 Posts: 97 Location: _start: jr 0xDEADBEEF
|
Posted: Sat Dec 05, 2009 6:49 pm Post subject: |
|
|
| Raphael wrote: |
- disable blending (each frame, as intraFont will probably enable it again)
- disable depth testing (each frame, as intraFont will enable it each time)
|
Surely you would know this wouldn't change much, unless he is using 0 alpha without knowing, also why would intraFont enable depth testing?? Its 2D sprites last I checked. One major thing I would look at is winding order before I looked at the 2 above problems. Then I would look at the projection to insure it is onscreen, then I would look at culling, including depth and alpha testing, then blending.
Oh and Raph, welcome back long time no see. Any chance of seeing you in #psp-programming? :D _________________
| Code: | .øOº'ºOø.
'ºOo.oOº' |
|
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Sat Dec 05, 2009 11:17 pm Post subject: |
|
|
I checked the intraFont code and in fact it disables depth testing for it's own render then re-enables it (ie, it just assumes that depth testing was on before). I didn't find it doing that for blending though, so I guess that's pretty much out of the question, yes.
PS: Might happen I stumble upon #psp-programming once in a while :) _________________ <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 |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Sat Dec 05, 2009 11:30 pm Post subject: |
|
|
| Looks like your verts are going anti-clockwise and you have GU_CW state enabled... might not be it since I don't see any backface culling going on but it's worth a shot. Lighting being enabled might be the culprit too... had problems with it in the past with it enabled and no lights on. |
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Mon Dec 07, 2009 1:30 am Post subject: |
|
|
Thanks.
The problem was intrafont. It enables gu_depth_test and gu_texture_2D
I modified intrafont so it sets the setting back to how they were before intrafont changed them. _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
|