Re: best way to init in c++?(DX9)
On Jan 6, 11:05 pm, asm23 <asmwarr...@gmail.com> wrote:
Jax50 wrote:
Hello, i'm trying to find the best way to init in c++, i'v tryed
pointing _HAL -> _REF&32...
what is better? (i'm using the most simple init possible)
void initD3D(HWND hWnd)
{
d3d = Direct3DCreate9(D3D_SDK_VERSION); // create the D=
irect3D
interface
D3DPRESENT_PARAMETERS d3dpp; // create a struct to hold v=
arious
device information
ZeroMemory(&d3dpp, sizeof(d3dpp)); // clear out the struc=
t for
use
d3dpp.Windowed = TRUE; // program windowed, not fullscr=
een
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; // discard ol=
d frames
d3dpp.hDeviceWindow = hWnd; // set the window to be use=
d by
Direct3D
// create a device class using this information and the info fro=
m
the d3dpp stuct
d3d->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hWnd,
D3DCREATE_SOFTWARE_VERTEXPRO=
CESSING,
&d3dpp,
&d3ddev);
return;
}
thanks for the help :)
we are not discussing dx9 here, please try to post at a more suitable
place.- Hide quoted text -
- Show quoted text -
well, thats not a windows nor is it a dx9 question... my question was
about poniter to REF(32), just showed it as directx (vary simple
form). init _REF32. all i want to know is a (void *) _REF(32) will
still link with obj.(cannom test shows NULL**_REF). Thanks for all the
help