Jump to content
  • Advertisement
Sign in to follow this  
Avont29

error

This topic is 4675 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
that function call returns a value, HRESULT type. Then do a little search in msdn.

Tom#

Share this post


Link to post
Share on other sites
CreateDevice returns hresult error code ... you need to decode it to get the answer. like this :

(hresult is nothing more then long/int)

hResultGlobal = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, mainWindowHandle,
D3DCREATE_HARDWARE_VERTEXPROCESSING |
D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX,
&d3dpp,
&d3dDevice);
if(FAILED(hResultGlobal))
{
switch(hResultGlobal)
{
case D3DERR_DEVICELOST: // The device has been lost but cannot be reset at
// this time. Therefore, rendering is not possible.
{
// do something
}
break;
case D3DERR_INVALIDCALL: // The method call is invalid. For example, a // method's parameter may have an invalid value.
{
// do something
}
break;
case D3DERR_NOTAVAILABLE: // This device does not support the queried // technique.
{
// do something
}
break;
case D3DERR_OUTOFVIDEOMEMORY: // Direct3D does not have enough display // memory to perform the operation.
{
// do something
}
break;
}


it'll show you what's wrong ... i hope :)

Share this post


Link to post
Share on other sites
i'm using jolt3d game engine, you want me to copy and paste that into a blank project or with the project im working on

Share this post


Link to post
Share on other sites
If it's an existing, working game engine and you've never had it running, you should check things like your directx version, drivers etc.

And just a couple of little tips: People prefer it if you edit your posts rather than posting twice. Also, a bit more detail in the question is helpful.

Share this post


Link to post
Share on other sites
i posted that in a blank project, there ae a lot of errors, and it won't run, do i need to incude any include files?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!