Jump to content
  • Advertisement

Chimmeke

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Chimmeke

  • Rank
    Newbie
  1. Chimmeke

    Some DirectX Warnings

    Unfortunately nothing changes, but it was worth a try...
  2. Chimmeke

    Some DirectX Warnings

    thanks for your response! the code where i create the device: ZeroMemory(&PresentParams, sizeof(D3DPRESENT_PARAMETERS)); PresentParams.BackBufferWidth = Config->Direct3D.Videomode.Width; PresentParams.BackBufferHeight = Config->Direct3D.Videomode.Height; PresentParams.BackBufferFormat = Config->Direct3D.BackbufferFormat; PresentParams.BackBufferCount = 1; PresentParams.MultiSampleType = Config->Direct3D.MultiSampleType; PresentParams.MultiSampleQuality = Config->Direct3D.MultiSampleQuality-1; PresentParams.SwapEffect = D3DSWAPEFFECT_DISCARD; PresentParams.hDeviceWindow = Window; PresentParams.Windowed = Config->Direct3D.Windowed; PresentParams.EnableAutoDepthStencil = TRUE; PresentParams.AutoDepthStencilFormat = Config->Direct3D.ZStencilbufferFormat; PresentParams.Flags = Config->Direct3D.Flags; PresentParams.FullScreen_RefreshRateInHz = Config->Direct3D.Windowed ? D3DPRESENT_RATE_DEFAULT : Config->Direct3D.Videomode.RefreshRate; PresentParams.PresentationInterval = Config->Direct3D.V_SyncEnabled ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE; // Create Device HRESULT hRes; if (FAILED(hRes = D3D->CreateDeviceEx(Config->Direct3D.AdapterID, Config->Direct3D.DeviceType, Window, Config->Direct3D.Flags, &PresentParams, NULL, &D3DDevice))) { ex_ERROR_DIRECTX("Error when creating D3DDevice!", hRes); return ex_ERROR; } PDIRECT3DDEVICE9EX D3DDevice; D3DPRESENT_PARAMETERS PresentParams; this magic Config is just a struct that contains the parameters for the presentation-struct. when i debugged the parameters were the following: PresentParams.BackBufferWidth = 1366; PresentParams.BackBufferHeight = 768; PresentParams.BackBufferFormat = D3DFMT_R5G6B5;; PresentParams.BackBufferCount = 1; PresentParams.MultiSampleType = D3DMULTISAMPLE_8_SAMPLES; PresentParams.MultiSampleQuality = 0; PresentParams.SwapEffect = D3DSWAPEFFECT_DISCARD; PresentParams.hDeviceWindow = Window; PresentParams.Windowed = TRUE; PresentParams.EnableAutoDepthStencil = TRUE; PresentParams.AutoDepthStencilFormat = D3DFMT_D24S8; PresentParams.Flags = D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE; PresentParams.FullScreen_RefreshRateInHz = 0; PresentParams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; the devicetype was D3DDEVTYPE_HAL. my machine should support all these parameters. i took a look on the caps viewer to check the videomodes: the last entry shows that my settings are so far accepted. of course the rest (linke z-stencilbuffer format) aren't considered here, but i assure you that the rest is compatible. now to the drawing of y triangle: the vertexstruct: // +++++++++++++++++++++++++++ // Vertexstruct struct TestVertex { exVector3 Position; exColor Color; static const DWORD FVF; }; const DWORD TestVertex::FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE; TestVertex Vertices[3]; the init: // Set FVF if (FAILED(hRes = D3DDevice->SetFVF(TestVertex::FVF))) { ex_ERROR_DIRECTX("Error when setting FVF", hRes); return ex_ERROR; } the drawing; D3DDevice->BeginScene(); // Draw triangle if (FAILED(hRes = D3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 1, Vertices, sizeof(TestVertex)))) { ex_ERROR_DIRECTX("Error when drawing the triangle!", hRes); return ex_STOP; } D3DDevice->EndScene(); hope i havn't forgotten anything...
  3. Chimmeke

    Some DirectX Warnings

    sorry guys for double-posting, but this thread slowly starts to disappear... if you need more information - tell me.
  4. hi, i get some directx warnings when probably when creating the d3ddevice9. firstly these warnings occur: Direct3D9: (WARN) :No SW device has been registered. GetAdapterCaps fails. D3D9 Helper: IDirect3D9::GetDeviceCaps failed: D3DERR_NOTAVAILABLE Direct3D9: (WARN) :Invalid backbuffer format specified and finally i have thousands of these warnings which are always the same: Direct3D9: (WARN) :Stream 0 stride and vertex size, computed from the current vertex declaration or FVF, are different, which might not work with pre-DX8 drivers and this error: Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present has anybody encountered this problem before? many thanks in advance. edit: for some reason the error doesn't occur anymore.
  5. What an idiot am i? forgot to read msdn... anyway: thanks.
  6. hey guys, i have a problem with multisamplequalities, or rather with allocating them to the presentationstructure. i use CheckDeviceMultiSampleType to get the maximum of quality levels and this works fine (returns 1 level), but when inserting it into the presentationstructure (PresentParams.MultiSampleQuality = MaxMultiSampleQualites;) i get this error: Direct3D9: (ERROR) :Invalid value for MultiSampleQuality. ValidatePresentParameters fails. D3D9 Helper: IDirect3D9::CreateDevice failed: D3DERR_INVALIDCALL many thanks in advance!
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!