Portage of Nehe tutorials 1 to 10 for PSPGL (v0.1)

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

Moderators: cheriff, TyRaNiD

Post Reply
Edorul
Posts: 7
Joined: Sat May 27, 2006 3:57 am
Location: France
Contact:

Portage of Nehe tutorials 1 to 10 for PSPGL (v0.1)

Post by Edorul »

Hi !

You can get the ten first tutorials of Nehe modified to compile with PSPGL there:
http://edorul.free.fr/psp/NeheTutorials1-10_v0.1.rar

In this archive you'll find :

- a mini tutorial to install PSPSDK and PSPGL

- "glut.c" which is a modified version of the one in pspgl. In pspgl there is no key repitition, you need to release and push again a key if you want your program to detect it again. With this modified version you can push arrows or triggers (but not start, select, cross, triangle, square and circle) and 'til they remain pushed they are detected and can be used by your program. (used in Nehe07, 08, 09 and 10).
To use it you need to replace the original one, compile pspgl and intall it again.

- Nehe01 : it's not a real Nehe tutorial but a skeleton for your future programs with a working Makefile. It initialises pspgl and give you all the functions in order to use PSP arrows pad, triggers, keys and joystick.

- Nehe02 to Nehe10 : they are adaptation of cygwin version of Nehe tutorials modified in order to run on a PSP.
You will notice in each folder a working Makefile, "psp-setup.c" needed to compile pspgl programs and "copy.sh" that permits to copy directly your program to your PSP without living cygwin, just type "./copy.sh".
All parts I've modified are maked by "@@@".

For the moment they are some bugs :
Nehe08 : if you use blend and light at the same time the cube disapear.
Nehe10 : Idem as Nehe08, and there is a clipping problem (as in all Nehe tutorials I have modified, but here it's very visible) -> if a point of a triangle is out of the clipping area the whole triangle is not drawn. It's specialy significant with the cell and floor.

Your feedbacks are welcome if you find a way to fix those bugs ;)

I hope this archive will be usefull to someone.

Edorul

PS: Many Thanks to lostjared for is MasterPiece3D port to PSP : it gave me a good sample and not the least a working makefile !
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

This is excellent stuff!

Great work there, the code is very well commented.

For people that don't know NeHe's site is at:

http://nehe.gamedev.net/

Ideal scenario would be to convert his web tutorials so they were PSP specific too, not a job I'd like to undertake!

Thanks for this.
JesusXP
Posts: 79
Joined: Tue Jan 17, 2006 11:16 am
Location: Ontario, Canada

Post by JesusXP »

great job, thanks!!
Energy
Posts: 133
Joined: Sat Mar 26, 2005 4:13 pm
Location: uk/beds/flitwick
Contact:

Post by Energy »

Come to my pub and I'll buy you a drink :)
Gary13579
Posts: 93
Joined: Mon Aug 15, 2005 7:43 am

Post by Gary13579 »

Someone actually did it, heh... Good job :D

Now, someone get display lists working!
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Awesome! I just finished my first OpenGL program concept on PC and it only uses Lesson 6 tech, so I'm very curious if I'll be able to get it running on PSP now :)

EDIT: Works! That was easy! :) I was trying already with the Gu samples, but they gave me a major headache. This worked first time, and will help me a lot being able to develop on PC first.

Thanks! Thanks! Thanks!
Edorul
Posts: 7
Joined: Sat May 27, 2006 3:57 am
Location: France
Contact:

Post by Edorul »

Thanks to all for your congratulations. I'm glad I could be helpfull.

When I've spare time, I continue slowly (I've done lesson 11 and 16). Just a word about that : if you use fog there is a bug in PSPGL and you MUST define GL_FOG_END before GL_FOG_START else you'll have a strange effect, somekind of inversed fog (try and you'll see...)
Energy wrote:Come to my pub and I'll buy you a drink :)
Beware I'll remind this ;)
User avatar
lokust
Posts: 22
Joined: Sun May 28, 2006 7:34 am

Post by lokust »

Is PSPGL a replacement for the drawing routines in the SDK?
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

PSPGL is a library for programming 3D graphics that is compatible with the very commonly used OpenGL library that you can find on PC, Mac, PS3, etc. This means you can write a 3D program for OpenGL on the PC, and then easily run that program on the PSP.

It does come at a price however, as it is probably not nearly as fast as using the sceGu commands. However, it does make coding a lot easier - you can develop big parts of your application on PC first. And it will allow people to port OpenGL based software.
thomas_fogh
Posts: 21
Joined: Fri Jul 20, 2007 10:22 pm
Location: Denmark

Post by thomas_fogh »

I can't get lesson 6 and above to work. When I start the EBOOT it just exits to XMB. (Except for lesson 10, which shuts down the psp.)
The lessons compile just fine and I have no problem running lesson 1-5.
tabularasa
Posts: 13
Joined: Wed Nov 22, 2006 12:28 am

Post by tabularasa »

i haven't tested the psp port but it's awesome.
Post Reply