This topic is now archived and is closed to further replies.

Direct3D Errors - How to solve

This topic is 5379 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 peoples, I''ve just wrote a programm to manage my Direct3D (will support DirectX 9.0) but I get three errors, I don''t know why. In a tutorial I''ve found in the web it is done the same way. Here''s the error codes I get: error C2660: ''IDirect3D9::GetAdapterModeCount'' : function does not take 1 parameters error C2660: ''IDirect3D9::EnumAdapterModes'' : function does not take 3 parameters error C2660: ''IDirect3DDevice9::GetBackBuffer'' : function does not take 3 parameters And here are the corresponding lines in my code: - DWORD dwAnz_Adapter_Modi = g_lpD3D->GetAdapterModeCount(iAdapter); - g_lpD3D->EnumAdapterModes( iAdapter, iMode, &DisplayMode ); - g_lpD3DDevice->GetBackBuffer(0,D3DBACKBUFFER_TYPE_MONO,&g_lpD3DSBack); All variables are defined and are being accepted. If anybody knows what to do, please help me! Thanks

Share this post

Link to post
Share on other sites
Original post by Pityworm2
If anybody knows what to do, please help me!

RTM perhaps?

UINT GetAdapterModeCount(UINT Adapter,D3DFORMAT Format);


[in] Ordinal number that denotes the display adapter. D3DADAPTER_DEFAULT is always the primary display adapter.
[in] Identifies the format of the surface type using D3DFORMAT. Use IDirect3D9::EnumAdapterModes to see the valid formats.

HRESULT EnumAdapterModes(UINT Adapter,D3DFORMAT Format,UINT Mode,D3DDISPLAYMODE* pMode);

[in] Ordinal number denoting the display adapter to enumerate. D3DADAPTER_DEFAULT is always the primary display adapter. This method returns D3DERR_INVALIDCALL when this value equals or exceeds the number of display adapters in the system.
[in] Allowable pixel formats. The application specifies a pixel format, and the enumeration is restricted to those display modes that exactly match the format. Valid formats are: D3DFMT_X8R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_A2R10G10B10, D3DFMT_X1R5G5B5, D3DFMT_A1R5G5B5, and D3DFMT_R5G6B5, which are members of D3DFORMAT.
[in] Represents the adapter mode. This must be set to the display-mode index, which must be in the range of zero to one less than the value returned by IDirect3D9::GetAdapterModeCount. See Remarks.
[out] Array of display modes. Each is of type D3DDISPLAYMODE. See Remarks.

HRESULT GetBackBuffer(UINT iSwapChain,UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface9 **ppBackBuffer);

[in] An unsigned integer specifying the swap chain.
[in] Index of the back buffer object to return. Back buffers are numbered from 0 to the total number of back buffers - 1. A value of 0 returns the first back buffer, not the front buffer. The front buffer is not accessible through this method.
[in] Stereo view is not supported in Microsoft® DirectX® 9.0, so the only valid value for this parameter is D3DBACKBUFFER_TYPE_MONO.
[out, retval] Address of a pointer to an IDirect3DSurface9 interface, representing the returned back buffer surface.

[edited by - erluk on March 23, 2003 4:32:18 PM]

Share this post

Link to post
Share on other sites