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 

ODE in ps2dev.org svn compilation error

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



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Sat Oct 29, 2005 12:31 am    Post subject: ODE in ps2dev.org svn compilation error Reply with quote

I was wondering if ODE examples should compile, I've got this pspgl error :

Quote:
$ make drawstuff-test
psp-ar rc lib/libdrawstuff.a drawstuff/src/drawstuff.o drawstuff/src/psp.o
psp-ranlib lib/libdrawstuff.a
psp-gcc -c -Wall -fno-rtti -fno-exceptions -Wall -I/usr/local/pspdev/psp/sdk/include -g -Iinclude -IOPCODE -DdTRIMESH_ENABLED -O0 -o drawst
uff/dstest/dstest.o drawstuff/dstest/dstest.cpp
psp-gcc -o drawstuff/dstest/dstest.exe drawstuff/dstest/dstest.o lib/libode.a lib/libdrawstuff.a -L/usr/local/pspdev/psp/sdk/lib -lGLU -lGL
-lpspdisplay -lpspge -lpsprtc -lpspctrl -lstdc++ -lpspdebug -lpspsdk -lm -lc -lpsputility -lpspuser -lpspkernel
lib/libdrawstuff.a(drawstuff.o): In function `Texture':
drawstuff/src/drawstuff.cpp:243: undefined reference to `glPixelStorei'
drawstuff/src/drawstuff.cpp:244: undefined reference to `glPixelStorei'
...


thanks
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
Grom



Joined: 29 Oct 2005
Posts: 21
Location: Russia

PostPosted: Sat Oct 29, 2005 1:14 am    Post subject: Reply with quote

It gives the same error on my system.
(Windows XP, cygwin)
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sat Oct 29, 2005 2:09 am    Post subject: Reply with quote

According to the commit message for rev 1232:
Quote:
Get test programs to build; some of them even run. Needs recent goop.org PSPGL.
Back to top
View user's profile Send private message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Sat Oct 29, 2005 3:04 am    Post subject: Reply with quote

Aha, you too eh?
Have you actually ported ODE, or are you just trying the samples?
I've got a running port of ODE, and i'm currently working on a game. If anyone's interested, I'll release the ODEPSP library to the public.
EDIT: Just to prove i'm not lying:


EDIT 2: I see, I didn't notice that there was a ps2 port of ODE. Oh well.
Back to top
View user's profile Send private message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Sat Oct 29, 2005 6:36 am    Post subject: Reply with quote

Yeah, I wasn't quite ready to announce the SVN tree for general consumption, but its all basically there. The only test programs which are usefully working are the test_chain* ones.

All the tests rely on OpenGL, but ODE itself doesn't.

The crash test runs, but ironically, crashes after the first frame. I haven't looked into why yet.

From the look of it, ODE should be a good candidate to use the VFPU, since the core math is all matrix stuff.

AnonymousTipster, did you have to do much more to ODE? So far, I've found it has been mostly a matter of getting it to cross compile, with no other deep changes. If you have other changes, perhaps you can contribute them to the SVN tree.
Back to top
View user's profile Send private message Visit poster's website
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Sat Oct 29, 2005 8:16 am    Post subject: Reply with quote

I haven't changed very much source-code wise, I'm not using a compiled library, I have all the files in a folder named ode, and my makefile assembles all the source files into .o files, and links them with the program at compile. The advantage to this is that it lets you change some of the source code, and compile it with the app, rather than re-compiling the library.
Whilst porting ODE, the only problems I had involved getting C++ code to work properly, because the files were mostly C++, but a couple were C. That made the compiler do some very weird things, including reading all the files back-to-front! All this means is that any program that uses ODE needs to use .cpp, and not .c. I think that using extern "C" is OK though.
The worst problems I encountered weren't to do with getting it to compile, it was getting the simulation to behave. It took me a while to get the sample in the photo (dropping cubes onto a plane) to work at a decent framerate.
In my sample code, I have a couple of helper functions which take an ODE Body and return a PSP GU matrix (much like the routine in DrawStuff), which makes implementing it with the PSPs native functions quite easy.

As for porting the ODE samples, they may prove useful to show how it integrates with PSPGL, but the physics in them are often non-applicable or non-compileable. For example, there is a buggy sample which is supposed to show how vehicles work. It has three wheels. Theoretically, it should be easy to add on another wheel to make a car, but it requires a LOT of tweaking (as I found out), because you can't get the two wheels to turn exactly in parallel, so they fight each other and end up launching the vehicle into the sky. The sample i've used I made from scratch, but borrowed the near_callback function. It's about as simple as you can get for showing how to init the GU and ODE, getting them to work together.

Phew, that was a long post ^o^. Anyways, I'll upload the files to my server and make a thread about it tomorrow (GMT).
Back to top
View user's profile Send private message
bengarney



Joined: 22 Oct 2005
Posts: 24

PostPosted: Sat Oct 29, 2005 9:02 am    Post subject: Reply with quote

Are you capping at 60fps, or is that just a refresh/synch issue?

(The reason I ask is because if you want your whole game to run at 30fps, you usually want each component to be running at 100+fps.)

I'd be really interested to see what sort of optimizations to ODE you could do with the VFPU. Speaking of it, are there any examples on how to use the VFPU?
Back to top
View user's profile Send private message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Sat Oct 29, 2005 6:40 pm    Post subject: Reply with quote

It depends on the load, in the game I working on with it, it can go up to 100fps, but usually hovers around 70.
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