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 

graph.c help

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



Joined: 25 May 2005
Posts: 6

PostPosted: Thu Jun 02, 2005 2:01 am    Post subject: graph.c help Reply with quote

Heya's, ive dont alot of reading/trial and error but im still stumped on how to use graph from the ps2sdk to use a chain and write an image to the screen. I get absolutely nothing on screen or junk if I play around with the BITBLTBUF settings..

shouldnt a call to graph_vram_write be enough to achieve this?

address = 0
width = 128
height = 128
psm = GS_PSM_CT24
data = Tex->mem (loaded correctly in to memory)
data_size = 128x128x24 bits = 49152 bytes (which is 3072 Qwords)

if someone can point me in the right direction it would be very appreciated!
Hed
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Jun 02, 2005 2:19 am    Post subject: Reply with quote

Writing data directly to the framebuffer can be tricky due to the weird ways the GS uses vram.

You might get better results by writing the data offscreen and use a textured sprite primitive to draw it onscreen.

Still, graph_vram_write() should be enough. I'd suggest you make sure the framebuffer and texture are the same bit depth (CT24 in this case) and make sure Tex->mem is correctly aligned in main memory (use memalign instead of malloc).
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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