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.
egglord3344
Posts: 5 Joined: Thu Apr 29, 2010 5:12 am
Post
by egglord3344 » Sun May 30, 2010 10:03 pm
I'm trying to render into a custom window but when i try it says that the device isn't created and i'm setting all the paramets right. anyways, here is what i got:
Code: Select all
NUKE MainForm = MakeWindow(1024,768);
::SetWindowTitle(MainForm,"Cg Editor v1.0");
//make the main window
NUKE CGD3D9 = MakeWindow(800,600,MainForm);
HWND Direct3DWnd = (HWND)GetWindowHWND(CGD3D9);
irr::SIrrlichtCreationParameters params;
params.AntiAlias = false;
params.Bits = 32;
params.DriverType = EDT_DIRECT3D9;
params.EventReceiver = 0;
params.Fullscreen = false;
params.WindowId = CGD3D9;//reinterpret_cast<void*>(&Direct3DWnd);
params.WindowSize.set(800,600);
g_pDevice = createDeviceEx(params);
that seems to be the only thing wrong with it as it just says that the device isn't being created.
sudi
Posts: 1686 Joined: Fri Aug 26, 2005 8:38 pm
Post
by sudi » Sun May 30, 2010 11:14 pm
i would do
Code: Select all
NUKE MainForm = MakeWindow(1024,768);
::SetWindowTitle(MainForm,"Cg Editor v1.0");
//make the main window
NUKE CGD3D9 = MakeWindow(800,600,MainForm);
HWND Direct3DWnd = (HWND)GetWindowHWND(CGD3D9);
irr::SIrrlichtCreationParameters params;
params.AntiAlias = false;
params.Bits = 32;
params.DriverType = EDT_DIRECT3D9;
params.EventReceiver = 0;
params.Fullscreen = false;
params.WindowId = Direct3DWnd;
params.WindowSize.set(800,600);
g_pDevice = createDeviceEx(params);
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
egglord3344
Posts: 5 Joined: Thu Apr 29, 2010 5:12 am
Post
by egglord3344 » Sun May 30, 2010 11:19 pm
no access violation but didn't seem to render to the window. will keep trying thanks