03-16-2010, 04:47 PM
First, that should raise a non method error for nil, as CREATEDEV_FUNC has never been initialized.
Second, it seems that createDevice takes 7 arguments, and you are only using six integers. The arguments that API takes are:
The first is an integer, the second is a class that seems to have two Uint32(Width and Height), and the others should work well with integers as argument type. If that's correct, it should be:
That may work, but maybe not. I haven't tested and I don't know how core::dimension2d< u32 > should be packed as it's a class.
Second, it seems that createDevice takes 7 arguments, and you are only using six integers. The arguments that API takes are:
Code:
irr::createDevice (video::E_DRIVER_TYPE deviceType = video::EDT_SOFTWARE,
const core::dimension2d< u32 > & windowSize = (core::dimension2d< u32 >(640, 480)),
u32 bits = 16,
bool fullscreen = false,
bool stencilbuffer = false,
bool vsync = false,
IEventReceiver * receiver = 0
)
Code:
createDevice= Win32API.new('Irrlicht', 'createDevice', 'IPIIIII', 'I')
size = [800, 600].pack('LL')
device = createDevice.call(0, size, 32, 0, 0, 0, 0)
That may work, but maybe not. I haven't tested and I don't know how core::dimension2d< u32 > should be packed as it's a class.