| View previous topic :: View next topic |
| Author |
Message |
Hedonis
Joined: 25 May 2005 Posts: 6
|
Posted: Thu Jun 02, 2005 2:01 am Post subject: graph.c help |
|
|
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 |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Jun 02, 2005 2:19 am Post subject: |
|
|
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 |
|
 |
|