I can't believe - framework (wrapper?) doesn't work

Started by
-1 comments, last by BlueChip 19 years, 8 months ago
Hi... for many times I've used MS framework (done by application wizard )... few days ago, I've decided of make my personal, fast and slim wrapper... but it doesn't work... I can't understood because... I've used the same parameters.. maybe I've needed of a long holiday? this is the problem:
Quote: m_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL , m_hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &m_d3dpp, &m_pd3dDevice )
that give me a D3DERR_INVALIDCALL.. if I set debug output level to max, I get Direct3D9: (ERROR) :Invalid sample type specified. CheckDeviceMultiSampleType fails. why?? D3DADAPTER_DEFAULT is a default parameter.... D3DDEVTYPE_HAL is supported by my video board (ATI RADEON9600PRO) m_hWnd is done in this way
Quote: WNDCLASS wndClass = { 0, WndProc, 0, 0, hInstance, LoadIcon( hInstance, MAKEINTRESOURCE(IDI_MAIN_ICON) ), LoadCursor( NULL, IDC_ARROW ), (HBRUSH)GetStockObject(BLACK_BRUSH), NULL, _T("SendellGame") };
and works fine because that return a no null value; D3DCREATE_HARDWARE_VERTEXPROCESSING is ok true? m_d3dpp (maybe where there is an error) is set in this way:
Quote: m_pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm ); m_d3dpp.Windowed = m_bWindowed; m_d3dpp.BackBufferCount = 1; m_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; m_d3dpp.hDeviceWindow = m_hWnd; m_d3dpp.BackBufferFormat = d3ddm.Format; m_d3dpp.EnableAutoDepthStencil = TRUE; m_d3dpp.AutoDepthStencilFormat = D3DFMT_D16; m_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; // no VSYNC m_d3dpp.FullScreen_RefreshRateInHz = d3ddm.RefreshRate;
m_pd3dDevice is ok... of course.. it is an output value... You can help me?? I think that only m_d3dpp can has an error, because is the only parameter that is not done by a function.. so I don't know if is right or not... the others parameters are default DX value or function return value that give me a right value ( I know it cause DX tell me that!) Ok this is all... sorry for my english... I wait yours advices.. bye bye :) :)

This topic is closed to new replies.

Advertisement