-
newbie question
new to windows graphics programming or what not and am trying to get this include file to work. i cant seem to get it to include like the book says to. i added it to the input folder in the project properties option.
more clearly it said to add this to the project properties then to the input folder in there and the first option to add these files to it and i did and it wont work
2003.net compiler by the way
book said to add. d3d9.lib d3dx9.lib and winmm.lib
thanks
Code:
#include <windows.h>
#include <d3dUtility.h>//THE INCLUDE I CANT GET TO WORK
IDirect3DDevice9* device = 0;
bool setup()
{
return true;
}
void cleanup()
{
}
bool display(float timedelta)
{
if(device)
{
device->Clear(0, 0, D3DCLEAR TARGET | D3DCLEAR ZBUFFER, 0x00000000, 1.0f, 0);
device->Present(0,0,0,0);
}
return true;
}
HRESULT IDirect3DDevice9::Clear(DWORD Count, const D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float z, DWORD Stencil);
LRESULT CALLBACK d3d::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM DESTROY:
::PostQuitMessage(0);
break;
case WM KEYDOWN:
if(wParam == VK ESCAPE)
::DestroyWindow(hwnd);
break
}
return ::DefWindowProc(hwnd,msg,wParam,lParam);
}
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE prevInstance, PSTR cmdLine, int showQmd)
{
if(!d3d::InitD3D(hinstance, 800, 600, true, D3DDEVTYPE HAL, &device));
{
::MessageBox(0, "InitD3D() - Failed",0,0);
return 0;
}
if(!Setup())
{
::MessageBox(0,"Setup() - Failed",0,0);
return 0;
}
d3d::EnterMsgLoop(Display);
Cleanup();
device->Release();
return 0;
}
-
Code:
#include <d3dUtility.h>
That isn't a standard directX header. It is probably something that comes with your book.
-
hmm i thought i did post it oops lol
c:\source\game 3\game 3 proj\TONY.cpp(2): fatal error C1083: Cannot open include file: 'd3dUtility.h': No such file or directory
EDIT: actually i dont know i didnt buy the book i was looking for something for game programming on bittorrent and i stumbled across this big file. as i was originally looking for something i already had but wanted a more up to date version but what i downloaded was 900 MBs worth of tutorials on various topics related to it so i just figured that was a file within the DirectX 9 that i downloaded from microsofts site
it also makes no mention of not using non standard stuff. at least i didnt see any mention of it. so i kind of figured it was a standard header file?