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 

Serious problems with SDL + PSPGL

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



Joined: 04 Nov 2005
Posts: 182

PostPosted: Wed Aug 01, 2007 9:28 am    Post subject: Serious problems with SDL + PSPGL Reply with quote

I have a codebase using SDL and PSPGL that previously worked on psp (around revision 1995 I would of last tested it).
I've since then updated my psptoolchain to the latest, with the latest libraries.

Since updating, SDL+PSPGL does not behave anywhere near as expected.

Example Image: (Left = PC. Right=PSP)
http://localhost.geek.nz/crap/wtfpsp.png
(Note: This isn't what the test app should show, this is a similar test showing the same problems)

Test App:
http://localhost.geek.nz/crap/testsdlgl.tar
Make -f Makefile.psp to build for psp, it is set up for 1.50 kernel.
To Build for OE add BUILD_PRX=1 to the makefile and
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(1024*16);
to test.cpp in the #ifdef PSP section.

I've tried reverting SDL and PSPGL to revision 1995 and rebuilding, that didn't fix it. So I'm currently assuming there is a deeper problem caused somewhere since I last built it successfully.
Notable changes in that time:
GCC 4.0.2 -> 4.1.0
newlib 1.13.0 -> 1.15.0

Anyone have any ideas or suggestions? Or even anyone else who is successfully using them together?

I'll try fully revert my toolchain back to r1995 for a test. That will take a while though.

I have tested pure pspgl using the ported nehe tutorials here:
http://forums.ps2dev.org/viewtopic.php?t=5835
I compiled and ran #6 and it worked perfectly.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Aug 01, 2007 2:14 pm    Post subject: Reply with quote

I think finding a working toolchain (e.g. fully rev 1995) that works would be most helpful, because then we can compare binary objects, variables & surfaces, etc, and try to figure out where the difference lies.
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Wed Aug 01, 2007 7:45 pm    Post subject: Reply with quote

Building the toolchain takes so long zzzz.... (Building now)

One thing I've noticed is that the texture coord calls (glTexCoord2f) are being ignored, no matter what you set them to the same thing is rendered (even if you remove them).
The only difference is what parts of it are rendered, if you make the texture draw over the whole screen, you get this:
http://localhost.geek.nz/crap/wtfpsp2.png (GL_NEAREST filtering)
Whereas if you just render a subsection on the screen, only that area gets drawn (as in the previous image).
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Wed Aug 01, 2007 8:30 pm    Post subject: Reply with quote

A full r1995 toolchain doesn't work either :'( (I'm fairly confident I have a full r1995 toolchain)

The other change I can think of between working and not working is that I've moved my PSP from 1.50 to OE firmware.
Running the code in GAME150 doesn't seem to make it work any different than running it under psplink (OE kernel) however.

Edit:
Have uploaded an OE-ified version of the code to:
http://localhost.geek.nz/crap/testsdlgloe.tar
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Thu Aug 02, 2007 4:29 pm    Post subject: Reply with quote

Yay, figured it out!

glEnable(GL_LINE_SMOOTH);

Remove that and everything is fine!
Using it when drawing lines/points is okay, but when drawing anything else they get messed up.
Sorry, the problem was my code all along! (As it usually is)
Now to figure out some other bits and I'll be sweet :D
Back to top
View user's profile Send private message
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