irrlicht 1.3 and linux, plus other questions :p

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
eneru
Posts: 40
Joined: Tue Apr 10, 2007 8:38 am

irrlicht 1.3 and linux, plus other questions :p

Post by eneru »

hi :)

i'm starting developing with irrlicht and when i saw 1.3 was out i quickly dled it, but the library for linux isn't there anymore (it was in the 1.2 archive) so do you know if it will be included soon ? or if i compile the sources, will it create it as a library with the makefile given ? :P

other stupid questions will surely follow later :wink:
Vuen
Posts: 25
Joined: Tue Jul 11, 2006 8:03 am

Post by Vuen »

Yep. Just hop into irrlicht-1.3/source/Irrlicht and type make. The makefile will put the library in the right place for you. It'll probably fail at first, because you'll be missing a lot of dev packages; you'll have to install dependencies as they pop up.

If you're on a Ubuntu/Debian box, you can simplify the process by first typing this:

sudo apt-get install build-essential libgl1-mesa-dev libglut-dev x11proto-gl-dev x11proto-xf86vidmode-dev libxxf86vm-dev

That'll give you most of the dependencies you need. Also, make sure you have the 3D drivers installed for your video card, because you'll need OpenGL.
eneru
Posts: 40
Joined: Tue Apr 10, 2007 8:38 am

Post by eneru »

ok thanks ^^ i should have tested compiling it before asking but anyway it worked perfectly ;)

now i'll see if i can make code blocks compile it (if he doesn't i'll ask a friend that made it work with the 1.2)

for the video card i have the free drivers for my radeon, and as opengl/glut works well there shouldn't be any problem :)

edit : i had a weird thing the first time i launched the fifth example (with openGL) :

Code: Select all

Irrlicht Engine version 1.3
Linux 2.6.20-14-generic #2 SMP Mon Apr 2 20:37:49 UTC 2007 i686
Using renderer: OpenGL 1.3
Mesa DRI R300 20060815 AGP 1x x86/MMX/SSE2 TCL: Tungsten Graphics, Inc.
OpenGL driver version is 1.2 or better.
Loaded texture: ../../media/irrlichtlogo2.png
*********************************WARN_ONCE*********************************
File radeon_mm.c function radeon_mm_alloc line 216
Ran out of GART memory (for 1048576)!
Please consider adjusting GARTSize option.
***************************************************************************
Error: Could not get dma buffer... exiting
what's funny (yet annoying) is that it worked when i relaunched the program, so it is not as bad as it could be, but if there is something i can do to avoid having such random problems that would be cool :)
If the problem comes from the GARTSize option (in xorg.conf ?), to what value should i change it for optimum compliance ? ^^

thanks in advance :p
eneru
Posts: 40
Joined: Tue Apr 10, 2007 8:38 am

Post by eneru »

another question (and thus another post :p) : among the types of 3D objects supported by irrlicht, which do you think is better ??
it has to be well supported by Blender, and i was thinking of using preferably .obj as it seems to be widely used... is it a good choice ? :)

as for textures, would you recommend PNG or TGA ?
twentytortures
Posts: 41
Joined: Thu Sep 28, 2006 4:34 am
Location: Eaton, Colorado, United States

Post by twentytortures »

I like png because it has a high compression and still supports alpha channels and has great quality.

As for model type, I'm just now getting back into irrlicht and I heard it supports collada now, so you might try that.
Vuen
Posts: 25
Joined: Tue Jul 11, 2006 8:03 am

Post by Vuen »

eneru wrote:what's funny (yet annoying) is that it worked when i relaunched the program, so it is not as bad as it could be, but if there is something i can do to avoid having such random problems that would be cool :)
If the problem comes from the GARTSize option (in xorg.conf ?), to what value should i change it for optimum compliance ? ^^
Yeah, this is one of the many reasons ATI cards suck on Linux. You need to specify your GARTsize in xorg.conf. I don't really know anything about it; you could look here:

HOWTO: Tweaking radeon driver for AGP
GARTSize: This is the amount of system memory that can be used for OpenGL textures. Search in Xorg.0.log for GART and find out what it is set to. For me it was 8 so I increased it to 64. This should help for games that need more texture memory. It probably cannot be set to any value. In the lspci output you can see GART64- so I don't recommend setting it higher than that number unless you're up for an experiment.
twentytortures wrote:I like png because it has a high compression and still supports alpha channels and has great quality.
TGA has all of these things as well (though I'm not sure how well Irrlicht supports compression). I choose PNG because it's more standardized and more widely used, and because there are less options when making a PNG file. For example you don't have to worry about whether it's compressed; it's always compressed. On the other hand, TGAs may load faster (take that with a grain of salt). The easiest way is just to use PNG.

For models, I suggest using Blender and exporting to .X . That's what I do. It supports skeletal animation. As far as I know, .OBJ doesn't support animation of any kind, and has only minimal texture support; you'd be stuck specifying textures in your code (or having texture data in a different file).


By the way, good choices on Code::Blocks and Blender. Same things I use as well; free software is definitely the way to go, especially if you want your game to be moddable or open source, and C::B is a fantastic IDE.

If you're interested in Windows+Linux support, you may be interested to know that it's possible to compile the Windows version of your code within Linux using the Linux port of MingW. That way you won't ever have to return to Windows.
Cross-compile Irrlicht from Linux to create Windows DLL/EXE
eneru
Posts: 40
Joined: Tue Apr 10, 2007 8:38 am

Post by eneru »

ok, thanks for up 2 for the info, i'll surely use PNG and .x then :p
from what you said, .x supports textures well, right ? :)

about GARTSize, my Xorg.0.log has several values :
(II) RADEON(0): Using 8 MB GART aperture
(II) RADEON(0): Using 1 MB for the ring buffer
(II) RADEON(0): Using 2 MB for vertex/indirect buffers
(II) RADEON(0): Using 5 MB for GART textures
i don't where to add the options in xorg.conf though, as i don't have them by default.... i guess it is within the device section of the ATI card but i'd like confirmation before screwing things up ;) (or i'll test this evening)

The game, if finished one day, will be of course heavily moddable and open source ;) (or at worst, free...)


edit : really important question : is it possible to put the image we want for GUI elements ?? (with transparency if the image is transparent, and etc.)
or are GUI elements/windows/... only grey ? (a friend told me the buttons could be changed with an image, but no other GUI elements are customisable like that..... which would require him and me to redefine our own GUI :/)
eneru
Posts: 40
Joined: Tue Apr 10, 2007 8:38 am

Post by eneru »

another newbie question :p : how can we resize images within irrlicht ?
is there a function to do it or do we have to code something by ourselves ?

also, i tried to show an image with :

Code: Select all

env->addImage(driver->getTexture("../../media/OP.png"),
			position2d<int>(0,0),
			true,
			0,
			12);
but the result is absolutely awful... >.> (as if the 2D image was treated as a 3D one without AA or something)

what's weird is that the same function from the fifth irrlicht example worked well with the irrlicht logo (also a PNG) so it must come from my other PNG, but how ??? (of course the quality of my PNG is good)

Is there a How To somewhere which specifies what images irrlicht can eat ? :)
Post Reply