Tag Info

New answers tagged

1

The error message indicates that you are mixing static libraries built with one version of Visual C++ (VS 2013) with code built with a different version (VS 2015). This is because the Standard C++ Library cannot be 'mixed' in the same application. If you are using VS 2015, then you should pick the appropriate vcxproj for your platform and toolset using ...


0

Answer: IDirect3DDevice9::SetTexture


1

You can use CheckDeviceFormat to determine if a given D3DFORMAT is suitable for the device's backbuffer; it's unlikely that particular format will be. Instead, try creating the device with any old acceptable backbuffer format (D3DFMT_X8R8G8B8 for example); it doesn't matter since you won't be rendering to it. Then create a new texture with the desired ...


1

The short answer is that DirectX CreateDevice will simply fail without a HWND. However, a HWND can easily be created with this: HWND dummyHWND = CreateWindowA("STATIC", "dummy", NULL, 0, 0, 100, 100, NULL, NULL, NULL, NULL);


4

Totally normal thing to do. You can also render your 3D to one render target and your 2D to a different render target and then draw those over each other in a later pass. That lets you do all sorts of fun tricks, like rendering the 3D in a lower and faster resolution while keeping your 2D in a higher and crisper resolution. This sort of thing is also ...


0

When creating your vertex buffer, specify D3D11_USAGE_DYNAMIC and D3D11_CPU_ACCESS_WRITE in the buffer description (in Usage and CPUAccessFlags members). This will create you a dynamic vertex buffer, which you can update by ID3D11DeviceContext::Map -ping it, copying data to it and ID3D11DeviceContext::Unmap -ping at the end. Something like this: ...


0

It's called GPU skinning (or a variation of it) Add several uniforms that represent the changes. Then add attributes to the vertices that represent how much they are affected by each change. For example bulging would be going towards the normal vector: outPos = MVP*(pos_in + bulgeFactor * normal * bulgeUniform)


3

It's definetly free, but it runs only on windows, which is not. Visual studio is optional, but it is the preferred editor by many developers, especially in professional game development studios. You will also find most samples for it as a Visual studio solution.


1

Many possible reasons why something would not be rendered but if the difference is only in the matrix, here's some that I think might be most likely: Camera is too far (a triangle of size 1 in distance ~1732 with 45 degree FOV might simply be too small to see) You're looking at the triangle from the other side and culling is enabled (seems a bit unlikely ...


0

If you have DYNAMIC buffer and map it with WRITE_DISCARD then both ways are pretty much identical. As soon as you issue map call, DirectX will provide you with brand new buffer, so there will be no CPU-GPU sync, that is the point. You cannot read data in this provided buffer, first because it is a completely new memory and does not contain your data, second ...


0

HLSL is the High Level Shader Language used by Direct X. HLSL Shaders are run on the GPU at runtime and can only be run by the CPU in a special debug mode inside of Visual Studio. HLSL requires a Direct X pipeline to be setup in your application. Visual Studio can compile your shaders for you but you have to load them and feed them to your pipeline. You must ...


2

You can also use the OpenGL Extensions WGL_NV_DX_interop and WGL_NV_DX_interop2 The first one is well supported by Nvidia and AMD and even Intel chips but works only with D3D9 objects. If you want to use DXGI (DirectX 10 and 11) you need to use the second one which only works with Nvidia and some AMD GPUs. By using these extensions you can render to a ...



Top 50 recent answers are included