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 

SDL Port? and how to download?

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



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 4:29 am    Post subject: SDL Port? and how to download? Reply with quote

hey, just wondering this SDL_opengl port located in the CVS, does this enable full feature opengl? Also how do i download the whole di. i read the readme but doesnt work. am i supose to connect to the server first? and if so how do i do that?
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Wed May 04, 2005 6:02 am    Post subject: Reply with quote

You must wait for an official release, or learn how to use cvs:

https://www.cvshome.org/docs/blandy.html

I don't see an SDL_opengl port located on the cvs server, however. Are you certain it exists?
Back to top
View user's profile Send private message Visit poster's website
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 6:06 am    Post subject: Reply with quote

yup. it exist.
http://cvs.ps2dev.org/ps2sdk-ports/sdl/include/SDL_opengl.h

let me know if it is a full featured ogl for the ps2. this would be very useful. also official release? when will the official release be launch?
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Wed May 04, 2005 9:48 am    Post subject: Reply with quote

Err.... I think I remember reading you once writing you knew how to compile stuff.... This file is a header file. Nothing that contains actual code to compile. It contains "sdlified" function prototypes (read "portable") for an hypotetic OpenGL library aside the SDL. SDL by no mean contains, and will ever contain any OpenGL implementation. That's not its job. So, to answer your question "when will SDL contain OpenGL" the answer is simply "never".
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 1:31 pm    Post subject: Reply with quote

pixel wrote:
Err.... I think I remember reading you once writing you knew how to compile stuff.... This file is a header file. Nothing that contains actual code to compile. It contains "sdlified" function prototypes (read "portable") for an hypotetic OpenGL library aside the SDL. SDL by no mean contains, and will ever contain any OpenGL implementation. That's not its job. So, to answer your question "when will SDL contain OpenGL" the answer is simply "never".


oh okay. well has anyone built a full feature ogl port yet? or something better then dreamgl? i'm mainly looking for a glu.h file. it seems that dreamgl doesnt include a guLookAt() function. i have tried to include one from the default dir but it gives me an error

Code:

demo.o(.text+0x334): In function `demo_init':
demo.c: undefined reference to `gluLookAt'
collect2: ld returned 1 exit status
make: *** [md2view.elf] Error 1


i know when including the function along without the lookat function it works, but when i include the function it does. dont know why.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Wed May 04, 2005 2:16 pm    Post subject: Reply with quote

glu and glut functions aren't part of the opengl core. They make up companion/helper libraries. As far as a ps2 port goes i'd say the getting the core upto speed is more of a priority at the moment.

What default dir did you pull glu.h from? if its ps2 related there *might* be an implementation. As mentioned in another thread, you know that .h files are just the prototype or description of a given function. the actual function body is usually in an accompanying .c file or .a library.

*if* it does exist you have to link against the .o or .a containing said function, not just #include the .h file.
if it doesn't exist you can either port it or work around it.
gluLookAt is just a wrapper for a series of glRotate and glTranslate, IIRC.
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 2:23 pm    Post subject: Reply with quote

cheriff wrote:
glu and glut functions aren't part of the opengl core. They make up companion/helper libraries. As far as a ps2 port goes i'd say the getting the core upto speed is more of a priority at the moment.

What default dir did you pull glu.h from? if its ps2 related there *might* be an implementation. As mentioned in another thread, you know that .h files are just the prototype or description of a given function. the actual function body is usually in an accompanying .c file or .a library.

*if* it does exist you have to link against the .o or .a containing said function, not just #include the .h file.
if it doesn't exist you can either port it or work around it.
gluLookAt is just a wrapper for a series of glRotate and glTranslate, IIRC.


