| | |
Problem with DirectX3D initiation
![]() |
•
•
Join Date: Oct 2009
Posts: 7
Reputation:
Solved Threads: 0
I try to split up my DirectX stuff and GUI stuff into two classes. It has come to the part where it compiles, but this snippet return false: It is part of the class DxManager, I think it's the hwnd that fails. hwnd is part of the Gui class
Here is the Gui class and here is the DxManager class Anyone that can help me understand what is wrong?
if(FAILED(pd3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pd3dDevice)))
{
MessageBox(NULL, "CD failed!", "Fatal error!", MB_OK);
return false;
}Here is the Gui class
class Gui
{
public:
Gui();
virtual ~Gui();
bool InitWindow(HINSTANCE hInstance);
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
protected:
HINSTANCE hInstance;
HWND hwnd;
private:
int width, height;
};class DxManager : public Gui
{
public:
DxManager();
virtual ~DxManager();
bool InitDirect3D();
void StartRender();
void StopRender();
void CleanUp();
void BlitToSurface();
private:
bool fullscreen;
};![]() |
Similar Threads
- Problem with FormView.FindControl (ASP.NET)
- Image upload problem (PHP)
- Problem with Windows Update and WinXP (Web Browsers)
- Installing Windows 98 On VMware. Floppy problem (Windows 95 / 98 / Me)
- Windows XP keeps restarting since a new video card (Windows NT / 2000 / XP)
- Redhat Linux 6.2 - ipop3d problem? (*nix Software)
- Problem with T720 (Cellphones, PDAs and Handheld Devices)
- Connection Problems (Networking Hardware Configuration)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
Other Threads in the Game Development Forum
- Previous Thread: Graphics on multicores
- Next Thread: Everyone willing to have some work and fun, read this!!!
| Thread Tools | Search this Thread |
3d advertising ai algorithm ban c++ cambridge camera censorship china competition console development engine fov fpx game gamer games gaming gauntanamo government idaho in-gameadvertisement intellectualproperty laracroft live manhunt math mathematics matrix mercenaries microsoft mmorpg modded msn naked news nintendo obama opengl palin physics pirate playstation politics projection ps3 rpg search selection software sony stephenhawking stocks studio technology terrorism tombraider uk videogame web wii world-of-warcraft xbox xbox-live xbox360





