Jump to content

  • Log In with Google      Sign In   
  • Create Account

Adam_42

Member Since 03 Jul 2006
Offline Last Active Private

Posts I've Made

In Topic: Flicker when rendering multiple shapes over image texture

16 July 2016 - 04:29 AM

If you have multiple quads being drawn (say n number of them) then do each of them need to be on a different z-level especially when they are displaying textures ?

 

If you are enabling depth testing and writes then they want different z coordinates.

 

If you just want them to appear in the order you draw them in then disable depth writes and depth tests.


In Topic: D3DXCompileShader Failing on User Computer

13 July 2016 - 04:39 PM

It would be very helpful if we knew exactly what error they were getting. You might want to instrument your code so that if it fails to compile a shader, it logs all of the input parameters as well as the resulting error code.

 

As an random guess as to what could be wrong, your code appears to be multi-threaded, so some sort of race condition could potentially cause it to misbehave much more often on some PCs than others due to timing differences.


In Topic: Interpolating a direction that reverses.

06 July 2016 - 06:00 PM

In general physics simulations tend to give poor results when they are run infrequently, and you've just found one reason for that. It's a good idea to run the physics with a fixed time step (e.g. 1/60 second), and process multiple physics updates for each rendered frame if the game is running slowly.

 

http://gafferongames.com/game-physics/fix-your-timestep/


In Topic: DirectXMath - storing transform matrices

15 June 2016 - 03:19 PM

If you use the "vectorcall" calling convention it should be returned from the function in registers.


In Topic: DirectXMath - storing transform matrices

14 June 2016 - 05:15 PM

The simple option is to override global operator new and call _aligned_malloc (or similar) from it. If you do that you can make every heap allocation 16-byte aligned, with only a few lines of code in one place.

Doing that also means you can do things like putting aligned types in a std::vector.

Note that there's several variants of operator new and delete that you'll need to replace - you want to change the non-throwing variants as well.

 

Also note that if you compile as x64 instead of x86 then you don't need to do any of that. The standard heap allocation alignment on 64-bit Windows is 16 bytes.


PARTNERS