DIRECT3D

hey guys im working on a program that creates a bunch of rectangles to the surface and everything is working fine but im getting an unkown identifier on my d3d parameters... im using visual studio 2010 ultimate i changed my characters to multibyte and i have the d3d9.lib into additional dependencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <windows.h>
#include <d3d9.h>
#include <time.h>
#include <iostream>
using namespace std;

// Application title
const string APPTITLE = "Create Surface Program";

//macro to read the keyboard
#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code)&0x8000)?1:0)

//screen resolution
#define SCREENW 1024
#define SCREENH 768

//Direct3d objects
LPDIRECT3D9 d3d = NULL;
LPDIRECT3DDEVICE9 d3ddev = NULL;
LPDIRECT3DSURFACE9 backbuffer = NULL;
LPDIRECT3DSURFACE9 surface = NULL;

bool gameover = false;

/* Game Initialization function */
bool Game_Init(HWND hWnd)
{
	//initialize Direct3D
	d3d = Direct3DCreate9(D3D_SDK_VERSION);
	if(d3d = NULL)
	{
		MessageBox(hWnd, "Error Initializing Direct3D","Error", MB_OK);
		return false;
	}
	//set the Direct3D presentation paramaters
	D3DPRESENT_PARAMATERS 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 = hWnd;

	//create the direct3d device
	d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev);

	if(!d3ddev)
	{
		MessageBox(hWnd, "Error Creating Direct3D device", "Error", MB_OK);

	}

	//set random number seed
	srand(time(NULL));

	//clear the back buffer
	d3ddev->Clear(0,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,0,0),1.0f,0);

	//create pointer to the back buffer
	d3ddev->GetBackBuffer(0,0,D3DBACKBUFFER_TYPE_MONO,&backbuffer);
the error originated on line 26 D3DPRESENT_PARAMATERS d3dpp;
Line 36
What does the error say? that the struct doesnt exist, D3DP... is unknown?
Last edited on
1 IntelliSense: identifier "D3DPRESENT_PARAMATERS" is undefined c:\users\x d y n a s 7 y\desktop\afternoon\create_surface\create_surface\winmain.cpp 40
It's spelled parameters. D3DPRESENT_PARAMETERS.
omg wow i feel stupid now lol
thanks i appreciate your help i cant believe i didnt catch it lol
Last edited on
Topic archived. No new replies allowed.