Tag Info

Hot answers tagged

10

Selecting the adapter with the highest available dedicated memory might work in a lot of cases, but in some cases a GPU with less processing power might have more dedicated memory, and your game will still run on the "wrong" adapter. This brings me to a counter-question, what is the right adapter? The one with the most computational power? The one with the ...


3

Not exactly: texture arrays are declared in HLSL as Texture2DArray for Texture2D and not as an array of texture, so it is quite different. They are almost acting as a 3D texture, where the z is a slice of the 2D Texture (in terms of uv, it is the w dimension). The difference with 3D texture is that they are not supporting trilinear interpolation between the ...


3

Now when using the discard presentation in a Win32 app it passes the render target to DWM which then blits the target to the screen and when in full screen mode (provided you have resized your back buffer and refresh rate correctly) it will disable DWM and perform flips to render the scene. Now with metro apps there's no such thing as full screen exclusive ...


2

You've basically already answered your question: Render your scene to a texture of the desired size. Render a full-screen quad with that texture applied. You only need a very simple shader to perform step 2.


2

I would allow the player to choose which video card to use, i.e. through a drop down list in the options menu. You can use the GPU with the highest detected VRAM, clock speed, etc. as a sane default. You could go further and prompt the player to choose between "high performance" and "power saving" (chooses the lowest-spec card) for the default when the ...


2

If you are picking the adapter based on the one with the most memory, you may be having trouble accurately detecting the amount of memory used by Intel HD Graphics. Intel HD Graphics has access to two banks of memory; one dedicated and one shared with the CPU. The size of the two banks are reflected in the DXGI_ADAPTER_DESC structure as DedicatedVideoMemory ...


2

By default, the Direct3D 10 device interface is 'thread-safe' if you don't use D3D10_CREATE_DEVICE_SINGLETHREADED. This means it should work from multiple threads, but could well have lock contention. Direct3D 11.x splits the device into two parts: a Direct3D 11 device interface which is always 'thread-safe' (again unless you use ...


1

You may reuse VertexBuffer objects but this is harder to implement, but as @SeanMiddleditch said in his comment, this shouldn't be your goal, and creating new VBOs shouldn't matter in your application. Currently I allocate one dynamic VertexBuffer per Quad object in my program Per quad is an overkill and is probably the worst. This way your practically ...


1

Your indices produce triangle with mixed winding orders. Have a look at the quad which is formed by your vertices 0, 1, 2, 3. When viewed along the z-axis it looks like this (sorry for the ASCII art): ^ y | 0 | 1 | ----+-----------> x | 2 | 3 Your indices draw 203 which gives a clockwise winding, and then 310 which gives a ...


1

you are making the classic obj to opengl mistake, each int in the index relates to all data of each vertex in the buffers you will want to duplicate the data on reading and fill a singular buffer see the code my answer on SO


1

You will have to put your texture wrap mode to repeat and use UV texture coordinates larger than the usual 0.0 - 1.0 range. Like for example 0.0 - 2.0 on the x axis will repeat your texture twice on the x axis!


1

Clear them when you need them cleared. As discussed in the comments, the performance degradation you are seeing is likely related to the placement of the calls in the relative call stream for the frame, and not specifically the fact that clearing the buffer is "slow" (it should be one of the faster operations available, since implementers know how often it ...


1

Since you expressed interest in learning how to use DirectX, just in the context of your specific challenge, I have to direct you to an outside source. 'Teach me how to use DirectX' is a bit outside the scope of what this is meant for, and any complete answer would be far too long, besides. For decent intro tutorials, I recommend: ...



Only top voted, non community-wiki answers of a minimum length are eligible