best way to init in c++?(DX9)

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 :)
 
I

Ian Collins

Jax50 said:
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)

Another windows question? Try a more topical group.
 
A

asm23

Jax50 said:
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 :)
we are not discussing dx9 here, please try to post at a more suitable
place.
 
J

Jax50

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
 
I

Ian Collins

Jax50 said:
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

Neither _REF32, REF(32) or _REF(32) appear in your code, as we said, try
somewhere more topical.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,184
Messages
2,570,976
Members
47,533
Latest member
medikillz39

Latest Threads

Top