i pulled the glu.h file from the /usr/includes/GL/ folder, and yes i know what the .h files are. i did not only grab just the .h file i also grab the lib file as well, but as you mention it needs to be a .o or .a file. the file i have is a .lib file which i downloaded off the net(could be reason its not working). I may be new to ps2 programming, and linux, but i know how api's work and how to link them. my main question is if there is some sort of implementation process(which there is most likely), but in windows. all you go to do is link the files and include them and it works. Of course this is not windows, this is linux, but i would have presume they were some what a like. I am using the dreamGL sample as a test. located at dream_gl/contrib/dfreak/. it comes with 2 main files, one for windows and the other for ps2. and i am currently modifiying demo.c. in Windows of course it works just great, when trying to include glu.h or sdl_opengl.h, but in linux on the otherhand gives me a problem.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...


Last edited by Thanhda on Wed May 04, 2005 2:25 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Wed May 04, 2005 2:24 pm    Post subject: Reply with quote

http://www.devmaster.net/forums/index.php?showtopic=3145

Quote:
It's pretty simple to build your own look-at matrix.

First, calculate forward, right, and up vectors. The forward vector should be a unit vector pointing in the direction that your camera is looking. The right and up vectors must be unit vectors, and perpendicular to each other and the forward vector. How to come up with these vectors is a matter of how your camera works, so I won't go into more detail (unless you ask).

Now, make a 3x3 matrix that has as its first row, the right vector; as its second row, the up vector; and as its third row, the NEGATIVE of the forward vector (this is so the forward vector maps onto the negative Z axis, which is the usual behavior for gluLookAt).

Finally, expand this matrix into a 4x4 (by adding a 1 in the lower-right corner and zeros elsewhere), and multiply it by a translation matrix that takes your camera location to the origin (i.e. the translation is by the negative of the camera location). And you've got a look-at matrix.


Google is your friend.
Back to top
View user's profile Send private message Visit poster's website
cheriff
Regular


Joined: 23 Jun 2004
Posts: 262
Location: Sydney.au

PostPosted: Wed May 04, 2005 2:27 pm    Post subject: Reply with quote

ok. well in that case there is no glu implementation for ps2. Taking the ones for /usr/GL wont do anygood because they're targeted to x86/ppc/whatever and not the ps2. If you were linking against them, i'm suprised the link process actually got that far.
_________________
Damn, I need a decent signature!
Back to top
View user's profile Send private message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 2:29 pm    Post subject: Reply with quote

ooPo wrote:
http://www.devmaster.net/forums/index.php?showtopic=3145

Quote:
It's pretty simple to build your own look-at matrix.

First, calculate forward, right, and up vectors. The forward vector should be a unit vector pointing in the direction that your camera is looking. The right and up vectors must be unit vectors, and perpendicular to each other and the forward vector. How to come up with these vectors is a matter of how your camera works, so I won't go into more detail (unless you ask).

Now, make a 3x3 matrix that has as its first row, the right vector; as its second row, the up vector; and as its third row, the NEGATIVE of the forward vector (this is so the forward vector maps onto the negative Z axis, which is the usual behavior for gluLookAt).

Finally, expand this matrix into a 4x4 (by adding a 1 in the lower-right corner and zeros elsewhere), and multiply it by a translation matrix that takes your camera location to the origin (i.e. the translation is by the negative of the camera location). And you've got a look-at matrix.


Google is your friend.


yes google is a friend for sure. i have already found a few things similar, but i am trying to see if anyone has built one already, (not so good in math). if i have yet to find already pre existing api that includes a camera class i will have no choice to do it that method. Thanks anyway.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed May 04, 2005 2:29 pm    Post subject: Reply with quote

What would be nice would be a port of MESA to the PS2. I think its license is compatible with the ps2dev license.
Back to top
View user's profile Send private message AIM Address
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 2:30 pm    Post subject: Reply with quote

cheriff wrote:
ok. well in that case there is no glu implementation for ps2. Taking the ones for /usr/GL wont do anygood because they're targeted to x86/ppc/whatever and not the ps2. If you were linking against them, i'm suprised the link process actually got that far.


well its posible that i did not include the right lib file. but, by the looks of things i would have to create my own cam class. btw, is there no glut implementation for a ps2? i know ps2gl has it implementated but thats only works on the ps2linux.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 2:40 pm    Post subject: Reply with quote

