J
Jax50
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 Direct3D
interface
D3DPRESENT_PARAMETERS d3dpp; // create a struct to hold various
device information
ZeroMemory(&d3dpp, sizeof(d3dpp)); // clear out the struct for
use
d3dpp.Windowed = TRUE; // program windowed, not fullscreen
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; // discard old frames
d3dpp.hDeviceWindow = hWnd; // set the window to be used by
Direct3D
// create a device class using this information and the info from
the d3dpp stuct
d3d->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp,
&d3ddev);
return;
}
thanks for the help
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 Direct3D
interface
D3DPRESENT_PARAMETERS d3dpp; // create a struct to hold various
device information
ZeroMemory(&d3dpp, sizeof(d3dpp)); // clear out the struct for
use
d3dpp.Windowed = TRUE; // program windowed, not fullscreen
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; // discard old frames
d3dpp.hDeviceWindow = hWnd; // set the window to be used by
Direct3D
// create a device class using this information and the info from
the d3dpp stuct
d3d->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp,
&d3ddev);
return;
}
thanks for the help