Jump to content
  • Advertisement
Sign in to follow this  
celios

Getting "Method is invalid call" error message

This topic is 4481 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

Hi, can somebody please help me on this. I'm getting D3DERR_INVALIDCALL and can't get past through it. This is part of the code: d3d = Direct3DCreate9( D3D_SDK_VERSION); if(!d3d){ zError("Unable to create Direct3D Object\n"); return false; } D3DDISPLAYMODE d3disp; ddrval = d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3disp); if( ddrval != D3D_OK) { printf("This is really bad\n"); return false; } D3DFORMAT format = d3disp.Format; ZeroMemory(&pp,sizeof(D3DPRESENT_PARAMETERS)); pp.BackBufferCount= 1; pp.MultiSampleType=D3DMULTISAMPLE_NONE; pp.MultiSampleQuality=0; pp.SwapEffect = D3DSWAPEFFECT_DISCARD; pp.hDeviceWindow=hwnd; pp.Flags=0; pp.FullScreen_RefreshRateInHz=D3DPRESENT_RATE_DEFAULT; pp.PresentationInterval=D3DPRESENT_INTERVAL_DEFAULT; pp.BackBufferFormat=format; pp.EnableAutoDepthStencil=TRUE; pp.AutoDepthStencilFormat = D3DFMT_D16; if(FullScreenDisplay){ pp.Windowed = FALSE; pp.BackBufferWidth = width; pp.BackBufferHeight = height; }else{ pp.Windowed = TRUE; } ddrval = d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &pp, &device); if( ddrval == D3DERR_INVALIDCALL ) { zError("Method call is invalid\n"); return false; } else if( ddrval == D3DERR_NOTAVAILABLE ) { zError("This device does not support the queried technique\n"); return false; } else if( ddrval == D3DERR_OUTOFVIDEOMEMORY ) { zError("Not enough memory\n"); return false; } Is there anything that I missed ? Celios

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!