EIDT_CONSOLE
EIDT_CONSOLE
I am trying to use the new console device, but when i put it in createDevice() it says it can not convert device type to driver type.
Any ideas?
Any ideas?
multum in parvo
The first parameter to createDevice() is an enumeration of type E_DRIVER_TYPE, but you are passing an enumeration of type E_DEVICE_TYPE. Both types are unique and describe different things. There is no conversion between them, so you're obviously passing a parameter of the wrong type.
Perhaps you should look at the change log from the revision where the change was introduced. You might find some information on how to use it.
Travis
Perhaps you should look at the change log from the revision where the change was introduced. You might find some information on how to use it.
Travis
No. I will not post some code. You should have no problem figuring it out from the description in changes.txt. After reading that, you should know what class you need to look at next...
Travis
Travis
I have been researching it, and this is what i got:
These are the errors i am getting:
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp||In function `int main(int, _TCHAR**)'
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|104|error: request for member `Bits' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|105|error: request for member `DeviceType' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|106|error: request for member `DriverType' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|107|error: request for member `Fullscreen' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|108|error: request for member `Stencilbuffer' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|109|error: request for member `Vsync' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|110|error: invalid initialization of reference of type 'const irr::SIrrlichtCreationParameters&' from expression of type 'irr::SIrrlichtCreationParameters*'|
..\..\irrlicht-1.6\irrlicht-1.6\include\irrlicht.h|351|error: in passing argument 1 of `irr::IrrlichtDevice* irr::createDeviceEx(const irr::SIrrlichtCreationParameters&)'|
||=== Build finished: 8 errors, 3 warnings ===|
I have been trying to research this and i am getting very confused. Can someone please tell me how to use this correctly?
Code: Select all
irr::SIrrlichtCreationParameters* param;
param.Bits = 16;
param.DeviceType = EIDT_CONSOLE;
param.DriverType = EDT_OPENGL;
param.Fullscreen = false;
param.Stencilbuffer = false;
param.Vsync = false;
device = createDeviceEx(param);
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp||In function `int main(int, _TCHAR**)'
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|104|error: request for member `Bits' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|105|error: request for member `DeviceType' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|106|error: request for member `DriverType' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|107|error: request for member `Fullscreen' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|108|error: request for member `Stencilbuffer' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|109|error: request for member `Vsync' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|110|error: invalid initialization of reference of type 'const irr::SIrrlichtCreationParameters&' from expression of type 'irr::SIrrlichtCreationParameters*'|
..\..\irrlicht-1.6\irrlicht-1.6\include\irrlicht.h|351|error: in passing argument 1 of `irr::IrrlichtDevice* irr::createDeviceEx(const irr::SIrrlichtCreationParameters&)'|
||=== Build finished: 8 errors, 3 warnings ===|
I have been trying to research this and i am getting very confused. Can someone please tell me how to use this correctly?
multum in parvo
you'll need to changeAdler1337 wrote:I have been researching it, and this is what i got:These are the errors i am getting:Code: Select all
irr::SIrrlichtCreationParameters* param; param.Bits = 16; param.DeviceType = EIDT_CONSOLE; param.DriverType = EDT_OPENGL; param.Fullscreen = false; param.Stencilbuffer = false; param.Vsync = false; device = createDeviceEx(param);
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp||In function `int main(int, _TCHAR**)'
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|104|error: request for member `Bits' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|105|error: request for member `DeviceType' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|106|error: request for member `DriverType' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|107|error: request for member `Fullscreen' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|108|error: request for member `Stencilbuffer' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|109|error: request for member `Vsync' in `param', which is of non-class type `irr::SIrrlichtCreationParameters*'|
G:\CodeBlocksGame\MarsCodeBlocks\main.cpp|110|error: invalid initialization of reference of type 'const irr::SIrrlichtCreationParameters&' from expression of type 'irr::SIrrlichtCreationParameters*'|
..\..\irrlicht-1.6\irrlicht-1.6\include\irrlicht.h|351|error: in passing argument 1 of `irr::IrrlichtDevice* irr::createDeviceEx(const irr::SIrrlichtCreationParameters&)'|
||=== Build finished: 8 errors, 3 warnings ===|
I have been trying to research this and i am getting very confused. Can someone please tell me how to use this correctly?
Code: Select all
irr::SIrrlichtCreationParameters* param;
Code: Select all
irr::SIrrlichtCreationParameters param;
@bitplane
I am using Code Blocks on Windows.
@Brkopac
You should really post new replies instead of editing your old ones.
I am using Code Blocks on Windows.
@Brkopac
You should really post new replies instead of editing your old ones.
You wrote:Okay, I'll bite. Why are you trying to use the console device?
You are making me sound like i am crazyI wrote:Tutorial 1 doesn't say anything about EIDT_CONSOLE.
because it looks freakin amazingOkay, I'll bite. Why are you trying to use the console device?
multum in parvo
This works for me, only tested in Wine though:
Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
SIrrlichtCreationParameters params;
params.WindowSize.Width = 79;
params.WindowSize.Height = 23;
params.DeviceType = EIDT_CONSOLE;
IrrlichtDevice *device =
createDeviceEx(params);
if (!device)
return 1;
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
rect<s32>(10,10,260,22), true);
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
if (!mesh)
{
device->drop();
return 1;
}
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation(scene::EMAT_STAND);
node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
}
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
ok i think i found the problem. I got rid of device->getCursorControl()->setVisible(false); and it doesn't error anymore.
I am using a fps camera and i can't see my models. it just keeps printing <-[326;0H(326 counts up. Don't know what number it starts at.) Is this happening because EIDT_CONSOLE doesn't support fps camera(fps camera doesn't seem to move) or is because the camera is not looking at the models or something?
I am using a fps camera and i can't see my models. it just keeps printing <-[326;0H(326 counts up. Don't know what number it starts at.) Is this happening because EIDT_CONSOLE doesn't support fps camera(fps camera doesn't seem to move) or is because the camera is not looking at the models or something?
multum in parvo