Irrlicht software renderer
Irrlicht software renderer
hi im trying to use irrlicht using just the software capabilities on linux without using X, i cant seem to find how to get the examples to run using "/dev/fb0" as opposed to the pci device it tries to configure when running these apps. how can i specify to use just the framebuffer on /dev/fb0 ??/ or is this not possible?
many thanks
edit: here is the output of fbset -i if it is any help
mode "1688x964-60"
# D: 74.178 MHz, H: 33.717 kHz, V: 59.942 Hz
geometry 1688 964 1688 964 32
timings 13481 264 160 94 62 88 5
bcast true
laced true
rgba 8/16,8/8,8/0,8/24
endmode
Frame buffer device information:
Name : ps3fb
Address : 0x800000
Size : 18808832
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 0
YPanStep : 0
YWrapStep : 0
LineLength : 6784
Accelerator : No
many thanks
edit: here is the output of fbset -i if it is any help
mode "1688x964-60"
# D: 74.178 MHz, H: 33.717 kHz, V: 59.942 Hz
geometry 1688 964 1688 964 32
timings 13481 264 160 94 62 88 5
bcast true
laced true
rgba 8/16,8/8,8/0,8/24
endmode
Frame buffer device information:
Name : ps3fb
Address : 0x800000
Size : 18808832
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 0
YPanStep : 0
YWrapStep : 0
LineLength : 6784
Accelerator : No
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
I can send you my FB device. Since I still had no time to figure proper event and input handling I did not yet commit it, but it's basically working. You can try the files under http://parsys.informatik.uni-oldenburg. ... device.zip
thanks alot, ive just been playing around trying to get it to work with the hello world example. but as im new to this API im not entirely sure how i can integrate your driver with this example
i tried
#include <CIrrDeviceFB.h>
then tried to change the device to the CirrDeviceFB like so:
CIrrDeviceFB *device =
createDevice( video::EDT_SOFTWARE, dimension2d<s32>(640, 480), 16,
false, false, false, 0);
but i get the following error
main.cpp: In function int main():
main.cpp:112: error: CIrrDeviceFB was not declared in this scope
main.cpp:112: error: device was not declared in this scope
but i have included the cpp in the makefile so i assume that the function definition is included
Sources := main.cpp CIrrDeviceFB.cpp
i tried
#include <CIrrDeviceFB.h>
then tried to change the device to the CirrDeviceFB like so:
CIrrDeviceFB *device =
createDevice( video::EDT_SOFTWARE, dimension2d<s32>(640, 480), 16,
false, false, false, 0);
but i get the following error
main.cpp: In function int main():
main.cpp:112: error: CIrrDeviceFB was not declared in this scope
main.cpp:112: error: device was not declared in this scope
but i have included the cpp in the makefile so i assume that the function definition is included
Sources := main.cpp CIrrDeviceFB.cpp
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The files are also preprocessor define guearded, so you have to define _IRR_USE_FB_DEVICE_ to enable the code. Also make sure that the other devices are turned off, otherwise you'll get duplicated symbols. There's some additional code in the IrrCompileConfig.h that I made, but due to other changes I still have uncommited in my development version I cannot give you the actual code you'd need. Just try to play around with it and read the sources thoroughly.
ok i seem to have been able to get irrlicht compiled with the necessary modifications to the IrrCompileConfig.h file, now i just cant work out how to actually initialise the fb device seeing as all your functions are virtual, and create device returns a device of type irr::IrrlichtDevice.
sorry im trying not to be ignorant on all of this, but i really cant work out how to integrate your device. any more clues at all? thanks
sorry im trying not to be ignorant on all of this, but i really cant work out how to integrate your device. any more clues at all? thanks
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
You just use createDevice or createDeviceEX, just as for the other devices. That's why you have to disable them.
The device will always use /dev/fb0. You can both software renderers, where burningsvideo will give the better quality and, with the proper settings, also pretty good FPS.
The input support is not working, at least I couldn't figure it out. But rendering works without problems.
The device will always use /dev/fb0. You can both software renderers, where burningsvideo will give the better quality and, with the proper settings, also pretty good FPS.
The input support is not working, at least I couldn't figure it out. But rendering works without problems.
thanks. i seem to be getting nowhere with this, i must be doing something very wrong. no matter what i try i just cant seem to run any of the example apps using this
any idea when you think you will be commiting this driver? might be easier if i wait until i can get a package with it already linked in.
any idea when you think you will be commiting this driver? might be easier if i wait until i can get a package with it already linked in.
OK i finally made progress, kind of hacked it a little bit, though, not sure if that is why im having this problem
the way i did it was replace both CIrrDeviceLinux files with CIrrDeviceFB, changing the name back to CIrrDeviceLinux though. this way at least everything compiles and runs
BUT I'm having some very strange problems with this the screen seems to be rendered diagonally across the screen several times. any idea what could be causing this?
the way i did it was replace both CIrrDeviceLinux files with CIrrDeviceFB, changing the name back to CIrrDeviceLinux though. this way at least everything compiles and runs
BUT I'm having some very strange problems with this the screen seems to be rendered diagonally across the screen several times. any idea what could be causing this?
my fb settings seem to be compliant with that of the application
root@localhost:/mnt/share/irrlicht/bin/Linux# fbset -s
mode "1688x964-60"
# D: 74.178 MHz, H: 33.717 kHz, V: 59.942 Hz
geometry 1688 964 1688 964 32
timings 13481 264 160 94 62 88 5
bcast true
laced true
rgba 8/16,8/8,8/0,8/24
endmode
the colour format in the driver is set to : video::ECF_A8R8G8B8
//! Default 32 bit color format. 8 bits are used for every component:
//! red, green, blue and alpha.
ECF_A8R8G8B8
with my device initialised like this
IrrlichtDevice *device =
createDevice( video::EDT_BURNINGSVIDEO, dimension2d<s32>(1688, 964), 32,
true, false, true, 0);
so all the values seem to corrispond with the frame buffers configuration
this is also the output of your driver
root@localhost:/mnt/share/irrlicht/bin/Linux# ./01.HelloWorld
Irrlicht Engine version 1.4
Linux 2.6.23-rc6-powerpc64-smp-custom #1 SMP Thu Sep 13 11:21:21 EDT 2007 ppc64
Read keyboard mode: Invalid argument
Set keyboard mode: Invalid argument
Original resolution: 1688 x 964
ARGB8888
New resolution: 1688 x 964 (1688 x 964)
ARGB8888
Loaded mesh: ../../media/sydney.md2
Loaded texture: ../../media/sydney.bmp
root@localhost:/mnt/share/irrlicht/bin/Linux# fbset -s
mode "1688x964-60"
# D: 74.178 MHz, H: 33.717 kHz, V: 59.942 Hz
geometry 1688 964 1688 964 32
timings 13481 264 160 94 62 88 5
bcast true
laced true
rgba 8/16,8/8,8/0,8/24
endmode
the colour format in the driver is set to : video::ECF_A8R8G8B8
//! Default 32 bit color format. 8 bits are used for every component:
//! red, green, blue and alpha.
ECF_A8R8G8B8
with my device initialised like this
IrrlichtDevice *device =
createDevice( video::EDT_BURNINGSVIDEO, dimension2d<s32>(1688, 964), 32,
true, false, true, 0);
so all the values seem to corrispond with the frame buffers configuration
this is also the output of your driver
root@localhost:/mnt/share/irrlicht/bin/Linux# ./01.HelloWorld
Irrlicht Engine version 1.4
Linux 2.6.23-rc6-powerpc64-smp-custom #1 SMP Thu Sep 13 11:21:21 EDT 2007 ppc64
Read keyboard mode: Invalid argument
Set keyboard mode: Invalid argument
Original resolution: 1688 x 964
ARGB8888
New resolution: 1688 x 964 (1688 x 964)
ARGB8888
Loaded mesh: ../../media/sydney.md2
Loaded texture: ../../media/sydney.bmp