J.F. wrote:
What would be nice would be a port of MESA to the PS2. I think its license is compatible with the ps2dev license.


and what is MESA? btw it seems that i do need to create a camera class.

to: oopo, have you done a camera class before? and by any chance would like to share it? if not thats alright, and thanks for all the help.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Wed May 04, 2005 4:59 pm    Post subject: Reply with quote

Thanhda wrote:
J.F. wrote:
What would be nice would be a port of MESA to the PS2. I think its license is compatible with the ps2dev license.


and what is MESA? btw it seems that i do need to create a camera class.

to: oopo, have you done a camera class before? and by any chance would like to share it? if not thats alright, and thanks for all the help.

You talk a lot of shit about linux to not know what Mesa is.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Wed May 04, 2005 6:09 pm    Post subject: Reply with quote

Drakonite wrote:
Thanhda wrote:
J.F. wrote:
What would be nice would be a port of MESA to the PS2. I think its license is compatible with the ps2dev license.


and what is MESA? btw it seems that i do need to create a camera class.

to: oopo, have you done a camera class before? and by any chance would like to share it? if not thats alright, and thanks for all the help.

You talk a lot of shit about linux to not know what Mesa is.


please let me know how this is helpful to the related topic? are you here to always bash people? and i just said its easier to set up a toolchain in linux then it is to in windows. that doesnt mean i'm a linux guru. sheesh.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Wed May 04, 2005 7:14 pm    Post subject: Reply with quote

easier for you maybe. wich doesnt say alot really.
_________________
Kung VU
Back to top
View user's profile Send private message Visit poster's website
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Wed May 04, 2005 7:16 pm    Post subject: Reply with quote

Thanhda wrote:
Drakonite wrote:
Thanhda wrote:
J.F. wrote:
What would be nice would be a port of MESA to the PS2. I think its license is compatible with the ps2dev license.


and what is MESA? btw it seems that i do need to create a camera class.

to: oopo, have you done a camera class before? and by any chance would like to share it? if not thats alright, and thanks for all the help.

You talk a lot of shit about linux to not know what Mesa is.


please let me know how this is helpful to the related topic? are you here to always bash people? and i just said its easier to set up a toolchain in linux then it is to in windows. that doesnt mean i'm a linux guru. sheesh.

You said a lot more than that (I won't dredge up exactly as we don't need a fight started), and it's also in your tone. You speak as though you are the expert and everyone else is wrong, despite the fact it appears you often don't know what you are talking about. -- If you haven't noticed, you've been pissing off a few of the people who have to then turn around and clean up the misinformation.

My post might have bashed you a bit but it also told you where to find the info you needed.
HINT: Take the two keywords from my post ("linux" "mesa") and plug them into google.

Most of my posts are more carefully crafted than you think... "You" addressed who I was talking to, "linux" and "mesa" are very good keywords, and the only other noun in the post describes what I think porting Mesa to PS2 would be like.

If you have a problem with me then feel free to send a PM to me.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Neil Stevens



Joined: 27 Jan 2005
Posts: 79
Location: California

PostPosted: Wed May 04, 2005 8:42 pm    Post subject: Reply with quote

Wouldn't Mesa be way too slow to be of any use?
Back to top
View user's profile Send private message Visit poster's website
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Wed May 04, 2005 9:03 pm    Post subject: Reply with quote

Neil Stevens wrote:
Wouldn't Mesa be way too slow to be of any use?
Yeah, I guess that too...
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu May 05, 2005 4:55 am    Post subject: Reply with quote

MESA is an open source implementation of OpenGL. It is supports many different OSes and hardware acceleration on a variety of cards. If there is no hardware 3D, it's pretty slow. If there is hardware 3D acceleration, it's pretty good. For example, my notebook uses the Unichrome DRI hw accelerated MESA and plays Quake3 level games pretty nicely.

http://www.mesa3d.org
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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