TechDemo 0.0.1 (Linux and W32 users! )
Moderator: Transport Empire Moderators
TechDemo 0.0.1 (Linux and W32 users! )
Hi guys,
now this isn't conciderd to be TE code, however, this _is_ supposed to demonstrate how to easly incooperate SDL OpenGL and OpenAL.
It's just a little demo I copy pasted wrote while playing with the various libraries out there.
I tryed to use the examples of the OpenGL Red Book as these are the clearest and ported them to use SDL instead of GLUT. Then OpenAL was added using the panning2d demo from OpenAL.
Again this only demonstrates the incoropration of various libs to be used maybe as a base, nothing more nothing less. Just to let you guys know that gears are grinding : )
(The OpenAL libs should have been installed with your sound card accelerated drivers. I understand however that a lot of people might not have these. So here's the URL to Creative's version. nVidia has one too but it apears to be the same .exe anyhow. OpenAL
The SDL .zip file is at libsdl.org The sdl.dll should be copyed into the windows system folder or just put it right next to the binary.
Gentoo users just emerge sdl and openal : )
So to summirze what you need to run this bin in windows:
TechDemo.exe (included)
data/boom.wav
sdl.dll
openal32.dll
alut.dll
opengl32.dll
glu32.dll
You should have all of these right next to the binary or in the system folder.
For those who wanna look at the code and maybe even compile it yourself, the devcpp project file is included. Upgrade to the latest version (4.9.8.10) and use the integrated package update manager to install SDL, OpenGL and OpenAL to get all the libs integrated into the src. (runtime .dll's are then also in the dev-cpp\lib\*.dll dir so no need to install all the libs using the above mentioned installers.
That'll be all for today.
now this isn't conciderd to be TE code, however, this _is_ supposed to demonstrate how to easly incooperate SDL OpenGL and OpenAL.
It's just a little demo I copy pasted wrote while playing with the various libraries out there.
I tryed to use the examples of the OpenGL Red Book as these are the clearest and ported them to use SDL instead of GLUT. Then OpenAL was added using the panning2d demo from OpenAL.
Again this only demonstrates the incoropration of various libs to be used maybe as a base, nothing more nothing less. Just to let you guys know that gears are grinding : )
(The OpenAL libs should have been installed with your sound card accelerated drivers. I understand however that a lot of people might not have these. So here's the URL to Creative's version. nVidia has one too but it apears to be the same .exe anyhow. OpenAL
The SDL .zip file is at libsdl.org The sdl.dll should be copyed into the windows system folder or just put it right next to the binary.
Gentoo users just emerge sdl and openal : )
So to summirze what you need to run this bin in windows:
TechDemo.exe (included)
data/boom.wav
sdl.dll
openal32.dll
alut.dll
opengl32.dll
glu32.dll
You should have all of these right next to the binary or in the system folder.
For those who wanna look at the code and maybe even compile it yourself, the devcpp project file is included. Upgrade to the latest version (4.9.8.10) and use the integrated package update manager to install SDL, OpenGL and OpenAL to get all the libs integrated into the src. (runtime .dll's are then also in the dev-cpp\lib\*.dll dir so no need to install all the libs using the above mentioned installers.
That'll be all for today.
- Attachments
-
- TechDemo_0.0.1.tar.gz
- (27.78 KiB) Downloaded 279 times
Last edited by oliver on 20 Jul 2004 02:25, edited 3 times in total.
I figured it out : )ChrisCF wrote:I still don't see it. You have to hit the "Add attachment" at the bottom before you post
it was tar.bz2 which isnt' allowed?! and it doesn't warn you about an illegal extension.
It's there now.
P.S.
Installing my VMWare on this machine so I can make the w32 port work with mingw aswell.
-
- Transport Empire Developer
- Posts: 699
- Joined: 03 Feb 2003 09:30
- Location: Back at the office
I am testing the program right now on my Radeon 9600 powered laptop. It looks nice, and it doesn't seem to use much cpu power (current cpu usage: 0.3%)
And the very futuristic sound effect on the left and the right speaker when you click the mouse is really... umm... is "spiffy" a good word?
I haven't looked at the code yet though...
But I wonder, why haven't you used the audio library included with SDL?
And the very futuristic sound effect on the left and the right speaker when you click the mouse is really... umm... is "spiffy" a good word?
I haven't looked at the code yet though...
But I wonder, why haven't you used the audio library included with SDL?
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
Code: Select all
+------------Oo.------+
| Transport Empire -> |
+---------------------+
Under construction...
cos it was too much work, do all sorts of fancy mixing stuffs, and then ... why? I mean we are making a 3D game, so it kinda does need 3D sound effects.Hellfire wrote:I am testing the program right now on my Radeon 9600 powered laptop. It looks nice, and it doesn't seem to use much cpu power (current cpu usage: 0.3%)
And the very futuristic sound effect on the left and the right speaker when you click the mouse is really... umm... is "spiffy" a good word?
I haven't looked at the code yet though...
But I wonder, why haven't you used the audio library included with SDL?
OpenAL is to audio what OpenGL is to video. I know this wasn't 'discussed' before but We can do that in our next meeting : )
It _IS_ a cross platform library and it _IS_ used throughout quite some titles like Unreal, Unreal 2k3, Unreal 2k4, Harry Potter game, America's army etc etc. http://www.openal.org/titles.html has a bit longer list of titles, but I'm sure there plenty more.
It is supported by nVidia aswell as Creative labs.
-
- Transport Empire Developer
- Posts: 699
- Joined: 03 Feb 2003 09:30
- Location: Back at the office
Don't worry, I have no objections
I was just wondering why you used another library
I was just wondering why you used another library
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
Code: Select all
+------------Oo.------+
| Transport Empire -> |
+---------------------+
Under construction...
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
-
- Transport Empire Developer
- Posts: 699
- Joined: 03 Feb 2003 09:30
- Location: Back at the office
Come on, Chris... Let it go
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
Code: Select all
+------------Oo.------+
| Transport Empire -> |
+---------------------+
Under construction...
I updated the attachment instead of creating a new one to keep the first post nice, clean and updated.
I tested it here in my VMWare and everything seemed O.K.
I don't really like the way w32 deals with openAL but i think that we might init al this 'manual' way ourselfs anyhow because that would mean we could skip the entire alut lib out (Use SDL for file loading etc which is nicer and more platform independed) and keep everything more equal that way. Also I belive that SDL should init OpenAL anyhow, maybe in SDL2 will take care of that ...
(The reason that would make sense is glut was replaced by SDL so alut should be replaced by SDL aswell, keeps everything nice and orderly AND possibly faster with less dependancies)
I tested it here in my VMWare and everything seemed O.K.
I don't really like the way w32 deals with openAL but i think that we might init al this 'manual' way ourselfs anyhow because that would mean we could skip the entire alut lib out (Use SDL for file loading etc which is nicer and more platform independed) and keep everything more equal that way. Also I belive that SDL should init OpenAL anyhow, maybe in SDL2 will take care of that ...
(The reason that would make sense is glut was replaced by SDL so alut should be replaced by SDL aswell, keeps everything nice and orderly AND possibly faster with less dependancies)
I hear ya. Tho' this was an exceptional circumstance. I'm sure you, of all people, can appreciate that.ChrisCF wrote:As a guide, posts consisting of nothing but a smiley are considered spam. ...
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
The version number seems to be the same.oliver wrote:I updated the attachment instead of creating a new one to keep the first post nice, clean and updated.
As a rule of thumb, if there is any code difference the version number should change. Even if it's just to add an extra letter or number to show how minor the change is. (e.g. 0.0.1a or something similar.) Otherwise, there's lots of potential for confusion. Obviously this isn't really important just now and there's little to be confused about, but good habits etc etc.
Of course, if there is no code difference between the update and the previous upload then just ignore this post.
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
There is no code difference, a makefile for windows was added, that be all : )charlieg wrote:The version number seems to be the same.oliver wrote:I updated the attachment instead of creating a new one to keep the first post nice, clean and updated.
As a rule of thumb, if there is any code difference the version number should change. Even if it's just to add an extra letter or number to show how minor the change is. (e.g. 0.0.1a or something similar.) Otherwise, there's lots of potential for confusion. Obviously this isn't really important just now and there's little to be confused about, but good habits etc etc.
Of course, if there is no code difference between the update and the previous upload then just ignore this post.
So people who donwloaded it before, and used it in linux, will have 100% identical binaries. I did this purposly and not change the version number for that specific reason.
After I Installed OpenAL, I could sucessfuly compile your demo. However when I ran I got the following output, and then the application terminated with no delay.
Probably I have done something wrong, or not done somthing that I shuld do. I have checked with my own aplications that SDL work, so that cant be the problem. A problem can be that trident microsystems not toshiba provides any linux drivers for my graphics card, which have low support for 3D.
I hope I distrube the maby ongoing discussion in this thread. (have been away for 3 weeks)
Code: Select all
$ ./TechDemo
Code: Select all
Initializing SDL.
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Video mode set failed: Couldn't find matching GLX visual
I hope I distrube the maby ongoing discussion in this thread. (have been away for 3 weeks)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
-
- Transport Empire Developer
- Posts: 699
- Joined: 03 Feb 2003 09:30
- Location: Back at the office
Try running glxinfo. Find a line that says "Direct rendering:"
If it says "no", (and I think it will) then you don't have the openGL extensions installed in your X-server.
Try finding a line in your xf86config file that says #Loadmodule "GLX" and remove the #.
Restart the X-server and try again
If it says "no", (and I think it will) then you don't have the openGL extensions installed in your X-server.
Try finding a line in your xf86config file that says #Loadmodule "GLX" and remove the #.
Restart the X-server and try again
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
Code: Select all
+------------Oo.------+
| Transport Empire -> |
+---------------------+
Under construction...
Thanks Hellfire. With your advice it worked fine.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
wether glxinfo says yes or no shouldn't matter I think. Direct or indirect rendering only indicates wether the actual hardware is going to be used for accelerated rendering. However you do need the GLX (openGL eXtensions) for you X server to be able to use _any_ form of openGL (hard or software based)
however as always, I could be wrong : )
however as always, I could be wrong : )
Who is online
Users browsing this forum: No registered users and 2 guests