little trouble rendering into a custom window.

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
egglord3344
Posts: 5
Joined: Thu Apr 29, 2010 5:12 am

little trouble rendering into a custom window.

Post by egglord3344 »

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

Re: little trouble rendering into a custom window.

Post by sudi »

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 »

no access violation but didn't seem to render to the window. will keep trying thanks
Post Reply