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 

GU_TRANSFORM_2D Question -- never mind --

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



Joined: 05 May 2005
Posts: 122

PostPosted: Fri Aug 18, 2006 4:37 pm    Post subject: GU_TRANSFORM_2D Question -- never mind -- Reply with quote

I wrote a font render based on the example in the sdk yet I have an odd issue. Regardless if I render it prior or after my scene. My text apears behind my 3d objects (have to pan the camera to a spot where no 3d is rendered just to see the text).

The sample renders using sprites/quads and GU_TRANSFORM_2D flag.

Is there some strange render priority between 2d & 3d transformation? Or is there just something simple i need to do to make the font render on top?

-- Edit --
Never mind. I do have to disable depth_test vs just setting the depth_mask.


Last edited by subbie on Fri Aug 18, 2006 6:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Fri Aug 18, 2006 5:55 pm    Post subject: Reply with quote

Sounds like a z buffer issue. Try switching to orothogonal rendering then draw your 2d. Or try clearing the depth buffer. ( glClear( GL_DEPTH_BUFFER_BIT) )
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Fri Aug 18, 2006 6:09 pm    Post subject: Reply with quote

Kojima wrote:
Sounds like a z buffer issue. Try switching to orothogonal rendering then draw your 2d. Or try clearing the depth buffer. ( glClear( GL_DEPTH_BUFFER_BIT) )


--edit--
I need to disable depth_test to solve for it.
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Fri Aug 18, 2006 10:00 pm    Post subject: Reply with quote

Either that, or you could set a better z-value on your 2D text, it still applies even though the 3D transform is disabled. Could be nice if you intend to render your 2D hud in layers. Setting your raw Z-value to 1.0f would result in a value of 65535 in the zbuffer.
_________________
GE Dominator
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Sat Aug 19, 2006 4:27 am    Post subject: Reply with quote

chp wrote:
Either that, or you could set a better z-value on your 2D text, it still applies even though the 3D transform is disabled. Could be nice if you intend to render your 2D hud in layers. Setting your raw Z-value to 1.0f would result in a value of 65535 in the zbuffer.


Well actualy the Z value was 0.0f, So unless maybe my scene was rendered above 0, I am a little confused why text went behind transformed geometry.
Back to top
View user's profile Send private message
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