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).
Why doesn't this draw a triangle? (Probably stupid mistake)
Why doesn't this draw a triangle? (Probably stupid mistake)
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
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
- 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
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
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.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)
Oh and Raph, welcome back long time no see. Any chance of seeing you in #psp-programming? :D
Code: Select all
.øOº'ºOø.
'ºOo.oOº'
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 :)
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
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
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.
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: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}