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 

Graphics Library for 2.71 se?

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



Joined: 06 Feb 2006
Posts: 49

PostPosted: Sat Oct 14, 2006 8:52 am    Post subject: Graphics Library for 2.71 se? Reply with quote

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.
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Sat Oct 14, 2006 9:06 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
TheBuzzer



Joined: 06 Feb 2006
Posts: 49

PostPosted: Sat Oct 14, 2006 9:14 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
aeolusc



Joined: 14 Oct 2006
Posts: 18

PostPosted: Sat Oct 14, 2006 1:54 pm    Post subject: Reply with quote

Use macro PSP_HEAP_SIZE_KB to pre-allocate memory for libc use in prx module.
Back to top
View user's profile Send private message
TheBuzzer



Joined: 06 Feb 2006
Posts: 49

PostPosted: Sat Oct 14, 2006 2:26 pm    Post subject: Reply with quote

do you know a example of the line rewritten to using PSP_HEAP_SIZE_KB ?
Back to top
View user's profile Send private message
aeolusc



Joined: 14 Oct 2006
Posts: 18

PostPosted: Sat Oct 14, 2006 7:06 pm    Post subject: Reply with quote

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);
Back to top
View user's profile Send private message
TheBuzzer



Joined: 06 Feb 2006
Posts: 49

PostPosted: Mon Oct 16, 2006 4:55 am    Post subject: Reply with quote

is that the max I could use?
Back to top
View user's profile Send private message
TheBuzzer



Joined: 06 Feb 2006
Posts: 49

PostPosted: Mon Oct 16, 2006 5:08 am    Post subject: Reply with quote

also the line of code worked.

i can see some graphics now
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Mon Oct 16, 2006 6:37 am    Post subject: Reply with quote

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)
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 -> 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