Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Nov 2007
Offline Last Active Sep 23 2016 03:17 AM

Posts I've Made

In Topic: Non-trivial union

13 May 2016 - 03:57 AM



unique_ptr::reset() calls the destructor and bang, you're dead, because its internal members are most probably crap.


If you alias an ArrayInfo over the same bytes as ObjectInfo, it can't end well.


unique_ptr and int size is implementation defined, your String is who knows what (pointer + int or an int + pointer or possibly anything). How do you imagine it should work? What are you trying to achieve? The unique_ptr won't be in a healthy state for you to call reset.


Furthermore, the standard says it's only legal to read from the most recently written union member, although actual compilers are less strict.


What you suggest might work, just I wouldn't call a "String" dtor on an instance of a ObjectInfo class :)


But what's the point?

In Topic: D3D12 Reference/Software/WARP device?

07 May 2016 - 12:02 PM

Thank you Alessio, this is exactly what I've failed to find! Your answer will become a pointer to how do it :)

In Topic: vertex shader useless when using geometry shader?

22 February 2016 - 03:20 AM

Exactly, there's a position/parameter cache, however its "key" is the vertex index. If you use index-buffers, the same vertex won't be shaded twice, if shaded recently, and you save a bit.


If you don't use indices, then, I think, it doesn't matter where you put your computation - VS or GS.

In Topic: [D3D12] Use compute shader to write to swap chain backbuffer?

07 December 2015 - 09:36 AM

Side note: Watch out for the "fancy" DMA; for exaple on consoles it can have an unexpectedly shitty performance. Be sure to profile it.

In Topic: Can't Link Shader Program

02 November 2015 - 09:31 AM

This should give you an answer: http://stackoverflow.com/questions/5366416/in-opengl-es-2-0-glsl-where-do-you-need-precision-specifiers


The default precision in fragment and vertex shaders isn't the same smile.png Also be aware that you aren't using GLSL but "OpenGL ES Shading Language" (GLSL ES, if you want). Not the same.