Jump to content
  • Advertisement

Jess1997

Member
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

125 Neutral

About Jess1997

  • Rank
    Member
  1. Jess1997

    Attach mesh to bone

    What do you mean? Like, how to go about creating a framework for skeletal animation? Are you using your own engine and mesh/animation format?
  2.   I'll try that and see if it works. Thanks for the suggestion.
  3.   Could the hWnd be invalid even if the window works fine and shows up? If so, that might be the problem, because it doesn't even work with the code directly taken from the sample and the only thing that might differ from the samples is my window.
  4. My swap chain description is exactly the same as the one in the samples. It wasn't before when my buffercount was 1, but since I changed it to 2 like you told me to, it's exactly the same. I really don't get it, but I'll try to see if it could be the handle to my window (Even though my window works properly), because the rest is exactly as it is in the samples (Except for the fact that they use an IDXGISwapChain and then query the interface of a IDXGISwapChain3 right after they're done creating the swap chain, but I doubt it has anything to do with it). Anyway, I really appreciate your help.
  5. I guess so, DirectX 12 is still considered an unfinished product by Microsoft.
  6. Hmm, I did try to change the buffercount to 2 before and it didn't work. If that was a problem, it isn't the only one.
  7.   Well, that's what they use in the samples and it does compile.
  8. Shouldn't every GPU that fully supports DirectX 12 support all of its features?
  9. Hello, ladies and gentlemen.   Today, I've been trying to create a swap chain to no avail and I really can't figure out why.   When I call CreateSwapChain(), it fails with 0x887a0001 (DXGI_ERROR_INVALID_CALL) and the debug layer doesn't even report anything.   The way I create my swap chain is no different than the way the official samples do (The samples run just fine on my computer and my GPU fully support DX12). In fact, the code below is almost the same as the code found in the samples, so where could the problem be?   Any help is appreciated.   Here's the code: bool Renderer::InitializePipeline(HWND hWnd) { HRESULT HR; ID3D12Debug *debugController; HR = D3D12GetDebugInterface(IID_PPV_ARGS(&debugController)); if (SUCCEEDED(HR)) { debugController->EnableDebugLayer(); } HR = D3D12CreateDevice(nullptr, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&device)); if (FAILED(HR)) return false; D3D12_COMMAND_QUEUE_DESC commandQueueDesc = {}; commandQueueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; commandQueueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT; HR = device->CreateCommandQueue(&commandQueueDesc, IID_PPV_ARGS(&commandQueue)); if (FAILED(HR)) return false; DXGI_SWAP_CHAIN_DESC swapChainDesc = {}; swapChainDesc.BufferCount = 2; //Used to be 1, but changed it to 2 thanks to Alessio1989. There's still a problem I haven't figured out... swapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; swapChainDesc.BufferDesc.Height = 600; swapChainDesc.BufferDesc.Width = 800; swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; swapChainDesc.OutputWindow = hWnd; swapChainDesc.SampleDesc.Count = 1; swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; swapChainDesc.Windowed = true; IDXGIFactory4 *factory; HR = CreateDXGIFactory1(IID_PPV_ARGS(&factory)); if (FAILED(HR)) { factory->Release(); return false; } HR = factory->CreateSwapChain(commandQueue, &swapChainDesc, &swapChain); //Fails every single time. factory->Release(); if (FAILED(HR)) debugController->Release(); return false; debugController->Release(); return true; }
  10. Alright, thank you very much. It makes much more sense now.
  11. Lately, I've been trying to draw multiple objects with Direct3D and I just don't understand how I'm supposed to draw different objects on the screen with multiple vertex buffers. On MSDN, I read that a GPU could only hold 16 vertex buffers, so creating one vertex buffer per object doesn't make much sense to me. I know it is possible to put many static meshes into a single vertex buffer, but since mine are dynamic, how am I supposed to do that?
  • 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!