Learning DirectX, can't compile example code
I'm working through Beginning Game Programming (J. Harbour, 3rd Ed) and I've hit a roadblock. The code in the book won't compile, and after reading similar topics here (about the same sample program in the same book) none of the solutions that apparently worked for them are working for me. I tried Harbour's website, but it won't let me view any of the book's help boards without making an account and having it manually approved by an administrator (and three days later, no word from them). /* Beginning Game Programming, 3rd Ed. Chapter 3 Direct3D_Windowed program */ #include <windows.h> #include <d3d9.h> #include <time.h> #include <iostream> using namespace std; #pragma comment(lib,"d3d9.lib") #pragma comment(lib,"d3dx9.lib") //program settings const string APPTITLE = "Direct3D_Windowed"; const int SCREENW = 1024; const int SCREENH = 768; //Direct3D objects LPDIRECT3D9 d3d = NULL; LPDIRECT3DDEVICE9 d3ddev = NULL; bool gameover = false; //macro to detect key presses #define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0) /** ** Game initialization function **/ bool Game_Init(HWND window) { MessageBox(window, "Game_Init", "BREAKPOINT", 0); //initialize Direct3D d3d = Direct3DCreate9(D3D_SDK_VERSION); if (d3d == NULL) { MessageBox(window, "Error initializing Direct3D", "Error", MB_OK); return 0; } //set Direct3D presentation parameters D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8; d3dpp.BackBufferCount = 1; d3dpp.BackBufferWidth = SCREENW; d3dpp.BackBufferHeight = SCREENH; d3dpp.hDeviceWindow = window; //create Direct3D device d3d->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev); if (d3ddev == NULL) { MessageBox(window, "Error creating Direct3D device", "Error", MB_OK); return 0; } return true; } /** ** Game update function **/ void Game_Run(HWND hwnd) { //make sure the Direct3D device is valid if (!d3ddev) return; //clear the backbuffer to bright green d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,255,0), 1.0f, 0); //start rendering if (d3ddev->BeginScene()) { //do something?Direct X Sdk - News
wParam; The only thing I can think of would be that the software I'm using (VC++2010 Express, June 2010 DirectX SDK) and what the author was using (VC++2008, March 2009 DirectX SDK) are just incompatible. I can't really continue with the book without
How do I use it? startmenu -> Microsoft DirectX SDK( whatever version your using ) -> DirectX Utilities -> DirectX Control Panel. then set the debug out put and select "use debug runtimes" option. then run your game again and check the "output window"
This enables DirectX 11 standard discrete graphics and dedicated HD video processing on the one chip for the price of $95. AMD said, "As digital and visual content flourishes, consumers benefit from more responsive multitasking, vivid graphics,
Unfortunately for some reason my Direct3DLoadMeshFromX() function fails at finding the file in my code even thought it's the exact same from the tiger sample in the directx sdk. The only thing I can't copy exactly is the L infront of the "file.x".
Additionally, the quad buffer can be used to add native support for stereo 3D in video games and supports DirectX® 9, 10 and 11. Computer monitors supporting AMD HD3D technology are now shipping from several major vendors, including Acer, LG, Samsung,
Learning DirectX, can't compile example code - GameDev.net
I'm working through Beginning Game Programming (J. Harbour, 3rd Ed) and I've hit a roadblock. The code in the book won't compile, and after reading similar topics here (about the same sample program in the same book) none of the solutions that apparently worked for them are working for me. I tried Harbour's website, but it won't let me view any of the book's help boards without making an account and having it manually approved by an administrator (and three days later, no word from them). /* Beginning Game Programming, 3rd Ed. Chapter 3 Direct3D_Windowed program */ #include <windows.h> #include <d3d9.h> #include <time.h> #include <iostream> using namespace std; #pragma comment(lib,"d3d9.lib") #pragma comment(lib,"d3dx9.lib") //program settings const string APPTITLE = "Direct3D_Windowed"; const int SCREENW = 1024; const int SCREENH = 768; //Direct3D objects LPDIRECT3D9 d3d = NULL; LPDIRECT3DDEVICE9 d3ddev = NULL; bool gameover = false; //macro to detect key presses #define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0) /** ** Game initialization function **/ bool Game_Init(HWND window) { MessageBox(window, "Game_Init", "BREAKPOINT", 0); //initialize Direct3D d3d = Direct3DCreate9(D3D_SDK_VERSION); if (d3d == NULL) { MessageBox(window, "Error initializing Direct3D", "Error", MB_OK); return 0; } //set Direct3D presentation parameters D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8; d3dpp.BackBufferCount = 1; d3dpp.BackBufferWidth = SCREENW; d3dpp.BackBufferHeight = SCREENH; d3dpp.hDeviceWindow = window; //create Direct3D device d3d->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev); if (d3ddev == NULL) { MessageBox(window, "Error creating Direct3D device", "Error", MB_OK); return 0; } return true; } /** ** Game update function **/ void Game_Run(HWND hwnd) { //make sure the Direct3D device is valid if (!d3ddev) return; //clear the backbuffer to bright green d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,255,0), 1.0f, 0); //start rendering if (d3ddev->BeginScene()) { //do something?
Direct X Sdk - Bookshelf
Introduction to 3D game programming with DirectX 9.0c, a shader approach
Using the DirectX SDK Documentation and SDK Samples Direct3D is a huge API and we cannot hope to cover all of its details in this one book. ...Advanced 3D game programming with DirectX 10.0
For these instructions I'm assuming you have installed to C:\Program Files\ Microsoft DirectX SDK (August 2007). If you are using a later version of the SDK ...Advanced Animation with DirectX
Behind you is the power of Microsoft's DirectX SDK; in front of you lies a long and winding road, filled with uncertainty. Before you set off, however, ...DirectX 9 graphics, the definitive guide to Direct3D
DirectX is distributed in two modes by Microsoft: runtime and SDK. ... The DirectX SDK often installs the debug versions of the DirectX DLLs. ...Programming a multiplayer FPS in DirectX
SETTING UP DIRECTX Before we can begin it is very important that you have the DirectX SDK installed on t your system and configured with your compiler. ...Day-after-day Knowledge Directory
Download Details - Microsoft Download Center - DirectX SDK ...
Download the complete DirectX SDK, which contains the DirectX Runtime and all DirectX software required to create DirectX compliant applications.
DirectX Developer Center
Microsoft DirectX: Library, learning resources, downloads, support, and community. Evaluate and find out how to install, deploy, and maintain on DirectX.
Download DirectX Software Development Kit June 2010 9.29.1962 ...
Download DirectX Software Development Kit June 2010 - The complete DirectX SDK containing all DirectX software required to create DirectX compliant ...
MSDN Blogs
When using DirectX SDK (March 2009) or newer, the DirectX SDK should appear ... utilize DirectX SDK resources you should ensure that the DirectX SDK include, ...
directx sdk feb 2010 - FREE Download directx sdk feb 2010 ...
Search directx sdk feb 2010 at soft82.com for free download