Graphics Library for 2.71 se?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Graphics Library for 2.71 se?

Post by TheBuzzer »

Is there a graphics library or something I could use for 2.71

Like the graphics.c but made for 2.71

I have no clue why it does not work but it isnt loading the image

image->data = (Color*) memalign(16, image->textureWidth * image->textureHeight * sizeof(Color));
if (!image->data) {
free(image);
fclose(fp);
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
return NULL;
}

some where in that block it does not work right nad return null for the loaded image so I couldnt use it.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

This means your allocation fails, what can have some reasons:
a) you're running out of memory - check how much you're allocating
b) you have a buffer/stack overflow somewhere before that, which causes the alloc to fail (most likely)
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

weird i didnt even code much though .

just using the 2.71 se


i am just trying ot replace the textr based gui with a gui with pictures like what i been doing in my mod.

but now i cant use the graphics.c

no clue how to fix it. but is there a working graphics.c for 2.71 homebrews?
aeolusc
Posts: 18
Joined: Sat Oct 14, 2006 12:17 pm

Post by aeolusc »

Use macro PSP_HEAP_SIZE_KB to pre-allocate memory for libc use in prx module.
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

do you know a example of the line rewritten to using PSP_HEAP_SIZE_KB ?
aeolusc
Posts: 18
Joined: Sat Oct 14, 2006 12:17 pm

Post by aeolusc »

if you wanna allocate 8MB memory for libc use in prx module, just write following line right after PSP_MODULE_INFO:
PSP_HEAP_SIZE_KB(1024 * 8);
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

is that the max I could use?
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

also the line of code worked.

i can see some graphics now
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

you should be able to get more (with devhook loading i could get 22-23mb maybe with 2.71SE you can use the full 24mbytes)
Post Reply