SDL Port? and how to download?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

SDL Port? and how to download?

Post by Thanhda »

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...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

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?
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

yup. it exist.
http://cvs.ps2dev.org/ps2sdk-ports/sdl/ ... L_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...
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

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.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

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: Select all

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...
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

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!
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

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.
Last edited by Thanhda on Wed May 04, 2005 2:25 pm, edited 1 time in total.
There are 10 types of people in the world: Those who understand binary, and those who don't...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

http://www.devmaster.net/forums/index.p ... topic=3145
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.
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

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!
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

ooPo wrote:http://www.devmaster.net/forums/index.p ... topic=3145
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...
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

What would be nice would be a port of MESA to the PS2. I think its license is compatible with the ps2dev license.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

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...
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

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...
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

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
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

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...
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

easier for you maybe. wich doesnt say alot really.
Kung VU
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

Thanhda wrote:
Drakonite wrote:
Thanhda wrote: 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
User avatar
Neil Stevens
Posts: 79
Joined: Thu Jan 27, 2005 2:22 pm
Location: California
Contact:

Post by Neil Stevens »

Wouldn't Mesa be way too slow to be of any use?
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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
Post Reply