i want to draw images on screen, i'm studying the GU but it's only for 3d...
are there any functions for 2d?
images on screen?
"drawing" means basically copying (or "blitting") images into the region of memory marked as video memory. If -for instance - graphic mode of PSP is setted in a 8888 mode, then each pixel will be rapresented by four bytes (let's say RGBA). To draw an image at (x, y) you'll need to copy each line of your sprite to memory starting at address vindex+x+y*linesize*pixelsize vindex being the start of vram, linesize being the alignment (usually 512) and pixelsize the size in bytes of a single pixel (4 in our previous example). GU IS NOT for 3d only since if you need to be hardware accelerated you MUST use it (or at least you must use graphic engine's chip). So you can use GU ignoring z axis (and configuring camera properly)...play around with pspsdk examples
so, is there a function to read a texture from file and blit it to the screen? or should i copy byte manually?jean wrote:"drawing" means basically copying (or "blitting") images into the region of memory marked as video memory. If -for instance - graphic mode of PSP is setted in a 8888 mode, then each pixel will be rapresented by four bytes (let's say RGBA). To draw an image at (x, y) you'll need to copy each line of your sprite to memory starting at address vindex+x+y*linesize*pixelsize vindex being the start of vram, linesize being the alignment (usually 512) and pixelsize the size in bytes of a single pixel (4 in our previous example). GU IS NOT for 3d only since if you need to be hardware accelerated you MUST use it (or at least you must use graphic engine's chip). So you can use GU ignoring z axis (and configuring camera properly)...play around with pspsdk examples
i know another way is to create a mesh on the screen and texturize it as if it is the screen...possible using psp?
i have a problem....i would like to use SDL because i used it on windows, but i'm on win32 psp sdk and afaik the SDL for psp is avaible only on linux.... (i should compile it on linux with make!)ne0h wrote:Have a look in the graphics.c source, you can find it with some doc on psp-programming.com...
There's nothing difficult about looking into examples, i don't think you'll find more help than this here. And, also, an advice: download Heimdall's sdk, don't mess around with cygwin - it is the fast way. Just another word before you come back saying "Oh, well, where can i found that beauty"...there's a link called "search" in this forum, and friends tell me it can do miracles....