Browse Source

introduce vertex and index buffer for each 3d model

Kolja Strohm 2 years ago
parent
commit
551183b7ce
39 changed files with 8035 additions and 3147 deletions
  1. 16 16
      Cube.cpp
  2. 4 3
      Cube.h
  3. 55 32
      DX11GraphicsApi.cpp
  4. 44 27
      DX11PixelShader.hlsl
  5. 172 0
      DX12Buffer.cpp
  6. 59 0
      DX12Buffer.h
  7. 13 13
      DX12CommandQueue.cpp
  8. 14 14
      DX12CommandQueue.h
  9. 100 74
      DX12GraphicsApi.cpp
  10. 29 29
      DX12PixelShader.h
  11. 130 0
      DX12Shader.cpp
  12. 79 0
      DX12Shader.h
  13. 115 0
      DX12Textur.cpp
  14. 32 0
      DX12Textur.h
  15. 26 26
      DX12VertexShader.h
  16. 22 12
      DX9GraphicsApi.cpp
  17. 8 176
      DXBuffer.cpp
  18. 11 64
      DXBuffer.h
  19. 10 3
      Framework.vcxproj
  20. 36 9
      Framework.vcxproj.filters
  21. 16 26
      Global.cpp
  22. 12 15
      Globals.h
  23. 50 3
      GraphicsApi.cpp
  24. 96 75
      GraphicsApi.h
  25. 80 78
      M3Datei.cpp
  26. 16 15
      M3Datei.h
  27. 42 3
      Model3D.cpp
  28. 12 3
      Model3D.h
  29. 12 34
      Model3DList.cpp
  30. 11 15
      Model3DList.h
  31. 15 141
      Shader.cpp
  32. 15 87
      Shader.h
  33. 10 120
      Textur.cpp
  34. 11 37
      Textur.h
  35. 35 28
      TexturModel.cpp
  36. 3 2
      TexturModel.h
  37. 2506 1947
      UIPixelShader.h
  38. 20 20
      UIVertexShader.h
  39. 4098 0
      d3dx12.h

+ 16 - 16
Cube.cpp

@@ -4,6 +4,7 @@
 #include "Model3DList.h"
 #include "TexturList.h"
 #include "DXBuffer.h"
+#include "GraphicsApi.h"
 
 using namespace Framework;
 
@@ -11,29 +12,28 @@ using namespace Framework;
 
 // Konstruktor
 //  size: Die Größe des Würfels
-Cube::Cube( float size )
+Cube::Cube( float size, GraphicsApi* zApi )
     : Model3D()
 {
-    if( m3dRegister->hatModel( Standart3DTypes::cube ) )
-        model = m3dRegister->getModel( Standart3DTypes::cube );
+    if( zApi->hasModel( Standart3DTypes::cube ) )
+        model = zApi->getModel( Standart3DTypes::cube );
     else
     {
-        model = new Model3DData();
-        m3dRegister->addModel( dynamic_cast<Model3DData *>( model->getThis() ), Standart3DTypes::cube );
+        model = zApi->createModel( Standart3DTypes::cube );
         float stdSize = 100;
         float left, right, top, bottom;
         // Calculate the screen coordinates of the left side of the bitmap.
-        left = (float)( ( stdSize / 2.0 ) * -1 );
+        left = (float)((stdSize / 2.0) * -1);
         // Calculate the screen coordinates of the right side of the bitmap.
         right = left + (float)stdSize;
         // Calculate the screen coordinates of the top of the bitmap.
-        top = (float)( stdSize / 2.0 );
+        top = (float)(stdSize / 2.0);
         // Calculate the screen coordinates of the bottom of the bitmap.
         bottom = top - (float)stdSize;
         float front = -stdSize / 2;
         float back = front + stdSize;
 
-        Vertex3D *vertecies = new Vertex3D[ 24 ];
+        Vertex3D* vertecies = new Vertex3D[ 24 ];
         for( int i = 0; i < 24; i++ )
             vertecies[ i ].knochenId = 0;
         vertecies[ 0 ].pos = Vec3<float >( left, top, front );
@@ -90,7 +90,7 @@ Cube::Cube( float size )
         model->setVertecies( vertecies, 24 );
 
         // front side
-        Polygon3D *p = new Polygon3D();
+        Polygon3D* p = new Polygon3D();
         p->indexAnz = 6;
         p->indexList = new int[ p->indexAnz ];
         p->indexList[ 0 ] = 0;
@@ -162,13 +162,13 @@ Cube::Cube( float size )
 
 // Setzt die Textur des Würfels, so dass sie an allen Seiten gleich ist
 //  textur: Die Textur
-void Cube::setTextur( Textur *textur )
+void Cube::setTextur( Textur* textur )
 {
-    this->textur->setPolygonTextur( LINKS, dynamic_cast<Textur *>( textur->getThis() ) );
-    this->textur->setPolygonTextur( OBEN, dynamic_cast<Textur *>( textur->getThis() ) );
-    this->textur->setPolygonTextur( RECHTS, dynamic_cast<Textur *>( textur->getThis() ) );
-    this->textur->setPolygonTextur( UNTEN, dynamic_cast<Textur *>( textur->getThis() ) );
-    this->textur->setPolygonTextur( VORNE, dynamic_cast<Textur *>( textur->getThis() ) );
+    this->textur->setPolygonTextur( LINKS, dynamic_cast<Textur*>(textur->getThis()) );
+    this->textur->setPolygonTextur( OBEN, dynamic_cast<Textur*>(textur->getThis()) );
+    this->textur->setPolygonTextur( RECHTS, dynamic_cast<Textur*>(textur->getThis()) );
+    this->textur->setPolygonTextur( UNTEN, dynamic_cast<Textur*>(textur->getThis()) );
+    this->textur->setPolygonTextur( VORNE, dynamic_cast<Textur*>(textur->getThis()) );
     this->textur->setPolygonTextur( HINTEN, textur );
     rend = 1;
 }
@@ -176,7 +176,7 @@ void Cube::setTextur( Textur *textur )
 // Setzt die Textur von einer bestimmten Seite des Würfels
 //  textur: Die Textur
 //  s: Die Seite, die gesetzt werden soll
-void Cube::setTextur( Textur *textur, CubeSeite s )
+void Cube::setTextur( Textur* textur, CubeSeite s )
 {
     this->textur->setPolygonTextur( s, textur );
     rend = 1;

+ 4 - 3
Cube.h

@@ -5,6 +5,7 @@
 namespace Framework
 {
     class Textur;
+    class GraphicsApi;
 
     enum CubeSeite
     {
@@ -22,13 +23,13 @@ namespace Framework
     public:
         //! Konstruktor
         //! \param size Die Größe des Würfels
-        DLLEXPORT Cube( float size );
+        DLLEXPORT Cube( float size, GraphicsApi* zApi );
         //! Setzt die Textur des Würfels, so dass sie an allen Seiten gleich ist
         //! \param textur Die Textur
-        DLLEXPORT void setTextur( Textur *textur );
+        DLLEXPORT void setTextur( Textur* textur );
         //! Setzt die Textur von einer bestimmten Seite des Würfels
         //! \param textur Die Textur
         //! \param s Die Seite, die gesetzt werden soll
-        DLLEXPORT void setTextur( Textur *textur, CubeSeite s );
+        DLLEXPORT void setTextur( Textur* textur, CubeSeite s );
     };
 }

+ 55 - 32
DX11GraphicsApi.cpp

@@ -12,12 +12,19 @@
 #include "UIPixelShader.h"
 #include "Kam3D.h"
 #include "Welt3D.h"
+#include "Model3DList.h"
 
 #include <d3d11.h>
 #include <dxgi1_5.h>
 
 using namespace Framework;
 
+struct TexturEffect
+{
+    bool enabled;
+    float percentage;
+};
+
 DirectX11::DirectX11()
     : GraphicsApi( DIRECTX11 ),
     d3d11Device( 0 ),
@@ -34,23 +41,17 @@ DirectX11::DirectX11()
     depthDisabledStencilState( 0 ),
     blendStateAlphaBlend( 0 ),
     vp( 0 ),
-    texturModel( new TexturModel() ),
+    texturModel( 0 ),
     texturRegister( new TexturList() ),
     texturRS( 0 ),
     meshRS( 0 ),
     defaultTextur( 0 ),
     diffuseLights( 0 ),
-    pointLights( 0 ),
-    vertexBuffer( 0 ),
-    indexBuffer( 0 )
+    pointLights( 0 )
 {}
 
 DirectX11::~DirectX11()
 {
-    if( vertexBuffer )
-        vertexBuffer->release();
-    if( indexBuffer )
-        indexBuffer->release();
     if( diffuseLights )
         diffuseLights->release();
     if( pointLights )
@@ -61,7 +62,8 @@ DirectX11::~DirectX11()
         texturRS->Release();
     if( meshRS )
         meshRS->Release();
-    texturModel->release();
+    if( texturModel )
+        texturModel->release();
     texturRegister->release();
     if( blendStateAlphaBlend )
     {
@@ -380,10 +382,14 @@ void DirectX11::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
 
     pixelShader->erstelleConstBuffer( sizeof( float ) * 3, 0 ); // Kamera Position
     pixelShader->erstelleConstBuffer( sizeof( float ) * 3, 1 ); // materialkonstanten nach phong model
-    pixelShader->erstelleConstBuffer( sizeof( int ) * 2, 2 ); // materialkonstanten nach phong model
+    pixelShader->erstelleConstBuffer( sizeof( int ) * 2, 2 );
+    pixelShader->erstelleConstBuffer( sizeof( TexturEffect ), 3 );
     // TODO: Remove Following Test Code
     int lc[] = { 0, 0 };
     pixelShader->füllConstBuffer( (char*)lc, 2, sizeof( int ) * 2 );
+    TexturEffect e = { 0, 0.f };
+    pixelShader->füllConstBuffer( (char*)&e, 3, sizeof( TexturEffect ) );
+
 
     // Create a texture sampler state description.
     D3D11_SAMPLER_DESC samplerDesc;
@@ -417,6 +423,7 @@ void DirectX11::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
 
     uiTextur = createOrGetTextur( "_f_Render_Bild", renderB );
 
+    texturModel = new TexturModel( this );
     texturModel->setSize( this->backBufferSize );
     texturModel->setTextur( dynamic_cast<Textur*>(uiTextur->getThis()) );
 
@@ -473,23 +480,22 @@ void DirectX11::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
     b->neuBild( 10, 10, 0xFFFFFFFF );
     defaultTextur = createOrGetTextur( "_default_textur", b );
 
-    vertexBuffer = new DX11Buffer( sizeof( Vertex3D ), d3d11Device, d3d11Context, D3D11_BIND_VERTEX_BUFFER );
-    indexBuffer = new DX11Buffer( sizeof( int ), d3d11Device, d3d11Context, D3D11_BIND_INDEX_BUFFER );
-
     diffuseLights = new DX11StructuredBuffer( sizeof( DiffuseLight ), d3d11Device, d3d11Context );
     pointLights = new DX11StructuredBuffer( sizeof( PointLight ), d3d11Device, d3d11Context );
 }
 
 void DirectX11::update()
 {
+    modelList->removeAll();
+    if( texturModel )
+    {
+        texturModel->release();
+        texturModel = 0;
+    }
     if( pointLights )
         pointLights = (DX11StructuredBuffer*)pointLights->release();
     if( diffuseLights )
         diffuseLights = (DX11StructuredBuffer*)diffuseLights->release();
-    if( vertexBuffer )
-        vertexBuffer = (DX11Buffer*)vertexBuffer->release();
-    if( indexBuffer )
-        indexBuffer = (DX11Buffer*)indexBuffer->release();
     if( texturRS )
     {
         texturRS->Release();
@@ -600,16 +606,8 @@ void DirectX11::renderObject( Model3D* zObj )
     if( !zObj->zModelData() )
         return;
     int curId = zObj->zModelData()->getId();
-    if( lastModelId < 0 || lastModelId != curId )
-    {
-        vertexBuffer->setData( (void*)zObj->zVertexBuffer() );
-        vertexBuffer->setLength( sizeof( Vertex3D ) * zObj->getVertexAnzahl() );
-        vertexBuffer->copieren();
-        indexBuffer->setData( (void*)zObj->zModelData()->getIndexBuffer() );
-        indexBuffer->setLength( sizeof( int ) * zObj->zModelData()->getIndexCount() );
-        indexBuffer->copieren();
-        lastModelId = curId;
-    }
+    zObj->zModelData()->zDXVertexBuffer()->copieren();
+    zObj->zModelData()->zDXIndexBuffer()->copieren();
     Mat4< float > trans = Mat4< float >::identity();
     int anz = zObj->errechneMatrizen( trans, matrixBuffer );
     if( vertexShader )
@@ -621,12 +619,27 @@ void DirectX11::renderObject( Model3D* zObj )
     if( pixelShader )
         pixelShader->füllConstBuffer( (char*)matirialBuffer, 1, sizeof( float ) * 3 );
     unsigned int offset = 0;
-    unsigned int es = (unsigned)vertexBuffer->getElementLength();
-    ID3D11Buffer* vBuffer = vertexBuffer->zBuffer();
+    unsigned int es = (unsigned)zObj->zModelData()->zDXVertexBuffer()->getElementLength();
+    ID3D11Buffer* vBuffer = ((DX11Buffer*)zObj->zModelData()->zDXVertexBuffer())->zBuffer();
     d3d11Context->IASetVertexBuffers( 0, 1, &vBuffer, &es, &offset );
     Model3DTextur* zTextur = zObj->zTextur();
     int ind = 0;
     int current = 0;
+    if( zObj->zEffectTextur() )
+    {
+        ID3D11ShaderResourceView* v[ 1 ];
+        v[ 0 ] = *(DX11Textur*)zObj->zEffectTextur();
+        d3d11Context->PSSetShaderResources( 3, 1, v );
+        TexturEffect e = { 1, zObj->getEffectPercentage() };
+        if( pixelShader )
+            pixelShader->füllConstBuffer( (char*)&e, 3, sizeof( TexturEffect ) );
+    }
+    else
+    {
+        TexturEffect e = { 0, 0.f };
+        if( pixelShader )
+            pixelShader->füllConstBuffer( (char*)&e, 3, sizeof( TexturEffect ) );
+    }
     for( auto i = zObj->zModelData()->getPolygons(); i; i++ )
     {
         if( zObj->needRenderPolygon( ind ) )
@@ -635,11 +648,11 @@ void DirectX11::renderObject( Model3D* zObj )
             if( t && t->brauchtUpdate() )
                 t->updateTextur();
             DXGI_FORMAT f = DXGI_FORMAT_R32_UINT;
-            if( indexBuffer->getElementLength() == 2 )
+            if( zObj->zModelData()->zDXIndexBuffer()->getElementLength() == 2 )
                 f = DXGI_FORMAT_R16_UINT;
-            if( indexBuffer->getElementLength() == 1 )
+            if( zObj->zModelData()->zDXIndexBuffer()->getElementLength() == 1 )
                 f = DXGI_FORMAT_R8_UINT;
-            d3d11Context->IASetIndexBuffer( indexBuffer->zBuffer(), f, 0 );
+            d3d11Context->IASetIndexBuffer( ((DX11Buffer*)zObj->zModelData()->zDXIndexBuffer())->zBuffer(), f, 0 );
             d3d11Context->IASetPrimitiveTopology( D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST );
             if( t )
             {
@@ -917,4 +930,14 @@ bool DirectX11::isAvailable()
     getDLLRegister()->releaseDLL( "dxgi.dll" );
     getDLLRegister()->releaseDLL( "d3d11.dll" );
     return 0;
+}
+
+DXBuffer* DirectX11::createIndexBuffer()
+{
+    return new DX11Buffer( sizeof( int ), d3d11Device, d3d11Context, D3D11_BIND_INDEX_BUFFER );
+}
+
+DXBuffer* DirectX11::createVertexBuffer()
+{
+    return new DX11Buffer( sizeof( Vertex3D ), d3d11Device, d3d11Context, D3D11_BIND_VERTEX_BUFFER );
 }

+ 44 - 27
DX11PixelShader.hlsl

@@ -1,27 +1,28 @@
 /////////////                                                                                           
 // GLOBALS //                                                                                           
 /////////////                                                                                           
-Texture2D shaderTexture : register( t0 );
+Texture2D shaderTexture : register(t0);
 SamplerState SampleType;
 
 // The position of the kamera
-cbuffer Kamera : register( b0 )
+cbuffer Kamera : register(b0)
 {
     float4 kPosition;
 }
 
 // these values should sum up to 1
-cbuffer Material : register( b1 )
+cbuffer Material : register(b1)
 {
     float ambientFactor;
     float diffusFactor;
     float specularFactor;
 };
 
-cbuffer LightCount : register( b2 )
+cbuffer LightCount : register(b2)
 {
     int diffuseLightCount;
     int pointLightCount;
+    int effectCount;
 }
 
 // lights
@@ -38,8 +39,15 @@ struct PointLight
     float radius;
 };
 
-StructuredBuffer< DiffuseLight > difuseLights : register( t1 );
-StructuredBuffer< PointLight > pointLights : register( t2 );
+cbuffer TexturEffect : register(b3)
+{
+    bool effectEnabled;
+    float effectPercentage;
+};
+
+StructuredBuffer< DiffuseLight > difuseLights : register(t1);
+StructuredBuffer< PointLight > pointLights : register(t2);
+Texture2D additionalTexture : register(t3);
 
 //////////////                                                                                          
 // TYPEDEFS //                                                                                          
@@ -57,8 +65,8 @@ struct PixelInputType
 ////////////////////////////////////////////////////////////////////////////////                        
 float4 TexturePixelShader( PixelInputType input ) : SV_TARGET
 {
-    float3 diffuseLight = float3( 0, 0, 0 );
-    float3 specularLight = float3( 0, 0, 0 );
+    float3 diffuseLight = float3(0, 0, 0);
+    float3 specularLight = float3(0, 0, 0);
     for( int j = 0; j < diffuseLightCount; j++ )
     {
         if( dot( input.normal, -difuseLights[ j ].direction ) < 0 )
@@ -69,10 +77,10 @@ float4 TexturePixelShader( PixelInputType input ) : SV_TARGET
     {
         float3 lightDir = pointLights[ i ].position - input.worldPos.xyz;
         float factor;
-		if (length(lightDir) < 1)
-			factor = 1;
-		else
-			factor = pointLights[i].radius / length(lightDir);
+        if( length( lightDir ) < 1 )
+            factor = 1;
+        else
+            factor = pointLights[ i ].radius / length( lightDir );
         float f = dot( input.normal, normalize( lightDir ) );
         if( f > 0 )
         {
@@ -82,22 +90,31 @@ float4 TexturePixelShader( PixelInputType input ) : SV_TARGET
                 specularLight += pointLights[ i ].color * f * factor;
         }
     }
-	//if (!(diffuseLight.x >= 0 && diffuseLight.x <= 1))
-	//	diffuseLight.x = 0;
+    //if (!(diffuseLight.x >= 0 && diffuseLight.x <= 1))
+    //	diffuseLight.x = 0;
     float4 materialColor = shaderTexture.Sample( SampleType, input.tex );
-    float4 textureColor = saturate( (materialColor * ambientFactor) + (float4( diffuseLight.x, diffuseLight.y, diffuseLight.z, 0 ) * diffusFactor) + (float4( specularLight.x, specularLight.y, specularLight.z, 0 ) * specularFactor) );
+    if( effectEnabled )
+    {
+        float dist = sqrt( (input.tex.x - 0.5f) * (input.tex.x - 0.5f) + (input.tex.y - 0.5f) * (input.tex.y - 0.5f) ) / sqrt( 0.5f );
+        if( dist < effectPercentage )
+        {
+            float4 effectColor = additionalTexture.Sample( SampleType, input.tex );
+            materialColor = effectColor * effectColor.a + materialColor * (1 - effectColor.a);
+        }
+    }
+    float4 textureColor = saturate( (materialColor * ambientFactor) + (float4(diffuseLight.x, diffuseLight.y, diffuseLight.z, 0) * diffusFactor) + (float4(specularLight.x, specularLight.y, specularLight.z, 0) * specularFactor) );
     textureColor.a = materialColor.a;
-	if(isnan(diffuseLight.x * diffusFactor))
-		textureColor = materialColor;
-	return textureColor;
+    if( isnan( diffuseLight.x * diffusFactor ) )
+        textureColor = materialColor;
+    return textureColor;
     //return textureColor;
-	//if (diffusFactor == 0)
-	//	return float4(1, 1, 0, 1);
-	/*if (isnan(diffuseLight.x) || isnan(diffusFactor) || isinf(diffuseLight.x) || isinf(-diffuseLight.x))
-		return float4(0, 1, 1, 1);
-	if (isnan(diffuseLight.x - diffuseLight.x) && isnan(diffuseLight.x * diffusFactor) )
-		return float4(1, 1, 1, 1);
-	if ((diffuseLight.x * diffusFactor) != 0 && (diffuseLight.x * diffusFactor) != -0)
-		return float4(0, 0, 1, 1);
-	return float4(0, 1, 0, 1);*/
+    //if (diffusFactor == 0)
+    //	return float4(1, 1, 0, 1);
+    /*if (isnan(diffuseLight.x) || isnan(diffusFactor) || isinf(diffuseLight.x) || isinf(-diffuseLight.x))
+        return float4(0, 1, 1, 1);
+    if (isnan(diffuseLight.x - diffuseLight.x) && isnan(diffuseLight.x * diffusFactor) )
+        return float4(1, 1, 1, 1);
+    if ((diffuseLight.x * diffusFactor) != 0 && (diffuseLight.x * diffusFactor) != -0)
+        return float4(0, 0, 1, 1);
+    return float4(0, 1, 0, 1);*/
 }

+ 172 - 0
DX12Buffer.cpp

@@ -0,0 +1,172 @@
+#pragma once
+#include "DX12Buffer.h"
+#include "d3dx12.h"
+#include "DX12CommandQueue.h"
+
+using namespace Framework;
+
+// Konstruktor
+// eSize: Die Länge eines Elementes in Bytes
+DX12Buffer::DX12Buffer( int eSize, ID3D12Device* device, ID3D12GraphicsCommandList* list, int flags )
+    : DXBuffer( eSize ),
+    buffer( 0 ),
+    intermediate( 0 ),
+    device( device ),
+    list( list )
+{
+    description = new D3D12_RESOURCE_DESC();
+    ZeroMemory( description, sizeof( D3D12_RESOURCE_DESC ) );
+    description->Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+    description->Height = 1;
+    description->DepthOrArraySize = 1;
+    description->MipLevels = 1;
+    description->Format = DXGI_FORMAT_UNKNOWN;
+    description->SampleDesc.Count = 1;
+    description->Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+    description->Flags = (D3D12_RESOURCE_FLAGS)flags;
+}
+
+// Destruktor
+DX12Buffer::~DX12Buffer()
+{
+    if( intermediate )
+        intermediate->Release();
+    if( buffer )
+        buffer->Release();
+    delete description;
+}
+
+// Kopiert die Daten in den Buffer, fals sie sich verändert haben
+void DX12Buffer::copieren( int byteCount )
+{
+    if( !len )
+        return;
+    if( byteCount < 0 )
+        byteCount = len;
+    if( description->Width < len )
+    {
+        if( intermediate )
+            intermediate->Release();
+        if( buffer )
+            buffer->Release();
+        buffer = 0;
+        description->Width = len;
+    }
+    if( !buffer )
+    {
+        D3D12_HEAP_PROPERTIES hprop;
+        hprop.Type = D3D12_HEAP_TYPE_UPLOAD;
+        hprop.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+        hprop.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+        hprop.CreationNodeMask = 1;
+        hprop.VisibleNodeMask = 1;
+        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, description, D3D12_RESOURCE_STATE_GENERIC_READ, 0, __uuidof(ID3D12Resource), (void**)&buffer );
+        hprop.Type = D3D12_HEAP_TYPE_UPLOAD;
+        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, description, D3D12_RESOURCE_STATE_GENERIC_READ, 0, __uuidof(ID3D12Resource), (void**)&intermediate );
+        if( data )
+            changed = 1;
+    }
+    if( changed && data )
+    {
+        BYTE* pData;
+        D3D12_RANGE r;
+        r.Begin = 0;
+        r.End = 0;
+        buffer->Map( 0, &r, (void**)&pData );
+        memcpy( pData, data, byteCount );
+        r.End = byteCount;
+        buffer->Unmap( 0, &r );
+        //list->CopyBufferRegion( buffer, 0, intermediate, 0, len );
+        changed = 0;
+    }
+}
+
+// Gibt den Buffer zurück
+ID3D12Resource* DX12Buffer::zBuffer() const
+{
+    return buffer;
+}
+
+
+DX12IndexBuffer::DX12IndexBuffer( int eSize, ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct )
+    : DX12Buffer( eSize, device, copy->getCommandList(), D3D12_RESOURCE_FLAG_NONE ),
+    copy( copy ),
+    direct( direct )
+{
+    ibs = 0;
+}
+
+DX12IndexBuffer::~DX12IndexBuffer()
+{}
+
+// Kopiert die Daten in den Buffer, fals sie sich verändert haben
+void DX12IndexBuffer::copieren( int byteCount )
+{
+    /*if( ibs )
+    {
+        D3D12_RESOURCE_BARRIER barrier;
+        barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+        barrier.Transition.pResource = buffer;
+        barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_INDEX_BUFFER;
+        barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
+        barrier.Transition.Subresource = 0;
+        barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+        direct->getCommandList()->ResourceBarrier( 1, &barrier );
+        direct->execute();
+        ibs = 0;
+    }*/
+    DX12Buffer::copieren( byteCount );
+    //copy->execute();
+    /*D3D12_RESOURCE_BARRIER barrier;
+    barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+    barrier.Transition.pResource = buffer;
+    barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+    barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_INDEX_BUFFER;
+    barrier.Transition.Subresource = 0;
+    barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+    direct->getCommandList()->ResourceBarrier( 1, &barrier );
+    direct->execute();
+    ibs = 1;*/
+}
+
+
+DX12VertexBuffer::DX12VertexBuffer( int eSize, ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct )
+    : DX12Buffer( eSize, device, copy->getCommandList(), D3D12_RESOURCE_FLAG_NONE ),
+    copy( copy ),
+    direct( direct )
+{
+    vbs = 0;
+}
+
+DX12VertexBuffer::~DX12VertexBuffer()
+{}
+
+// Kopiert die Daten in den Buffer, fals sie sich verändert haben
+void DX12VertexBuffer::copieren( int byteCount )
+{
+    /*if( vbs )
+    {
+        D3D12_RESOURCE_BARRIER barrier;
+        barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+        barrier.Transition.pResource = buffer;
+        barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
+        barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
+        barrier.Transition.Subresource = 0;
+        barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+        direct->getCommandList()->ResourceBarrier( 1, &barrier );
+        direct->execute();
+        vbs = 0;
+    }*/
+    DX12Buffer::copieren( byteCount );
+    //copy->execute();
+    /*D3D12_RESOURCE_BARRIER barrier;
+    barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+    barrier.Transition.pResource = buffer;
+    barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+    barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
+    barrier.Transition.Subresource = 0;
+    barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+    direct->getCommandList()->ResourceBarrier( 1, &barrier );
+    direct->execute();
+    vbs = 1;*/
+}

+ 59 - 0
DX12Buffer.h

@@ -0,0 +1,59 @@
+#pragma once
+#include "DXBuffer.h"
+
+struct ID3D12Resource;
+struct ID3D12Device;
+struct D3D12_RESOURCE_DESC;
+struct ID3D12GraphicsCommandList;
+
+namespace Framework
+{
+    //! Ein Buffer mit Daten im Grafikspeicher
+    class DX12Buffer : public DXBuffer
+    {
+    protected:
+        D3D12_RESOURCE_DESC* description;
+        ID3D12Resource* buffer;
+        ID3D12Resource* intermediate;
+        ID3D12Device* device;
+        ID3D12GraphicsCommandList* list;
+    public:
+        //! Konstruktor
+        //! eSize: Die Länge eines Elementes in Bytes
+        DLLEXPORT DX12Buffer( int eSize, ID3D12Device* device, ID3D12GraphicsCommandList* list, int bindFlags );
+        //! Destruktor
+        DLLEXPORT virtual ~DX12Buffer();
+        //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
+        DLLEXPORT void copieren( int byteCount = -1 ) override;
+        //! Gibt den Buffer zurück
+        DLLEXPORT ID3D12Resource* zBuffer() const;
+    };
+
+    class DX12IndexBuffer : public DX12Buffer
+    {
+    private:
+        bool ibs;
+        DX12DirectCommandQueue* direct;
+        DX12CopyCommandQueue* copy;
+
+    public:
+        DX12IndexBuffer( int eSize, ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
+        ~DX12IndexBuffer();
+        //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
+        DLLEXPORT void copieren( int byteCount = -1 ) override;
+    };
+
+    class DX12VertexBuffer : public DX12Buffer
+    {
+    private:
+        bool vbs;
+        DX12DirectCommandQueue* direct;
+        DX12CopyCommandQueue* copy;
+
+    public:
+        DX12VertexBuffer( int eSize, ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
+        ~DX12VertexBuffer();
+        //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
+        DLLEXPORT void copieren( int byteCount = -1 ) override;
+    };
+}

+ 13 - 13
DXCommandQueue.cpp → DX12CommandQueue.cpp

@@ -1,4 +1,4 @@
-#include "DXCommandQueue.h"
+#include "DX12CommandQueue.h"
 #include "Text.h"
 #include "Fenster.h"
 
@@ -8,7 +8,7 @@
 using namespace Framework;
 
 
-DX12CommandQueue::DX12CommandQueue( int typ, ID3D12Device2 *device )
+DX12CommandQueue::DX12CommandQueue( int typ, ID3D12Device* device )
     : ReferenceCounter(),
     device( device ),
     event( CreateEvent( 0, 0, 0, 0 ) ),
@@ -19,28 +19,28 @@ DX12CommandQueue::DX12CommandQueue( int typ, ID3D12Device2 *device )
     desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_NORMAL;
     desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
     desc.NodeMask = 0;
-    HRESULT res = device->CreateCommandQueue( &desc, __uuidof( ID3D12CommandQueue ), (void **)& queue );
+    HRESULT res = device->CreateCommandQueue( &desc, __uuidof(ID3D12CommandQueue), (void**)&queue );
     if( FAILED( res ) )
     {
         std::cout << "ERROR: CreateCommandQueue returned " << res << "\n";
         WMessageBox( 0, new Text( "Fehler" ), new Text( "CreateCommandQueue ist Fehlgeschlagen." ), MB_ICONERROR );
     }
 
-    res = device->CreateCommandAllocator( (D3D12_COMMAND_LIST_TYPE)typ, __uuidof( ID3D12CommandAllocator ), (void **)& allocator );
+    res = device->CreateCommandAllocator( (D3D12_COMMAND_LIST_TYPE)typ, __uuidof(ID3D12CommandAllocator), (void**)&allocator );
     if( FAILED( res ) )
     {
         std::cout << "ERROR: CreateCommandAllocator returned " << res << "\n";
         WMessageBox( 0, new Text( "Fehler" ), new Text( "CreateCommandAllocator ist Fehlgeschlagen." ), MB_ICONERROR );
     }
 
-    res = device->CreateCommandList( 0, (D3D12_COMMAND_LIST_TYPE)typ, allocator, nullptr, __uuidof( ID3D12GraphicsCommandList ), (void **)& commandList );
+    res = device->CreateCommandList( 0, (D3D12_COMMAND_LIST_TYPE)typ, allocator, nullptr, __uuidof(ID3D12GraphicsCommandList), (void**)&commandList );
     if( FAILED( res ) )
     {
         std::cout << "ERROR: CreateCommandList returned " << res << "\n";
         WMessageBox( 0, new Text( "Fehler" ), new Text( "CreateCommandList ist Fehlgeschlagen." ), MB_ICONERROR );
     }
 
-    res = device->CreateFence( 0, D3D12_FENCE_FLAG_NONE, __uuidof( ID3D12Fence ), (void **)& fence );
+    res = device->CreateFence( 0, D3D12_FENCE_FLAG_NONE, __uuidof(ID3D12Fence), (void**)&fence );
     if( FAILED( res ) )
     {
         std::cout << "ERROR: CreateFence returned " << res << "\n";
@@ -88,17 +88,17 @@ void DX12CommandQueue::flush()
     whaitForGPUSignal( addSignalFromGPU() );
 }
 
-ID3D12CommandAllocator *DX12CommandQueue::getAllocator() const
+ID3D12CommandAllocator* DX12CommandQueue::getAllocator() const
 {
     return allocator;
 }
 
-ID3D12GraphicsCommandList2 *DX12CommandQueue::getCommandList() const
+ID3D12GraphicsCommandList* DX12CommandQueue::getCommandList() const
 {
     return commandList;
 }
 
-ID3D12CommandQueue *DX12CommandQueue::getQueue() const
+ID3D12CommandQueue* DX12CommandQueue::getQueue() const
 {
     return queue;
 }
@@ -106,23 +106,23 @@ ID3D12CommandQueue *DX12CommandQueue::getQueue() const
 void DX12CommandQueue::execute()
 {
     commandList->Close();
-    queue->ExecuteCommandLists( 1, (ID3D12CommandList * *)& commandList );
+    queue->ExecuteCommandLists( 1, (ID3D12CommandList**)&commandList );
     flush();
     allocator->Reset();
     commandList->Reset( allocator, nullptr );
 }
 
 
-DX12DirectCommandQueue::DX12DirectCommandQueue( ID3D12Device2 *device )
+DX12DirectCommandQueue::DX12DirectCommandQueue( ID3D12Device* device )
     : DX12CommandQueue( D3D12_COMMAND_LIST_TYPE_DIRECT, device )
 {}
 
 
-DX12CopyCommandQueue::DX12CopyCommandQueue( ID3D12Device2 * device )
+DX12CopyCommandQueue::DX12CopyCommandQueue( ID3D12Device* device )
     : DX12CommandQueue( D3D12_COMMAND_LIST_TYPE_COPY, device )
 {}
 
 
-DX12ComputeCommandQueue::DX12ComputeCommandQueue( ID3D12Device2 * device )
+DX12ComputeCommandQueue::DX12ComputeCommandQueue( ID3D12Device* device )
     : DX12CommandQueue( D3D12_COMMAND_LIST_TYPE_COMPUTE, device )
 {}

+ 14 - 14
DXCommandQueue.h → DX12CommandQueue.h

@@ -7,8 +7,8 @@
 struct ID3D12CommandAllocator;
 struct ID3D12CommandQueue;
 struct ID3D12Fence;
-struct ID3D12Device2;
-struct ID3D12GraphicsCommandList2;
+struct ID3D12Device;
+struct ID3D12GraphicsCommandList;
 
 namespace Framework
 {
@@ -17,15 +17,15 @@ namespace Framework
     class DX12CommandQueue : public virtual ReferenceCounter
     {
     protected:
-        ID3D12CommandAllocator *allocator;
-        ID3D12GraphicsCommandList2 *commandList;
-        ID3D12CommandQueue *queue;
-        ID3D12Fence *fence;
-        ID3D12Device2 *device;
+        ID3D12CommandAllocator* allocator;
+        ID3D12GraphicsCommandList* commandList;
+        ID3D12CommandQueue* queue;
+        ID3D12Fence* fence;
+        ID3D12Device* device;
         HANDLE event;
         unsigned __int64 fenceValue;
 
-        DX12CommandQueue( int typ, ID3D12Device2 *device );
+        DX12CommandQueue( int typ, ID3D12Device* device );
 
     public:
         virtual ~DX12CommandQueue();
@@ -33,27 +33,27 @@ namespace Framework
         void whaitForGPUSignal();
         void whaitForGPUSignal( unsigned __int64 value );
         void flush();
-        ID3D12CommandAllocator *getAllocator() const;
-        ID3D12GraphicsCommandList2 *getCommandList() const;
-        ID3D12CommandQueue *getQueue() const;
+        ID3D12CommandAllocator* getAllocator() const;
+        ID3D12GraphicsCommandList* getCommandList() const;
+        ID3D12CommandQueue* getQueue() const;
         void execute();
     };
 
     class DX12DirectCommandQueue : public DX12CommandQueue
     {
     public:
-        DX12DirectCommandQueue( ID3D12Device2 *device );
+        DX12DirectCommandQueue( ID3D12Device* device );
     };
 
     class DX12CopyCommandQueue : public DX12CommandQueue
     {
     public:
-        DX12CopyCommandQueue( ID3D12Device2 *device );
+        DX12CopyCommandQueue( ID3D12Device* device );
     };
 
     class DX12ComputeCommandQueue : public DX12CommandQueue
     {
     public:
-        DX12ComputeCommandQueue( ID3D12Device2 *device );
+        DX12ComputeCommandQueue( ID3D12Device* device );
     };
 };

+ 100 - 74
DX12GraphicsApi.cpp

@@ -2,23 +2,26 @@
 #include "Globals.h"
 #include "DLLRegister.h"
 #include "Fenster.h"
-#include "DXCommandQueue.h"
-#include "DXBuffer.h"
+#include "DX12CommandQueue.h"
+#include "DX12Buffer.h"
 #include "Model3D.h"
 #include "Kam3D.h"
 #include "Welt3D.h"
 #include "TexturModel.h"
-#include "Textur.h"
+#include "DX12Textur.h"
 #include "Bild.h"
 #include "TexturList.h"
 #include "Shader.h"
 #include "DX12PixelShader.h"
 #include "DX12VertexShader.h"
+#include "d3dx12.h"
+#include "DX12Shader.h"
+#include "Model3DList.h"
 
 #include <d3d11.h>
 #include <d3d12.h>
-#include <dxgi1_5.h>
-#include <d3dx12.h>
+#include <dxgi1_6.h>
+#include <dxgidebug.h>
 
 using namespace Framework;
 
@@ -41,8 +44,6 @@ DirectX12::DirectX12()
     allowedRenderArea( 0 ),
     vertexBufferView( 0 ),
     indexBufferView( 0 ),
-    vertexBuffer( 0 ),
-    indexBuffer( 0 ),
     signature( 0 ),
     pipeline( 0 ),
     texturModel( 0 ),
@@ -91,10 +92,6 @@ DirectX12::~DirectX12()
         pipeline->Release();
     if( signature )
         signature->Release();
-    if( indexBuffer )
-        indexBuffer->release();
-    if( vertexBuffer )
-        vertexBuffer->release();
     delete indexBufferView;
     delete vertexBufferView;
     delete allowedRenderArea;
@@ -127,6 +124,8 @@ typedef HRESULT( __stdcall* D3D12CreateDeviceFunction )(IDXGIAdapter*, D3D_FEATU
 
 typedef HRESULT( __stdcall* D3D12GetDebugInterfaceFunction )(REFIID, void**);
 
+typedef HRESULT( __stdcall* DXGIGetDebugInterface1Function )(UINT Flags, REFIID riid, _COM_Outptr_ void** pDebug);
+
 void DirectX12::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen )
 {
     if( device )
@@ -162,23 +161,28 @@ void DirectX12::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
         WMessageBox( fenster->getFensterHandle(), new Text( "Fehler" ), new Text( "Der Einstiegspunkt D3D12CreateDevice fon DirectX 12 konnte nicht gefunden werden." ), MB_ICONERROR );
         return;
     }
-    D3D12SerializeVersionedRootSignatureFunction d3d12svrsf = (D3D12SerializeVersionedRootSignatureFunction)GetProcAddress( d3d12DLL, "D3D12SerializeVersionedRootSignature" );
-    D3D12SerializeRootSignatureFunction d3d12srsf = (D3D12SerializeRootSignatureFunction)GetProcAddress( d3d12DLL, "D3D12SerializeRootSignature" );
+    PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE d3d12svrsf = (PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE)GetProcAddress( d3d12DLL, "D3D12SerializeVersionedRootSignature" );
+    PFN_D3D12_SERIALIZE_ROOT_SIGNATURE d3d12srsf = (PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)GetProcAddress( d3d12DLL, "D3D12SerializeRootSignature" );
+    bool debugDXGI = 0;
+    IDXGIInfoQueue* dxgiInfoQueue;
 #ifdef _DEBUG
     if( debugDX )
     {
         D3D12GetDebugInterfaceFunction getDebugInterface = (D3D12GetDebugInterfaceFunction)GetProcAddress( d3d12DLL, "D3D12GetDebugInterface" );
-        getDebugInterface( __uuidof(ID3D12Debug), (void**)&debug );
-        debug->EnableDebugLayer();
+        if( SUCCEEDED( getDebugInterface( __uuidof(ID3D12Debug), (void**)&debug ) ) )
+            debug->EnableDebugLayer();
+        DXGIGetDebugInterface1Function dxgiDebugInterface = (DXGIGetDebugInterface1Function)GetProcAddress( dxgiDLL, "DXGIGetDebugInterface1" );
+        if( SUCCEEDED( dxgiDebugInterface( 0, __uuidof(IDXGIInfoQueue), (void**)&dxgiInfoQueue ) ) )
+            debugDXGI = 1;
     }
 #endif
-    IDXGIFactory4* factory;
+    IDXGIFactory6* factory;
     UINT createFactoryFlags = 0;
 #if defined(_DEBUG)
-    if( debugDX )
+    if( debugDX && debugDXGI )
         createFactoryFlags = DXGI_CREATE_FACTORY_DEBUG;
 #endif
-    HRESULT res = createFactory( createFactoryFlags, __uuidof(IDXGIFactory4), (void**)&factory );
+    HRESULT res = createFactory( createFactoryFlags, __uuidof(IDXGIFactory6), (void**)&factory );
     if( FAILED( res ) )
     {
         getDLLRegister()->releaseDLL( "dxgi.dll" );
@@ -187,34 +191,42 @@ void DirectX12::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
         WMessageBox( fenster->getFensterHandle(), new Text( "Fehler" ), new Text( "createFactory ist Fehlgeschlagen." ), MB_ICONERROR );
         return;
     }
-    int index = 0;
-    unsigned __int64 maxVideoMemory = 0;
-    IDXGIAdapter1* best = 0;
-    do
+    IDXGIAdapter1* adapter = 0;
+    for( UINT adapterID = 0; DXGI_ERROR_NOT_FOUND != factory->EnumAdapterByGpuPreference( adapterID, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, __uuidof(IDXGIAdapter1), (void**)&adapter ); ++adapterID )
     {
-        IDXGIAdapter1* current;
-        res = factory->EnumAdapters1( index++, &current );
-        if( res == S_OK )
+        DXGI_ADAPTER_DESC1 desc;
+        adapter->GetDesc1( &desc );
+
+        if( desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE )
         {
-            ID3D12Device2* device = 0;
-            DXGI_ADAPTER_DESC1 dxgiAdapterDesc1;
-            current->GetDesc1( &dxgiAdapterDesc1 );
-            if( (dxgiAdapterDesc1.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) == 0 &&
-                dxgiAdapterDesc1.DedicatedVideoMemory > maxVideoMemory &&
-                SUCCEEDED( createDevice( current, D3D_FEATURE_LEVEL_12_1, __uuidof(ID3D12Device2), (void**)&device ) ) )
-            {
-                device->Release();
-                if( best )
-                    best->Release();
-                best = current;
-                maxVideoMemory = dxgiAdapterDesc1.DedicatedVideoMemory;
-            }
-            else
-                current->Release();
+            // Don't select the Basic Render Driver adapter.
+            continue;
         }
-    } while( res != DXGI_ERROR_NOT_FOUND );
-    res = createDevice( best, D3D_FEATURE_LEVEL_12_0, __uuidof(ID3D12Device2), (void**)&device );
-    best->Release();
+
+        // Check to see if the adapter supports Direct3D 12, but don't create the actual device yet.
+        if( SUCCEEDED( createDevice( adapter, D3D_FEATURE_LEVEL_12_1, _uuidof( ID3D12Device ), nullptr ) ) )
+        {
+            wchar_t buff[ 256 ] = {};
+            swprintf_s( buff, L"Direct3D Adapter (%u): VID:%04X, PID:%04X - %ls\n", adapterID, desc.VendorId, desc.DeviceId, desc.Description );
+            std::cout << buff;
+            break;
+        }
+    }
+    if( !adapter )
+    {
+        if( FAILED( factory->EnumWarpAdapter( _uuidof( IDXGIAdapter1 ), (void**)&adapter ) ) )
+            std::cout << "ERROR: WARP12 not available. Enable the 'Graphics Tools' optional feature";
+    }
+    if( !adapter )
+    {
+        factory->Release();
+        getDLLRegister()->releaseDLL( "dxgi.dll" );
+        getDLLRegister()->releaseDLL( "d3d12.dll" );
+        WMessageBox( fenster->getFensterHandle(), new Text( "Fehler" ), new Text( "Es wurde keine passende Grafigkarte gefunden." ), MB_ICONERROR );
+        return;
+    }
+    res = createDevice( adapter, D3D_FEATURE_LEVEL_12_1, __uuidof(ID3D12Device5), (void**)&device );
+    adapter->Release();
     if( FAILED( res ) )
     {
         factory->Release();
@@ -224,23 +236,33 @@ void DirectX12::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
         WMessageBox( fenster->getFensterHandle(), new Text( "Fehler" ), new Text( "createDevice ist Fehlgeschlagen." ), MB_ICONERROR );
         return;
     }
+    D3D12_FEATURE_DATA_D3D12_OPTIONS5 featureSupportData = {};
+    device->CheckFeatureSupport( D3D12_FEATURE_D3D12_OPTIONS5, &featureSupportData, sizeof( featureSupportData ) );
+    if( featureSupportData.RaytracingTier < D3D12_RAYTRACING_TIER_1_0 )
+    {
+        device->Release();
+        factory->Release();
+        getDLLRegister()->releaseDLL( "dxgi.dll" );
+        getDLLRegister()->releaseDLL( "d3d12.dll" );
+        std::cout << "ERROR: Raytracing is not available\n";
+        WMessageBox( fenster->getFensterHandle(), new Text( "Fehler" ), new Text( "Raytracing ist nicht verfügbar. DirectX12 kann nicht verwendet werden." ), MB_ICONERROR );
+        return;
+    }
     res = device->QueryInterface( __uuidof(ID3D12InfoQueue), (void**)&infoQueue );
     if( SUCCEEDED( res ) )
     {
-        infoQueue->SetBreakOnSeverity( D3D12_MESSAGE_SEVERITY_CORRUPTION, TRUE );
-        infoQueue->SetBreakOnSeverity( D3D12_MESSAGE_SEVERITY_ERROR, TRUE );
-        infoQueue->SetBreakOnSeverity( D3D12_MESSAGE_SEVERITY_WARNING, TRUE );
-
-        /*D3D12_MESSAGE_SEVERITY Severities[] =
+        if( debugDX )
         {
-          //  D3D12_MESSAGE_SEVERITY_INFO
-        };*/
+            infoQueue->SetBreakOnSeverity( D3D12_MESSAGE_SEVERITY_CORRUPTION, TRUE );
+            infoQueue->SetBreakOnSeverity( D3D12_MESSAGE_SEVERITY_ERROR, TRUE );
+            infoQueue->SetBreakOnSeverity( D3D12_MESSAGE_SEVERITY_WARNING, TRUE );
+        }
 
         // Suppress individual messages by their ID
         D3D12_MESSAGE_ID DenyIds[] = {
-            D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE,   // I'm really not sure how to avoid this message.
-            D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE,                         // This warning occurs when using capture frame while graphics debugging.
-            D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE,                       // This warning occurs when using capture frame while graphics debugging.
+            // D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE,   // I'm really not sure how to avoid this message.
+             D3D12_MESSAGE_ID_MAP_INVALID_NULLRANGE,                         // This warning occurs when using capture frame while graphics debugging.
+             D3D12_MESSAGE_ID_UNMAP_INVALID_NULLRANGE,                       // This warning occurs when using capture frame while graphics debugging.
         };
 
         D3D12_INFO_QUEUE_FILTER NewFilter = {};
@@ -299,7 +321,7 @@ void DirectX12::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
     factory->MakeWindowAssociation( fenster->getFensterHandle(), DXGI_MWA_NO_ALT_ENTER );
 
     D3D12_DESCRIPTOR_HEAP_DESC rtvhdesc = {};
-    rtvhdesc.NumDescriptors = 2;
+    rtvhdesc.NumDescriptors = 2; // back buffer count
     rtvhdesc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
     res = device->CreateDescriptorHeap( &rtvhdesc, __uuidof(ID3D12DescriptorHeap), (void**)&rtvHeap );
     if( FAILED( res ) )
@@ -346,10 +368,7 @@ void DirectX12::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fu
     allowedRenderArea->right = LONG_MAX;
     allowedRenderArea->bottom = LONG_MAX;
 
-    vertexBuffer = new DX12VertexBuffer( sizeof( Vertex3D ), device, copyCommandQueue, directCommandQueue );
-    indexBuffer = new DX12IndexBuffer( sizeof( int ), device, copyCommandQueue, directCommandQueue );
-
-    texturModel = new TexturModel();
+    texturModel = new TexturModel( this );
 
     Bild* renderB = new Bild( 1 );
     renderB->setAlpha3D( 1 );
@@ -600,6 +619,7 @@ void DirectX12::update()
     directCommandQueue->flush();
     copyCommandQueue->flush();
     computeCommandQueue->flush();
+    modelList->removeAll();
     HINSTANCE dxgiDLL = getDLLRegister()->ladeDLL( "dxgi.dll", "dxgi.dll" );
     if( !dxgiDLL )
     {
@@ -760,10 +780,9 @@ void DirectX12::beginFrame( bool fill2D, bool fill3D, int fillColor )
 
 void DirectX12::renderObject( Model3D* zObj )
 {
-    vertexBuffer->setData( (void*)texturModel->zVertexBuffer() );
-    vertexBuffer->setLength( sizeof( Vertex3D ) * texturModel->getVertexAnzahl() );
-    vertexBuffer->copieren();
     Mat4< float > trans = Mat4< float >::identity();
+    zObj->zModelData()->zDXVertexBuffer()->copieren();
+    zObj->zModelData()->zDXIndexBuffer()->copieren();
     int anz = zObj->errechneMatrizen( trans, matrixBuffer );
     if( vertexShader )
         vertexShader->füllConstBuffer( (char*)matrixBuffer, 1, sizeof( Mat4< float > ) * anz );
@@ -774,23 +793,20 @@ void DirectX12::renderObject( Model3D* zObj )
     if( pixelShader )
         pixelShader->füllConstBuffer( (char*)matirialBuffer, 3, sizeof( float ) * 3 );
     unsigned int offset = 0;
-    unsigned int es = (unsigned)vertexBuffer->getElementLength();
+    unsigned int es = (unsigned)zObj->zModelData()->zDXVertexBuffer()->getElementLength();
     Model3DTextur* zTextur = zObj->zTextur();
     int ind = 0;
     for( auto i = zObj->zModelData()->getPolygons(); i; i++ )
     {
         if( zObj->needRenderPolygon( ind ) )
         {
-            indexBuffer->setData( i->indexList );
-            indexBuffer->setLength( sizeof( int ) * i->indexAnz );
-            indexBuffer->copieren();
             Textur* t = zTextur->zPolygonTextur( ind );
             //if( t &&t->brauchtUpdate() )
             //    t->updateTextur();
             DXGI_FORMAT f = DXGI_FORMAT_R32_UINT;
-            if( indexBuffer->getElementLength() == 2 )
+            if( zObj->zModelData()->zDXIndexBuffer()->getElementLength() == 2 )
                 f = DXGI_FORMAT_R16_UINT;
-            if( indexBuffer->getElementLength() == 1 )
+            if( zObj->zModelData()->zDXIndexBuffer()->getElementLength() == 1 )
                 f = DXGI_FORMAT_R8_UINT;
             indexBufferView->Format = f;
             if( t )
@@ -811,14 +827,14 @@ void DirectX12::renderObject( Model3D* zObj )
                 D3D12_CPU_DESCRIPTOR_HANDLE rtv = rtvHeap->GetCPUDescriptorHandleForHeapStart();
                 rtv.ptr += rtvDescriptorSize * backBufferIndex;
                 directCommandQueue->getCommandList()->OMSetRenderTargets( 1, &rtv, 0, 0 );
-                indexBufferView->SizeInBytes = indexBuffer->getElementAnzahl() * indexBuffer->getElementLength();
-                indexBufferView->BufferLocation = indexBuffer->zBuffer()->GetGPUVirtualAddress();
+                indexBufferView->SizeInBytes = zObj->zModelData()->zDXIndexBuffer()->getElementAnzahl() * zObj->zModelData()->zDXIndexBuffer()->getElementLength();
+                indexBufferView->BufferLocation = ((DX12Buffer*)zObj->zModelData()->zDXIndexBuffer())->zBuffer()->GetGPUVirtualAddress();
                 directCommandQueue->getCommandList()->IASetIndexBuffer( indexBufferView );
-                vertexBufferView->SizeInBytes = vertexBuffer->getElementAnzahl() * vertexBuffer->getElementLength();
-                vertexBufferView->BufferLocation = vertexBuffer->zBuffer()->GetGPUVirtualAddress();
+                vertexBufferView->SizeInBytes = zObj->zModelData()->zDXVertexBuffer()->getElementAnzahl() * zObj->zModelData()->zDXVertexBuffer()->getElementLength();
+                vertexBufferView->BufferLocation = ((DX12Buffer*)zObj->zModelData()->zDXVertexBuffer())->zBuffer()->GetGPUVirtualAddress();
                 directCommandQueue->getCommandList()->IASetVertexBuffers( 0, 1, vertexBufferView );
                 directCommandQueue->getCommandList()->IASetPrimitiveTopology( D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST );
-                directCommandQueue->getCommandList()->DrawIndexedInstanced( indexBuffer->getElementAnzahl(), 1, 0, 0, 0 );
+                directCommandQueue->getCommandList()->DrawIndexedInstanced( zObj->zModelData()->zDXIndexBuffer()->getElementAnzahl(), 1, 0, 0, 0 );
             }
             else
             {
@@ -1024,9 +1040,9 @@ bool DirectX12::isAvailable()
         {
             DXGI_ADAPTER_DESC1 dxgiAdapterDesc1;
             current->GetDesc1( &dxgiAdapterDesc1 );
-            ID3D12Device2* device = 0;
+            ID3D12Device5* device = 0;
             if( (dxgiAdapterDesc1.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) == 0 &&
-                SUCCEEDED( createDevice( current, D3D_FEATURE_LEVEL_12_1, __uuidof(ID3D12Device2), (void**)&device ) ) )
+                SUCCEEDED( createDevice( current, D3D_FEATURE_LEVEL_12_1, __uuidof(ID3D12Device5), (void**)&device ) ) )
             {
                 device->Release();
                 current->Release();
@@ -1045,4 +1061,14 @@ bool DirectX12::isAvailable()
     getDLLRegister()->releaseDLL( "dxgi.dll" );
     getDLLRegister()->releaseDLL( "d3d12.dll" );
     return 0;
+}
+
+DXBuffer* DirectX12::createIndexBuffer()
+{
+    return new DX12IndexBuffer( sizeof( int ), device, copyCommandQueue, directCommandQueue );
+}
+
+DXBuffer* DirectX12::createVertexBuffer()
+{
+    return new DX12VertexBuffer( sizeof( Vertex3D ), device, copyCommandQueue, directCommandQueue );
 }

+ 29 - 29
DX12PixelShader.h

@@ -92,10 +92,10 @@ ret
 
 const BYTE DX12PixelShaderBytes[] =
 {
-     68,  88,  66,  67, 174,  73, 
-    236, 208,  61, 207, 110, 134, 
-     13, 212, 188,  24, 208,  73, 
-     14,  59,   1,   0,   0,   0, 
+     68,  88,  66,  67, 203, 157, 
+    125, 132, 134,  90,  12, 118, 
+     95,  22,  61,  76, 155, 240, 
+    133, 147,   1,   0,   0,   0, 
     184,  91,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
      36,   2,   0,   0, 188,   2, 
@@ -763,11 +763,11 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 148,  46, 
-     49,   1, 213, 106, 170,  97, 
-      1,   0,   0,   0, 224, 185, 
-    133, 133,  52, 228,  31,  73, 
-    145,  72, 151, 149, 229, 231, 
-     74, 241,   0,   0,   0,   0, 
+     49,   1,   5, 126, 208,  97, 
+      1,   0,   0,   0, 238, 244, 
+    205,  57,  53, 176,  76,  78, 
+    141, 123, 176,  88,  73, 150, 
+    113, 141,   0,   0,   0,   0, 
       0,   0,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -938,14 +938,14 @@ const BYTE DX12PixelShaderBytes[] =
       3,   0, 242,  56,   1,   0, 
      43, 236,   3,   0,  28,  19, 
       2,   0,  65,  36,   1,   0, 
-    236, 179,   1,   0, 187,  26, 
+    236, 179,   1,   0, 208, 236, 
       0,   0, 125,  10,   2,   0, 
-    125, 181,   2,   0, 200,  81, 
-      2,   0, 193,  33,   3,   0, 
+    125, 181,   2,   0, 138, 128, 
+      1,   0, 193,  33,   3,   0, 
      65, 185,   2,   0, 140, 239, 
       1,   0, 246,  49,   0,   0, 
-    213, 255,   0,   0, 115, 108, 
-      0,   0, 202, 179,   0,   0, 
+    213, 255,   0,   0,  46, 248, 
+      2,   0, 202, 179,   0,   0, 
       0,  16,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1788,7 +1788,7 @@ const BYTE DX12PixelShaderBytes[] =
     117, 114, 101,  50,  68,  32, 
     115, 104,  97, 100,  27, 226, 
      48,   1, 128,   0,   0,   0, 
-    222, 203, 137, 243, 120, 232, 
+    155,  48,  84, 186,  42, 255, 
     215,   1,   1,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1875,8 +1875,8 @@ const BYTE DX12PixelShaderBytes[] =
       4,   0,   0,   0,  66,   0, 
      60,  17,  16,   1,   0,   0, 
       0,   1,  10,   0,   1,   0, 
-     15,   0, 171,  63,  10,   0, 
-      1,   0,  15,   0, 171,  63, 
+    173,   2,  97,  74,  10,   0, 
+      1,   0, 173,   2,  97,  74, 
      77, 105,  99, 114, 111, 115, 
     111, 102, 116,  32,  40,  82, 
      41,  32,  72,  76,  83,  76, 
@@ -2348,14 +2348,14 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,  23,   0,   1,   0, 
       5,  16,   0,   0,  14,   0, 
      23,  21,   0,  16,   0,   0, 
-      3,   2,   0,   0,   0,   0, 
+      3,   2, 192,  74,   0,   0, 
     242, 241,  10,   0,  24,  21, 
       8,  16,   0,   0,   1,   0, 
       1,   0,  10,   0,  24,  21, 
       9,  16,   0,   0,   1,   0, 
       0,   2,  14,   0,  23,  21, 
       0,   0,   0,   0,  10,   2, 
-      0,   0,   0,   0, 242, 241, 
+    192,  74,   0,   0, 242, 241, 
      10,   0,  24,  21,  11,  16, 
       0,   0,   1,   0,   1,   0, 
      10,   0,  24,  21,  12,  16, 
@@ -2382,7 +2382,7 @@ const BYTE DX12PixelShaderBytes[] =
      24,  21,  15,  16,   0,   0, 
       1,   0,   1,   0,  14,   0, 
      23,  21,  16,  16,   0,   0, 
-     36,   2,   0,   0,   0,   0, 
+     36,   2,   0, 128,   0,   0, 
     242, 241,  10,   0,  24,  21, 
      11, 202,  49,   1,  56,   0, 
       0,   0,   0,  16,   0,   0, 
@@ -3408,11 +3408,11 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 213, 106, 
-    170,  97,   1,   0,   0,   0, 
-    224, 185, 133, 133,  52, 228, 
-     31,  73, 145,  72, 151, 149, 
-    229, 231,  74, 241, 128,   0, 
+    148,  46,  49,   1,   5, 126, 
+    208,  97,   1,   0,   0,   0, 
+    238, 244, 205,  57,  53, 176, 
+     76,  78, 141, 123, 176,  88, 
+     73, 150, 113, 141, 128,   0, 
       0,   0,  47,  76, 105, 110, 
     107,  73, 110, 102, 111,   0, 
      47, 110,  97, 109, 101, 115, 
@@ -3495,9 +3495,9 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0, 255, 255, 255, 255, 
     119,   9,  49,   1,   1,   0, 
-      0,   0,  13,   0,  10, 140, 
-     14,   0, 180, 156,  15,   0, 
-     11,   0,  76,   0,   0,   0, 
+      0,   0,  13,   0,   0, 142, 
+     14,   0,  63,  92,  15,   0, 
+      0,   0,  76,   0,   0,   0, 
      32,   0,   0,   0,  44,   0, 
       0,   0,  96,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3512,7 +3512,7 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   2,   0,   9,   0, 
     220,   4,   0,   0,   0,   0, 
       0,   0, 156,   1,   0,   0, 
-      1,   0, 234,  65,   0,   0, 
+      1,   0,  20,  78,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 109,  97, 
     105, 110,   0, 110, 111, 110, 

+ 130 - 0
DX12Shader.cpp

@@ -0,0 +1,130 @@
+#include "DX12Shader.h"
+#include "d3dx12.h"
+#include "DX12CommandQueue.h"
+
+using namespace Framework;
+
+DX12Shader::DX12Shader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct )
+    : Shader()
+{
+    shaderByteBuffer = 0;
+    byteBufferSize = 0;
+    this->device = device;
+    this->copy = copy;
+    this->direct = direct;
+}
+
+DX12Shader::~DX12Shader()
+{
+    delete[] shaderByteBuffer;
+}
+
+// erstellt ein constanten Buffer, der constante daten an den Shader übergibt
+// es können maximal 14 Buffer erstellt werden
+//  zD3d11Device: Das Device, mit dem der Buffer erstellt werden soll
+//  size: Die größe des buffers in byte
+//  index: Die position des Buffers im Buffer Array. Bereits vorhanderner Buffer wird ersetzt. Buffer 1 kann nicht erstellt werden, wenn Buffer 0 noch nicht erstellt wurde usw.
+bool DX12Shader::erstelleConstBuffer( int size, int index )
+{
+    if( index < 0 || index >= 14 )
+        return 0;
+    while( (size / 256) * 256 != size )
+        size++;
+    while( !constBuffers->hat( index ) )
+        constBuffers->add( 0 );
+    constBuffers->set( new DX12VertexBuffer( 1, device, copy, direct ), index );
+    constBuffers->z( index )->setLength( size );
+    constBuffers->z( index )->copieren();
+    return 1;
+}
+
+// Setzt den Compilierten Shader
+//  zD3d11Device: Das Device, mit welchem der Shader erstellt werden soll
+//  bytes: Die Bytes des compilierten codes
+//  length: die Länge des bytearrays
+//  return: true, wenn bytes gültig ist, false sonst
+bool DX12Shader::setCompiledByteArray( unsigned char* bytes, int length )
+{
+    delete[] shaderByteBuffer;
+    shaderByteBuffer = new unsigned char[ length ];
+    memcpy( shaderByteBuffer, bytes, length );
+    byteBufferSize = length;
+    return 1;
+}
+
+// Nach dem Aufruf dieser Funktion wird dieser Shader als Pixel Shader benutzt
+//  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
+void DX12Shader::benutzeShader()
+{
+    // not needet in DirectX 12
+}
+
+// gibt die compilierten bytes zurück
+unsigned char* DX12Shader::getCompiledShader() const
+{
+    return shaderByteBuffer;
+}
+
+// gitbt die anzahl der compilierten bytes zurück
+int DX12Shader::getCompiledLength() const
+{
+    return byteBufferSize;
+}
+
+// Erstellt den RootParameter zu einem constanten buffer
+//  index: Der Index des Buffers
+//  view: enthält nach dem Aufruf die position und größe des buffers im speicher
+void DX12Shader::getViewDesc( int index, D3D12_CONSTANT_BUFFER_VIEW_DESC& view )
+{
+    DX12Buffer* zB = (DX12Buffer*)constBuffers->z( index );
+    if( !zB )
+        return;
+    view.SizeInBytes = zB->getElementAnzahl() * zB->getElementLength();
+    view.BufferLocation = zB->zBuffer()->GetGPUVirtualAddress();
+}
+
+
+DX12PixelShader::DX12PixelShader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct )
+    : DX12Shader( device, copy, direct )
+{}
+
+
+// Konstruktor
+DX12VertexShader::DX12VertexShader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct )
+    : DX12Shader( device, copy, direct )
+{
+    inputLayout = 0;
+    inputLayoutSize = 0;
+}
+
+// Destruktor
+DX12VertexShader::~DX12VertexShader()
+{
+    delete[] inputLayout;
+}
+
+// erstellt ein InputLayout für den Shader
+// Darf erst nach compile aufgerufen werden
+//  zD3d11Device: Das Device, mit dem das Layout erstellt werden soll
+//  descArray: Ein Array mit initialisierungsdaten
+//  anz: Die Anzahl der Elemente im Array
+bool DX12VertexShader::erstelleInputLayout( D3D12_INPUT_ELEMENT_DESC* descArray, int anz )
+{
+    delete[] inputLayout;
+    inputLayout = new D3D12_INPUT_ELEMENT_DESC[ anz ];
+    memcpy( inputLayout, descArray, anz * sizeof( D3D12_INPUT_ELEMENT_DESC ) );
+    inputLayoutSize = anz;
+    return 1;
+}
+
+// Gint die Anzahl an eingabeparametern des Shaders zurück
+int DX12VertexShader::getInputLayoutSize() const
+{
+    return inputLayoutSize;
+}
+
+// Gibt eine Liste mit formaten für jeden Eingabewert zurück
+D3D12_INPUT_ELEMENT_DESC* DX12VertexShader::zInputLayout() const
+{
+    return inputLayout;
+}

+ 79 - 0
DX12Shader.h

@@ -0,0 +1,79 @@
+#pragma once
+
+#include "Shader.h"
+#include "DX12Buffer.h"
+
+struct ID3D12Device;
+struct ID3D12GraphicsCommandList;
+struct D3D12_INPUT_ELEMENT_DESC;
+struct D3D12_ROOT_PARAMETER1;
+struct D3D12_CONSTANT_BUFFER_VIEW_DESC;
+
+namespace Framework
+{
+    class DX12Shader : public Shader
+    {
+    protected:
+        ID3D12Device* device;
+        DX12CopyCommandQueue* copy;
+        DX12DirectCommandQueue* direct;
+        unsigned char* shaderByteBuffer;
+        int byteBufferSize;
+
+    public:
+        DX12Shader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
+        virtual ~DX12Shader();
+        //! erstellt ein constanten Buffer, der constante daten an den Shader übergibt
+        //! es können maximal 14 Buffer erstellt werden
+        //!  zD3d11Device: Das Device, mit dem der Buffer erstellt werden soll
+        //! \param size Die größe des buffers in byte
+        //! \param index Die position des Buffers im Buffer Array. Bereits vorhanderner Buffer wird ersetzt. Buffer 1 kann nicht erstellt werden, wenn Buffer 0 noch nicht erstellt wurde usw.
+        virtual bool erstelleConstBuffer( int size, int index ) override;
+        //! Setzt den Compilierten Shader
+        //!  zD3d11Device: Das Device, mit welchem der Shader erstellt werden soll
+        //! \param bytes Die Bytes des compilierten codes
+        //! \param length die Länge des bytearrays
+        //! \return true, wenn bytes gültig ist, false sonst
+        bool setCompiledByteArray( unsigned char* bytes, int length ) override;
+        //! Nach dem Aufruf dieser Funktion wird dieser Shader als Pixel Shader benutzt
+        //!  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
+        void benutzeShader() override;
+        //! gibt die compilierten bytes zurück
+        unsigned char* getCompiledShader() const;
+        //! gitbt die anzahl der compilierten bytes zurück
+        int getCompiledLength() const;
+        //! Erstellt den RootParameter zu einem constanten buffer
+        //! \param index Der Index des Buffers
+        //! \param view enthält nach dem Aufruf die position und größe des buffers im speicher
+        virtual void getViewDesc( int index, D3D12_CONSTANT_BUFFER_VIEW_DESC& view );
+    };
+
+    class DX12PixelShader : public DX12Shader
+    {
+    public:
+        DX12PixelShader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
+    };
+
+    class DX12VertexShader : public DX12Shader
+    {
+    private:
+        D3D12_INPUT_ELEMENT_DESC* inputLayout;
+        int inputLayoutSize;
+
+    public:
+        //! Konstruktor
+        DX12VertexShader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
+        //! Destruktor
+        ~DX12VertexShader();
+        //! erstellt ein InputLayout für den Shader
+        //! Darf erst nach compile aufgerufen werden
+        //!  zD3d11Device: Das Device, mit dem das Layout erstellt werden soll
+        //! \param descArray Ein Array mit initialisierungsdaten
+        //! \param anz Die Anzahl der Elemente im Array
+        bool erstelleInputLayout( D3D12_INPUT_ELEMENT_DESC* descArray, int anz );
+        //! Gint die Anzahl an eingabeparametern des Shaders zurück
+        int getInputLayoutSize() const;
+        //! Gibt eine Liste mit formaten für jeden Eingabewert zurück
+        D3D12_INPUT_ELEMENT_DESC* zInputLayout() const;
+    };
+}

+ 115 - 0
DX12Textur.cpp

@@ -0,0 +1,115 @@
+#include "DX12Textur.h"
+#include "d3dx12.h"
+#include "Bild.h"
+#include "DX12CommandQueue.h"
+
+using namespace Framework;
+
+
+DX12Textur::DX12Textur( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct )
+    : Textur(),
+    buffer( 0 ),
+    intermediate( 0 ),
+    device( device ),
+    copy( copy ),
+    direct( direct ),
+    shaderResource( 0 )
+{}
+
+DX12Textur::~DX12Textur()
+{
+#ifdef WIN32
+    if( buffer )
+        buffer->Release();
+    if( intermediate )
+        intermediate->Release();
+#endif
+}
+
+// Aktualisiert die Textur. Die Pixel des aktuellen Bildes werden in den Graphikspeicher kopiert
+bool DX12Textur::updateTextur()
+{
+    if( !bild )
+        return 0;
+#ifdef WIN32
+    if( !buffer )
+    {
+        D3D12_RESOURCE_DESC description;
+        ZeroMemory( &description, sizeof( D3D12_RESOURCE_DESC ) );
+        description.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+        description.Height = bild->getHeight();
+        description.Width = bild->getBreite();
+        description.DepthOrArraySize = 1;
+        description.MipLevels = 1;
+        description.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
+        description.SampleDesc.Count = 1;
+        description.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
+        description.Flags = D3D12_RESOURCE_FLAG_NONE;
+        D3D12_HEAP_PROPERTIES hprop;
+        hprop.Type = D3D12_HEAP_TYPE_DEFAULT;
+        hprop.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+        hprop.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+        hprop.CreationNodeMask = 1;
+        hprop.VisibleNodeMask = 1;
+        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, &description, D3D12_RESOURCE_STATE_COPY_DEST, 0, __uuidof(ID3D12Resource), (void**)&buffer );
+        const UINT64 uploadBufferSize = GetRequiredIntermediateSize( buffer, 0, 1 );
+        D3D12_RESOURCE_DESC iDescription;
+        iDescription.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+        iDescription.Alignment = 0;
+        iDescription.Width = uploadBufferSize;
+        iDescription.Height = 1;
+        iDescription.DepthOrArraySize = 1;
+        iDescription.MipLevels = 1;
+        iDescription.Format = DXGI_FORMAT_UNKNOWN;
+        iDescription.SampleDesc.Count = 1;
+        iDescription.SampleDesc.Quality = 0;
+        iDescription.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+        iDescription.Flags = D3D12_RESOURCE_FLAG_NONE;
+        hprop.Type = D3D12_HEAP_TYPE_UPLOAD;
+        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, &iDescription, D3D12_RESOURCE_STATE_GENERIC_READ, 0, __uuidof(ID3D12Resource), (void**)&intermediate );
+        shaderResource = 0;
+    }
+    if( bild )
+    {
+        if( shaderResource )
+        {
+            D3D12_RESOURCE_BARRIER barrier;
+            barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+            barrier.Transition.pResource = buffer;
+            barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
+            barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
+            barrier.Transition.Subresource = 0;
+            barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+            direct->getCommandList()->ResourceBarrier( 1, &barrier );
+            shaderResource = 0;
+        }
+        D3D12_SUBRESOURCE_DATA textureData = {};
+        textureData.pData = bild->getBuffer();
+        textureData.RowPitch = bild->getBreite() * sizeof( int );
+        textureData.SlicePitch = textureData.RowPitch * bild->getHeight();
+        UpdateSubresources( direct->getCommandList(), buffer, intermediate, 0, 0, 1, &textureData );
+        D3D12_RESOURCE_BARRIER barrier;
+        barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+        barrier.Transition.pResource = buffer;
+        barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+        barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
+        barrier.Transition.Subresource = 0;
+        barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+        direct->getCommandList()->ResourceBarrier( 1, &barrier );
+        shaderResource = 1;
+    }
+#endif
+    return 1;
+}
+
+// Gibt true zurük, wenn updateTextur aufgerufen werden muss
+bool DX12Textur::brauchtUpdate() const
+{
+    return bild && !buffer;
+}
+
+// Gibt die DX12 Resource zurück
+ID3D12Resource* DX12Textur::getResource()
+{
+    return buffer;
+}

+ 32 - 0
DX12Textur.h

@@ -0,0 +1,32 @@
+#pragma once
+
+#include "Textur.h"
+
+struct ID3D12Device;
+struct D3D12_RESOURCE_DESC;
+struct ID3D12Resource;
+struct ID3D12GraphicsCommandList;
+
+namespace Framework
+{
+    class DX12Textur : public Textur
+    {
+    private:
+        ID3D12Resource* buffer;
+        ID3D12Resource* intermediate;
+        ID3D12Device* device;
+        DX12CopyCommandQueue* copy;
+        DX12DirectCommandQueue* direct;
+        bool shaderResource;
+
+    public:
+        DLLEXPORT DX12Textur( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
+        DLLEXPORT ~DX12Textur();
+        //! Aktualisiert die Textur. Die Pixel des aktuellen Bildes werden in den Graphikspeicher kopiert
+        DLLEXPORT bool updateTextur() override;
+        //! Gibt true zurük, wenn updateTextur aufgerufen werden muss
+        DLLEXPORT bool brauchtUpdate() const override;
+        //! Gibt die DX12 Resource zurück
+        DLLEXPORT ID3D12Resource* getResource();
+    };
+}

+ 26 - 26
DX12VertexShader.h

@@ -129,10 +129,10 @@ ret
 
 const BYTE DX12VertexShaderBytes[] =
 {
-     68,  88,  66,  67, 122, 122, 
-     47, 158, 148,  79,  31, 140, 
-    240, 147, 131,  22,  22,  27, 
-     38, 207,   1,   0,   0,   0, 
+     68,  88,  66,  67, 228, 146, 
+     10,  70, 187,   6,  78,  21, 
+    253, 231, 233, 156, 148, 221, 
+    201, 183,   1,   0,   0,   0, 
     108,  78,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
     124,   2,   0,   0,  16,   3, 
@@ -915,11 +915,11 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 213, 106, 
-    170,  97,   1,   0,   0,   0, 
-    102, 130,   8, 181, 199,  23, 
-    190,  69, 180, 250, 133, 108, 
-    110, 250, 252, 221,   0,   0, 
+    148,  46,  49,   1,   5, 126, 
+    208,  97,   1,   0,   0,   0, 
+    208,  14,  31,  34,  95,  79, 
+    106,  71, 138, 135, 223, 163, 
+      1, 249,  56, 154,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       1,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1095,11 +1095,11 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0, 103, 159,   1,   0, 
     179, 120,   1,   0, 238,  97, 
       2,   0,  90,  28,   0,   0, 
-    226, 187,   3,   0,  53, 174, 
+     62,  71,   0,   0,  53, 174, 
       3,   0, 206,  21,   0,   0, 
     193, 205,   3,   0, 207, 193, 
       1,   0,  62,   3,   3,   0, 
-    134, 200,   2,   0, 118, 199, 
+    223,  60,   0,   0, 118, 199, 
       0,   0,   0,  16,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1684,8 +1684,8 @@ const BYTE DX12VertexShaderBytes[] =
     112, 111, 115, 105, 116, 105, 
     111, 110,  32, 111, 102,  32, 
      27, 226,  48,   1, 128,   0, 
-      0,   0, 141,   4, 208, 243, 
-    120, 232, 215,   1,   1,   0, 
+      0,   0,  82, 247, 126, 186, 
+     42, 255, 215,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1771,9 +1771,9 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0,   4,   0,   0,   0, 
      66,   0,  60,  17,  16,   1, 
       0,   0,   0,   1,  10,   0, 
-      1,   0,  15,   0, 171,  63, 
-     10,   0,   1,   0,  15,   0, 
-    171,  63,  77, 105,  99, 114, 
+      1,   0, 173,   2,  97,  74, 
+     10,   0,   1,   0, 173,   2, 
+     97,  74,  77, 105,  99, 114, 
     111, 115, 111, 102, 116,  32, 
      40,  82,  41,  32,  72,  76, 
      83,  76,  32,  83, 104,  97, 
@@ -2200,7 +2200,7 @@ const BYTE DX12VertexShaderBytes[] =
      12,  16,   0,   0,   1,   0, 
       1,   0,  14,   0,  23,  21, 
      13,  16,   0,   0,  36,   2, 
-      0,   0,   0,   0, 242, 241, 
+     96,  70,   0,   0, 242, 241, 
      10,   0,  24,  21,  14,  16, 
       0,   0,   1,   0,   0,   2, 
      18,   0,  22,  21,  10,  16, 
@@ -2220,7 +2220,7 @@ const BYTE DX12VertexShaderBytes[] =
      10,   0,  24,  21,  18,  16, 
       0,   0,   1,   0,   1,   0, 
      14,   0,  23,  21,  19,  16, 
-      0,   0,  36,   2,   0,   0, 
+      0,   0,  36,   2,   0, 128, 
       0,   0, 242, 241,  10,   0, 
      24,  21,  20,  16,   0,   0, 
       1,   0,   0,   2,   0,   0, 
@@ -3134,11 +3134,11 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 148,  46, 
-     49,   1, 213, 106, 170,  97, 
-      1,   0,   0,   0, 102, 130, 
-      8, 181, 199,  23, 190,  69, 
-    180, 250, 133, 108, 110, 250, 
-    252, 221, 129,   0,   0,   0, 
+     49,   1,   5, 126, 208,  97, 
+      1,   0,   0,   0, 208,  14, 
+     31,  34,  95,  79, 106,  71, 
+    138, 135, 223, 163,   1, 249, 
+     56, 154, 129,   0,   0,   0, 
      47,  76, 105, 110, 107,  73, 
     110, 102, 111,   0,  47, 110, 
      97, 109, 101, 115,   0,  47, 
@@ -3221,8 +3221,8 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
     255, 255, 255, 255, 119,   9, 
      49,   1,   1,   0,   0,   0, 
-     13,   0,  10, 140,  14,   0, 
-    180, 156,  15,   0,  11,   0, 
+     13,   0,   0, 142,  14,   0, 
+     63,  92,  15,   0,   0,   0, 
      76,   0,   0,   0,  32,   0, 
       0,   0,  44,   0,   0,   0, 
      96,   0,   0,   0,   0,   0, 
@@ -3238,7 +3238,7 @@ const BYTE DX12VertexShaderBytes[] =
       2,   0,   9,   0, 132,   5, 
       0,   0,   0,   0,   0,   0, 
     236,   2,   0,   0,   1,   0, 
-      0,   2,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 109,  97, 105, 110, 
       0, 110, 111, 110, 101,   0, 

+ 22 - 12
DX9GraphicsApi.cpp

@@ -46,9 +46,9 @@ DirectX9::~DirectX9()
     uiBild->release();
 }
 
-typedef IDirect3D9 *( __stdcall *D3D9CreateFunction )( UINT );
+typedef IDirect3D9* (__stdcall* D3D9CreateFunction)(UINT);
 
-void DirectX9::initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fullScreen )
+void DirectX9::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen )
 {
     if( pDirect3D )
         return GraphicsApi::initialize( fenster, backBufferSize, fullScreen );
@@ -138,21 +138,21 @@ void DirectX9::beginFrame( bool fill2D, bool fill3D, int fillColor )
         uiBild->setFarbe( fillColor );
 }
 
-void DirectX9::renderKamera( Kam3D * zKamera )
+void DirectX9::renderKamera( Kam3D* zKamera )
 {
     Mat4< float > mat = zKamera->getProjectionMatrix();
     Mat4< float > inv = zKamera->getViewMatrix().getInverse();
-    Welt3D *welt = zKamera->zWelt();
+    Welt3D* welt = zKamera->zWelt();
     ZeitMesser zm = ZeitMesser();
     zm.messungStart();
     for( int x = 0; x < zKamera->zViewPort()->width; x++ )
     {
         for( int y = 0; y < zKamera->zViewPort()->height; y++ )
         {
-            Vec3< float > wPoint = Vec3< float >( x / ( 0.5f * zKamera->zViewPort()->width ) - 1, y / ( 0.5f * zKamera->zViewPort()->height ) - 1, 0.1f );
+            Vec3< float > wPoint = Vec3< float >( x / (0.5f * zKamera->zViewPort()->width) - 1, y / (0.5f * zKamera->zViewPort()->height) - 1, 0.1f );
             Vec3< float > wPoint2 = Vec3< float >( wPoint.x, wPoint.y, 1.f );
-            wPoint.x = ( wPoint.x * 0.1f ) / mat.elements[ 0 ][ 0 ];
-            wPoint.y = ( wPoint.y * 0.1f ) / mat.elements[ 1 ][ 1 ];
+            wPoint.x = (wPoint.x * 0.1f) / mat.elements[ 0 ][ 0 ];
+            wPoint.y = (wPoint.y * 0.1f) / mat.elements[ 1 ][ 1 ];
             wPoint2.x = wPoint2.x / mat.elements[ 0 ][ 0 ];
             wPoint2.y = wPoint2.y / mat.elements[ 1 ][ 1 ];
             wPoint = inv * wPoint;
@@ -177,10 +177,10 @@ void DirectX9::presentFrame()
         update();
     }
     // kopieren zum Bildschrirm 
-    int *bgBuff = uiBild->getBuffer();
+    int* bgBuff = uiBild->getBuffer();
     int tmpBr = sizeof( D3DCOLOR ) * uiBild->getBreite();
     for( int y = 0, pitch = 0, bry = 0; y < uiBild->getHeight(); ++y, pitch += backRect->Pitch, bry += uiBild->getBreite() )
-        memcpy( &( (BYTE *)backRect->pBits )[ pitch ], ( void * ) & ( bgBuff[ bry ] ), tmpBr );
+        memcpy( &((BYTE*)backRect->pBits)[ pitch ], (void*)&(bgBuff[ bry ]), tmpBr );
     // Beende Bild 
     result = pBackBuffer->UnlockRect();
     if( result != S_OK )
@@ -201,14 +201,24 @@ void DirectX9::presentFrame()
     }
 }
 
-Textur *DirectX9::createOrGetTextur( const char *name, Bild *b )
+Textur* DirectX9::createOrGetTextur( const char* name, Bild* b )
 {
-    Textur *ret = new DX9Textur();
+    Textur* ret = new DX9Textur();
     ret->setBildZ( b );
     return ret;
 }
 
-Bild *DirectX9::zUIRenderBild() const
+Bild* DirectX9::zUIRenderBild() const
 {
     return uiBild;
+}
+
+DXBuffer* DirectX9::createIndexBuffer()
+{
+    throw "Unsupported Operation for DirectX9 Graphics API. Use DirectX11 or 12";
+}
+
+DXBuffer* DirectX9::createVertexBuffer()
+{
+    throw "Unsupported Operation for DirectX9 Graphics API. Use DirectX11 or 12";
 }

+ 8 - 176
DXBuffer.cpp

@@ -1,10 +1,9 @@
 #include "DXBuffer.h"
 #include <iostream>
 #ifdef WIN32
-#include "DXCommandQueue.h"
 #include <d3d11.h>
 #include <d3d12.h>
-#include <d3dx12.h>
+#include "d3dx12.h"
 #endif
 
 using namespace Framework;
@@ -42,7 +41,7 @@ void DXBuffer::setLength( int len )
 
 // Legt fest, was beim nächsten aufruf von 'kopieren' kopiert wird
 //  data: Ein zeiger auf die Daten
-void DXBuffer::setData( void *data )
+void DXBuffer::setData( void* data )
 {
     this->data = data;
     changed = 1;
@@ -66,7 +65,7 @@ int DXBuffer::getElementAnzahl() const
 
 // Konstruktor
 // eSize: Die Länge eines Elementes in Bytes
-DX11Buffer::DX11Buffer( int eSize, ID3D11Device * device, ID3D11DeviceContext * context, int bindFlags )
+DX11Buffer::DX11Buffer( int eSize, ID3D11Device* device, ID3D11DeviceContext* context, int bindFlags )
     : DXBuffer( eSize )
 {
     buffer = 0;
@@ -112,7 +111,7 @@ void DX11Buffer::copieren( int byteCount )
     if( changed )
     {
         D3D11_MAPPED_SUBRESOURCE map;
-        if( ( description->Usage | D3D11_USAGE_DYNAMIC ) == description->Usage )
+        if( (description->Usage | D3D11_USAGE_DYNAMIC) == description->Usage )
             context->Map( buffer, 0, D3D11_MAP::D3D11_MAP_WRITE_DISCARD, 0, &map );
         else
             context->Map( buffer, 0, D3D11_MAP::D3D11_MAP_WRITE, 0, &map );
@@ -123,7 +122,7 @@ void DX11Buffer::copieren( int byteCount )
 }
 
 // Gibt den Buffer zurück
-ID3D11Buffer * DX11Buffer::zBuffer() const
+ID3D11Buffer* DX11Buffer::zBuffer() const
 {
     return buffer;
 }
@@ -133,7 +132,7 @@ ID3D11Buffer * DX11Buffer::zBuffer() const
 
 // Konstruktor
 // eSize: Die Länge eines Elementes in Bytes
-DX11StructuredBuffer::DX11StructuredBuffer( int eSize, ID3D11Device * device, ID3D11DeviceContext * context )
+DX11StructuredBuffer::DX11StructuredBuffer( int eSize, ID3D11Device* device, ID3D11DeviceContext* context )
     : DX11Buffer( eSize, device, context, D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE )
 {
     description->MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
@@ -153,7 +152,7 @@ DX11StructuredBuffer::~DX11StructuredBuffer()
 //  zRObj: Das Objekt, mit dem die Grafikkarte angesprochen wird
 void DX11StructuredBuffer::copieren( int byteCount )
 {
-    ID3D11Buffer *old = buffer;
+    ID3D11Buffer* old = buffer;
     DX11Buffer::copieren( byteCount );
     if( buffer != old )
     {
@@ -169,176 +168,9 @@ void DX11StructuredBuffer::copieren( int byteCount )
 }
 
 // Gibt die verwendtete Shader Resource View zurück
-DX11StructuredBuffer::operator ID3D11ShaderResourceView *( ) const
+DX11StructuredBuffer::operator ID3D11ShaderResourceView* () const
 {
     return view;
 }
 
-
-// Konstruktor
-// eSize: Die Länge eines Elementes in Bytes
-DX12Buffer::DX12Buffer( int eSize, ID3D12Device2 * device, ID3D12GraphicsCommandList2 * list, int flags )
-    : DXBuffer( eSize ),
-    buffer( 0 ),
-    intermediate( 0 ),
-    device( device ),
-    list( list )
-{
-    description = new D3D12_RESOURCE_DESC();
-    ZeroMemory( description, sizeof( D3D12_RESOURCE_DESC ) );
-    description->Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
-    description->Height = 1;
-    description->DepthOrArraySize = 1;
-    description->MipLevels = 1;
-    description->Format = DXGI_FORMAT_UNKNOWN;
-    description->SampleDesc.Count = 1;
-    description->Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
-    description->Flags = (D3D12_RESOURCE_FLAGS)flags;
-}
-
-// Destruktor
-DX12Buffer::~DX12Buffer()
-{
-    if( intermediate )
-        intermediate->Release();
-    if( buffer )
-        buffer->Release();
-    delete description;
-}
-
-// Kopiert die Daten in den Buffer, fals sie sich verändert haben
-void DX12Buffer::copieren( int byteCount )
-{
-    if( !len )
-        return;
-    if( byteCount < 0 )
-        byteCount = len;
-    if( description->Width < len )
-    {
-        if( intermediate )
-            intermediate->Release();
-        if( buffer )
-            buffer->Release();
-        buffer = 0;
-        description->Width = len;
-    }
-    if( !buffer )
-    {
-        D3D12_HEAP_PROPERTIES hprop;
-        hprop.Type = D3D12_HEAP_TYPE_UPLOAD;
-        hprop.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
-        hprop.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
-        hprop.CreationNodeMask = 1;
-        hprop.VisibleNodeMask = 1;
-        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, description, D3D12_RESOURCE_STATE_GENERIC_READ, 0, __uuidof( ID3D12Resource ), (void **)& buffer );
-        hprop.Type = D3D12_HEAP_TYPE_UPLOAD;
-        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, description, D3D12_RESOURCE_STATE_GENERIC_READ, 0, __uuidof( ID3D12Resource ), (void **)& intermediate );
-        if( data )
-            changed = 1;
-    }
-    if( changed && data )
-    {
-        BYTE *pData;
-        D3D12_RANGE r;
-        r.Begin = 0;
-        r.End = 0;
-        buffer->Map( 0, &r, (void **)&pData );
-        memcpy( pData, data, byteCount );
-        r.End = byteCount;
-        buffer->Unmap( 0, &r );
-        //list->CopyBufferRegion( buffer, 0, intermediate, 0, len );
-        changed = 0;
-    }
-}
-
-// Gibt den Buffer zurück
-ID3D12Resource *DX12Buffer::zBuffer() const
-{
-    return buffer;
-}
-
-
-DX12IndexBuffer::DX12IndexBuffer( int eSize, ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct )
-    : DX12Buffer( eSize, device, copy->getCommandList(), D3D12_RESOURCE_FLAG_NONE ),
-    copy( copy ),
-    direct( direct )
-{
-    ibs = 0;
-}
-
-DX12IndexBuffer::~DX12IndexBuffer()
-{}
-
-// Kopiert die Daten in den Buffer, fals sie sich verändert haben
-void DX12IndexBuffer::copieren( int byteCount )
-{
-    /*if( ibs )
-    {
-        D3D12_RESOURCE_BARRIER barrier;
-        barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-        barrier.Transition.pResource = buffer;
-        barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_INDEX_BUFFER;
-        barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
-        barrier.Transition.Subresource = 0;
-        barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-        direct->getCommandList()->ResourceBarrier( 1, &barrier );
-        direct->execute();
-        ibs = 0;
-    }*/
-    DX12Buffer::copieren( byteCount );
-    //copy->execute();
-    /*D3D12_RESOURCE_BARRIER barrier;
-    barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-    barrier.Transition.pResource = buffer;
-    barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
-    barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_INDEX_BUFFER;
-    barrier.Transition.Subresource = 0;
-    barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-    direct->getCommandList()->ResourceBarrier( 1, &barrier );
-    direct->execute();
-    ibs = 1;*/
-}
-
-
-DX12VertexBuffer::DX12VertexBuffer( int eSize, ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct )
-    : DX12Buffer( eSize, device, copy->getCommandList(), D3D12_RESOURCE_FLAG_NONE ),
-    copy( copy ),
-    direct( direct )
-{
-    vbs = 0;
-}
-
-DX12VertexBuffer::~DX12VertexBuffer()
-{}
-
-// Kopiert die Daten in den Buffer, fals sie sich verändert haben
-void DX12VertexBuffer::copieren( int byteCount )
-{
-    /*if( vbs )
-    {
-        D3D12_RESOURCE_BARRIER barrier;
-        barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-        barrier.Transition.pResource = buffer;
-        barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
-        barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
-        barrier.Transition.Subresource = 0;
-        barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-        direct->getCommandList()->ResourceBarrier( 1, &barrier );
-        direct->execute();
-        vbs = 0;
-    }*/
-    DX12Buffer::copieren( byteCount );
-    //copy->execute();
-    /*D3D12_RESOURCE_BARRIER barrier;
-    barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-    barrier.Transition.pResource = buffer;
-    barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
-    barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER;
-    barrier.Transition.Subresource = 0;
-    barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-    direct->getCommandList()->ResourceBarrier( 1, &barrier );
-    direct->execute();
-    vbs = 1;*/
-}
-
 #endif

+ 11 - 64
DXBuffer.h

@@ -9,10 +9,6 @@ struct D3D11_BUFFER_DESC;
 struct ID3D11ShaderResourceView;
 struct ID3D11Device;
 struct ID3D11DeviceContext;
-struct ID3D12Resource;
-struct ID3D12Device2;
-struct D3D12_RESOURCE_DESC;
-struct ID3D12GraphicsCommandList2;
 #endif
 
 namespace Framework
@@ -24,7 +20,7 @@ namespace Framework
     class DXBuffer : public virtual ReferenceCounter
     {
     protected:
-        void *data;
+        void* data;
         bool changed;
         int len;
         int elLen;
@@ -43,7 +39,7 @@ namespace Framework
         DLLEXPORT void setLength( int len );
         //! Legt fest, was beim nächsten aufruf von 'kopieren' kopiert wird
         //! \param data Ein zeiger auf die Daten
-        DLLEXPORT void setData( void *data );
+        DLLEXPORT void setData( void* data );
         //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
         DLLEXPORT virtual void copieren( int byteCount = -1 ) = 0;
         //! Gibt die Länge eines Elementes in bytes zurück
@@ -57,86 +53,37 @@ namespace Framework
     class DX11Buffer : public DXBuffer
     {
     protected:
-        D3D11_BUFFER_DESC *description;
-        ID3D11Buffer *buffer;
-        ID3D11Device *device;
-        ID3D11DeviceContext *context;
+        D3D11_BUFFER_DESC* description;
+        ID3D11Buffer* buffer;
+        ID3D11Device* device;
+        ID3D11DeviceContext* context;
     public:
         //! Konstruktor
         //! eSize: Die Länge eines Elementes in Bytes
-        DLLEXPORT DX11Buffer( int eSize, ID3D11Device *device, ID3D11DeviceContext *context, int bindFlags );
+        DLLEXPORT DX11Buffer( int eSize, ID3D11Device* device, ID3D11DeviceContext* context, int bindFlags );
         //! Destruktor
         DLLEXPORT virtual ~DX11Buffer();
         //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
         DLLEXPORT void copieren( int byteCount = -1 ) override;
         //! Gibt den Buffer zurück
-        DLLEXPORT ID3D11Buffer *zBuffer() const;
+        DLLEXPORT ID3D11Buffer* zBuffer() const;
     };
 
     //! Ein Buffer von Indizes aus dem Buffer mit Eckpunkten, wovon immer drei ein Dreieck ergeben, das gezeichnet wird
     class DX11StructuredBuffer : public DX11Buffer
     {
     private:
-        ID3D11ShaderResourceView *view;
+        ID3D11ShaderResourceView* view;
     public:
         //! Konstruktor
         //! eSize: Die Länge eines Elementes in Bytes
-        DLLEXPORT DX11StructuredBuffer( int eSize, ID3D11Device *device, ID3D11DeviceContext *context );
+        DLLEXPORT DX11StructuredBuffer( int eSize, ID3D11Device* device, ID3D11DeviceContext* context );
         //! Destruktor
         DLLEXPORT virtual ~DX11StructuredBuffer();
         //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
         DLLEXPORT void copieren( int byteCount = -1 ) override;
         //! Gibt die verwendtete Shader Resource View zurück
-        DLLEXPORT operator ID3D11ShaderResourceView *() const;
-    };
-
-    //! Ein Buffer mit Daten im Grafikspeicher
-    class DX12Buffer : public DXBuffer
-    {
-    protected:
-        D3D12_RESOURCE_DESC *description;
-        ID3D12Resource *buffer;
-        ID3D12Resource *intermediate;
-        ID3D12Device2 *device;
-        ID3D12GraphicsCommandList2 *list;
-    public:
-        //! Konstruktor
-        //! eSize: Die Länge eines Elementes in Bytes
-        DLLEXPORT DX12Buffer( int eSize, ID3D12Device2 *device, ID3D12GraphicsCommandList2 *list, int bindFlags );
-        //! Destruktor
-        DLLEXPORT virtual ~DX12Buffer();
-        //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
-        DLLEXPORT void copieren( int byteCount = -1 ) override;
-        //! Gibt den Buffer zurück
-        DLLEXPORT ID3D12Resource *zBuffer() const;
-    };
-
-    class DX12IndexBuffer : public DX12Buffer
-    {
-    private:
-        bool ibs;
-        DX12DirectCommandQueue *direct;
-        DX12CopyCommandQueue *copy;
-
-    public:
-        DX12IndexBuffer( int eSize, ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct );
-        ~DX12IndexBuffer();
-        //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
-        DLLEXPORT void copieren( int byteCount = -1 ) override;
-    };
-
-    class DX12VertexBuffer : public DX12Buffer
-    {
-    private:
-        bool vbs;
-        DX12DirectCommandQueue *direct;
-        DX12CopyCommandQueue *copy;
-
-    public:
-        DX12VertexBuffer( int eSize, ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct );
-        ~DX12VertexBuffer();
-        //! Kopiert die Daten in den Buffer, fals sie sich verändert haben
-        DLLEXPORT void copieren( int byteCount = -1 ) override;
+        DLLEXPORT operator ID3D11ShaderResourceView* () const;
     };
 #endif
 }

+ 10 - 3
Framework.vcxproj

@@ -22,7 +22,7 @@
     <ProjectGuid>{C67E1D50-8FED-42FC-9538-1818297CF817}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>Framework</RootNamespace>
-    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -206,11 +206,15 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
     <ClInclude Include="Bildschirm.h" />
     <ClInclude Include="Cache.h" />
     <ClInclude Include="CharMap.h" />
-    <ClInclude Include="DXCommandQueue.h" />
+    <ClInclude Include="d3dx12.h" />
+    <ClInclude Include="DX12Buffer.h" />
+    <ClInclude Include="DX12CommandQueue.h" />
     <ClInclude Include="Critical.h" />
     <ClInclude Include="Cube.h" />
     <ClInclude Include="Dialog.h" />
     <ClInclude Include="DLLRegister.h" />
+    <ClInclude Include="DX12Shader.h" />
+    <ClInclude Include="DX12Textur.h" />
     <ClInclude Include="Either.h" />
     <ClInclude Include="Errors.h" />
     <ClInclude Include="GraphicsApi.h" />
@@ -295,7 +299,8 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
     <ClCompile Include="AuswahlBox.cpp" />
     <ClCompile Include="Bild.cpp" />
     <ClCompile Include="Bildschirm.cpp" />
-    <ClCompile Include="DXCommandQueue.cpp" />
+    <ClCompile Include="DX12Buffer.cpp" />
+    <ClCompile Include="DX12CommandQueue.cpp" />
     <ClCompile Include="Critical.cpp" />
     <ClCompile Include="Cube.cpp" />
     <ClCompile Include="Datei.cpp" />
@@ -306,6 +311,8 @@ copy "x64\Release\Framework.dll" "..\..\Spiele Platform\SMP\Fertig\x64\framework
     <ClCompile Include="DLLRegister.cpp" />
     <ClCompile Include="DX11GraphicsApi.cpp" />
     <ClCompile Include="DX12GraphicsApi.cpp" />
+    <ClCompile Include="DX12Shader.cpp" />
+    <ClCompile Include="DX12Textur.cpp" />
     <ClCompile Include="DX9GraphicsApi.cpp" />
     <ClCompile Include="DXBuffer.cpp" />
     <ClCompile Include="Errors.cpp" />

+ 36 - 9
Framework.vcxproj.filters

@@ -82,6 +82,12 @@
     <Filter Include="Headerdateien\Framework\IO">
       <UniqueIdentifier>{b8b352cd-1fe4-4229-b600-127da384f3b5}</UniqueIdentifier>
     </Filter>
+    <Filter Include="Headerdateien\Framework\Grafik\DX\DX12">
+      <UniqueIdentifier>{2f5e8a0f-d55f-427f-ba12-dc88fe967dd5}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Quelldateien\Framework\Grafik\DX\DX12">
+      <UniqueIdentifier>{2fd3400a-392f-4827-9a89-314f985795af}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="Model2D.h">
@@ -315,9 +321,6 @@
     <ClInclude Include="DLLRegister.h">
       <Filter>Headerdateien\Framework\OS</Filter>
     </ClInclude>
-    <ClInclude Include="DXCommandQueue.h">
-      <Filter>Headerdateien\Framework\Grafik\DX</Filter>
-    </ClInclude>
     <ClInclude Include="UIDialog.h">
       <Filter>Headerdateien\Framework\Objekte2D</Filter>
     </ClInclude>
@@ -354,6 +357,21 @@
     <ClInclude Include="Cache.h">
       <Filter>Headerdateien\Framework\Data</Filter>
     </ClInclude>
+    <ClInclude Include="d3dx12.h">
+      <Filter>Headerdateien\Framework\Grafik\DX\DX12</Filter>
+    </ClInclude>
+    <ClInclude Include="DX12CommandQueue.h">
+      <Filter>Headerdateien\Framework\Grafik\DX\DX12</Filter>
+    </ClInclude>
+    <ClInclude Include="DX12Buffer.h">
+      <Filter>Headerdateien\Framework\Grafik\DX\DX12</Filter>
+    </ClInclude>
+    <ClInclude Include="DX12Shader.h">
+      <Filter>Headerdateien\Framework\Grafik\DX\DX12</Filter>
+    </ClInclude>
+    <ClInclude Include="DX12Textur.h">
+      <Filter>Headerdateien\Framework\Grafik\DX\DX12</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Maus.cpp">
@@ -548,12 +566,6 @@
     <ClCompile Include="DX11GraphicsApi.cpp">
       <Filter>Quelldateien\Framework\Grafik\DX</Filter>
     </ClCompile>
-    <ClCompile Include="DX12GraphicsApi.cpp">
-      <Filter>Quelldateien\Framework\Grafik\DX</Filter>
-    </ClCompile>
-    <ClCompile Include="DXCommandQueue.cpp">
-      <Filter>Quelldateien\Framework\Grafik\DX</Filter>
-    </ClCompile>
     <ClCompile Include="UIDialog.cpp">
       <Filter>Quelldateien\Framework\Objekte2D</Filter>
     </ClCompile>
@@ -569,6 +581,21 @@
     <ClCompile Include="Errors.cpp">
       <Filter>Quelldateien\Framework</Filter>
     </ClCompile>
+    <ClCompile Include="DX12CommandQueue.cpp">
+      <Filter>Quelldateien\Framework\Grafik\DX\DX12</Filter>
+    </ClCompile>
+    <ClCompile Include="DX12Buffer.cpp">
+      <Filter>Quelldateien\Framework\Grafik\DX\DX12</Filter>
+    </ClCompile>
+    <ClCompile Include="DX12Shader.cpp">
+      <Filter>Quelldateien\Framework\Grafik\DX\DX12</Filter>
+    </ClCompile>
+    <ClCompile Include="DX12Textur.cpp">
+      <Filter>Quelldateien\Framework\Grafik\DX\DX12</Filter>
+    </ClCompile>
+    <ClCompile Include="DX12GraphicsApi.cpp">
+      <Filter>Quelldateien\Framework\Grafik\DX\DX12</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <FxCompile Include="DX12VertexShader.hlsl">

+ 16 - 26
Global.cpp

@@ -16,7 +16,7 @@
 #include "Zeit.h"
 #include "DLLRegister.h"
 
-void Framework::initFramework( HINSTANCE__ *hInst )
+void Framework::initFramework( HINSTANCE__* hInst )
 {
     if( istInitialisiert )
         return;
@@ -28,13 +28,11 @@ void Framework::initFramework( HINSTANCE__ *hInst )
     msgExit = 0;
     MausTrack = 1;
 #endif
-	for( int i = 0; i < 255; ++i )
-		TastenStand[ i ] = 0;
-	for( int i = 0; i < 3; ++i )
-		MausStand[ i ] = 0;
-	Model3DList::init();
-	m3dRegister = new Model3DList();
-	TexturList::init();
+    for( int i = 0; i < 255; ++i )
+        TastenStand[ i ] = 0;
+    for( int i = 0; i < 3; ++i )
+        MausStand[ i ] = 0;
+    TexturList::init();
     dlls = new DLLRegister();
     logEnabled = 0;
     logFile = 0;
@@ -49,29 +47,27 @@ void Framework::releaseFramework()
         return;
     thRegister->cleanUpClosedThreads();
     dlls->release();
-	m3dRegister->release();
-	Model3DList::destroy();
-	TexturList::destroy();
+    TexturList::destroy();
     if( logFile )
         logFile->release();
     delete thRegister;
     istInitialisiert = 0;
 }
 
-bool Framework::istThreadOk( Thread *t )
+bool Framework::istThreadOk( Thread* t )
 {
     return thRegister->isThread( t );
 }
 
 // Gibt das Thread Register des Frameworks zurück
-Framework::ThreadRegister *Framework::getThreadRegister()
+Framework::ThreadRegister* Framework::getThreadRegister()
 {
     return thRegister;
 }
 
 #ifdef WIN32
 
-const Framework::Punkt &Framework::getMausPos()
+const Framework::Punkt& Framework::getMausPos()
 {
     return mausPos;
 }
@@ -93,12 +89,6 @@ bool Framework::getTastenStand( unsigned char taste )
     return TastenStand[ taste ];
 }
 
-// Gibt das Model3DData Register des Frameworks ohne erhöhten reference Counter zurück
-Framework::Model3DList *Framework::zM3DRegister()
-{
-	return m3dRegister;
-}
-
 // Legt fest ob Log Nachrichten gespeichert werden sollen
 void Framework::setLogEnabled( bool le )
 {
@@ -107,22 +97,22 @@ void Framework::setLogEnabled( bool le )
 
 // Speichert eine Zeile in die Logdatei
 //  txt: die zu Speichernde Nachricht
-void Framework::logLine( char *txt )
+void Framework::logLine( char* txt )
 {
     if( logEnabled )
     {
         logC.lock();
         if( !logFile )
         {
-            Zeit *z = getZeit();
+            Zeit* z = getZeit();
             logFile = new Datei();
             logFile->setDatei( z->getZeit( "y-m-d h-i-s.log" ) );
             logFile->erstellen();
             z->release();
         }
         logFile->open( Datei::Style::schreiben | Datei::Style::lesen | Datei::Style::ende );
-        Uhrzeit *uz = getUhrzeit();
-        Text *time = uz->getUhrzeit( "h:i:s" );
+        Uhrzeit* uz = getUhrzeit();
+        Text* time = uz->getUhrzeit( "h:i:s" );
         time->append( "_" );
         time->append( (int)GetThreadId( GetCurrentThread() ) );
         time->append( ": " );
@@ -136,7 +126,7 @@ void Framework::logLine( char *txt )
 }
 
 // Gibt das DLL Register zurück, in dem alle zurzeit dynamisch geladenen DLL Dateien hinterlegt sind
-Framework::DLLRegister *Framework::getDLLRegister()
+Framework::DLLRegister* Framework::getDLLRegister()
 {
     return Framework::dlls;
 }
@@ -149,7 +139,7 @@ void Framework::setDebugDX( bool debug )
 
 #ifdef WIN32
 // gibt eine Referenz auf die Maus zurück
-Framework::Maus &Framework::getMaus()
+Framework::Maus& Framework::getMaus()
 {
     return Framework::MausZeiger;
 }

+ 12 - 15
Globals.h

@@ -31,19 +31,18 @@ namespace Framework
 #endif
     Global bool TastenStand[ 255 ];
     Global bool MausStand[ 3 ];
-    Global Model3DList *m3dRegister;
     Global bool istInitialisiert;
-    Global ThreadRegister *thRegister;
+    Global ThreadRegister* thRegister;
     Global bool logEnabled;
-    Global Datei *logFile;
+    Global Datei* logFile;
     Global Critical logC;
-    Global HINSTANCE__ *_hinst;
-    Global DLLRegister *dlls;
+    Global HINSTANCE__* _hinst;
+    Global DLLRegister* dlls;
     Global bool debugDX;
 
 #ifdef WIN32
     //! Gibt die Koordinaten der Maus auf dem Bildschirm zurück
-    DLLEXPORT const Punkt &getMausPos();
+    DLLEXPORT const Punkt& getMausPos();
 #endif
     //! Gibt zurück, ob eine Taste der Maus momentan gedrückt wird
     //! \param taste Die Taste, die geprüft werden soll
@@ -58,32 +57,30 @@ namespace Framework
     //! \param taste Die Taste, deren Status gesetzt werden soll
     //! \param st Ob die Taste momentan gedrückt wird. (true), wenn ja. (false) sonnst.
     DLLEXPORT void setTastenStand( unsigned char taste, bool st );
-    //! Gibt das Model3DData Register des Frameworks ohne erhöhten reference Counter zurück
-    DLLEXPORT Model3DList *zM3DRegister();
     //! Initialisiert das Framework
     //! Wird in der (WinMain) des Frameworks automatisch aufgerufen
-    DLLEXPORT void initFramework( HINSTANCE__ *hInst = 0 );
+    DLLEXPORT void initFramework( HINSTANCE__* hInst = 0 );
     //! Gibt den duch (initFramework) benutzten Arbeitsspeicher wieder frei
     //! Wird in der (WinMain) des Frameworks automatisch aufgerufen
     DLLEXPORT void releaseFramework();
     //! Überprüft, ob ein bestimmter Zeiger auf ein Gültiges Thread Objekt zeigt
     //! \param t Der zeiger, der überprüft werden soll
     //! \return 1, falls der Zeiger in Ordnung ist. 0, falls der Zeiger auf kein existentes Thread Objekt zeigt
-    DLLEXPORT bool istThreadOk( Thread *t );
+    DLLEXPORT bool istThreadOk( Thread* t );
     //! Gibt das Thread Register des Frameworks zurück
-    DLLEXPORT ThreadRegister *getThreadRegister();
+    DLLEXPORT ThreadRegister* getThreadRegister();
     //! Legt fest ob Log Nachrichten gespeichert werden sollen
     DLLEXPORT void setLogEnabled( bool le );
     //! Speichert eine Zeile in die Logdatei
     //! \param txt die zu Speichernde Nachricht
-    DLLEXPORT void logLine( char *txt );
+    DLLEXPORT void logLine( char* txt );
     //! Gibt das DLL Register zurück, in dem alle zurzeit dynamisch geladenen DLL Dateien hinterlegt sind
-    DLLEXPORT DLLRegister *getDLLRegister();
+    DLLEXPORT DLLRegister* getDLLRegister();
     //! Versetzt DirectX in den Debug modus
-    DLLEXPORT void setDebugDX(bool debug);
+    DLLEXPORT void setDebugDX( bool debug );
 #ifdef WIN32
     //! gibt eine Referenz auf die Maus zurück
-    DLLEXPORT Maus &getMaus();
+    DLLEXPORT Maus& getMaus();
 #endif
 }
 

+ 50 - 3
GraphicsApi.cpp

@@ -1,6 +1,8 @@
 #include "GraphicsApi.h"
 #include "Fenster.h"
 #include "Bild.h"
+#include "Model3DList.h"
+#include "Model3D.h"
 
 using namespace Framework;
 
@@ -12,17 +14,20 @@ GraphicsApi::GraphicsApi( GraphicApiType typ )
     fenster = 0;
     backBufferSize = Vec2<int>( 0, 0 );
     fullScreen = 0;
+    nextModelId = 0;
+    modelList = new Model3DList();
 }
 
 GraphicsApi::~GraphicsApi()
 {
 #ifdef _WIN32
+    modelList->release();
     if( fenster )
         fenster->release();
 #endif
 }
 
-void GraphicsApi::initialize( WFenster * fenster, Vec2<int> backBufferSize, bool fullScreen )
+void GraphicsApi::initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen )
 {
 #ifdef _WIN32
     if( this->fenster )
@@ -50,10 +55,10 @@ void GraphicsApi::setFullScreen( bool fullScreen )
 void GraphicsApi::beginFrame( bool fill2D, bool fill3D, int fillColor )
 {}
 
-void GraphicsApi::renderKamera( Kam3D * zKamera )
+void GraphicsApi::renderKamera( Kam3D* zKamera )
 {}
 
-Textur *GraphicsApi::createOrGetTextur( const char *name, Bild * b )
+Textur* GraphicsApi::createOrGetTextur( const char* name, Bild* b )
 {
     if( b )
         b->release();
@@ -73,4 +78,46 @@ Vec2< int > GraphicsApi::getBackBufferSize() const
 bool GraphicsApi::isFullScreen() const
 {
     return fullScreen;
+}
+
+// returns the specified model without increased reference counter
+Model3DData* GraphicsApi::zModel( const char* name )
+{
+    cs.lock();
+    Model3DData* data = modelList->zModel( name );
+    cs.unlock();
+    return data;
+}
+
+// returns the specified model with increased reference counter
+Model3DData* GraphicsApi::getModel( const char* name )
+{
+    cs.lock();
+    Model3DData* data = modelList->getModel( name );
+    cs.unlock();
+    return data;
+}
+
+// creates a new empty Model3DData object if the model does not exist yet
+Model3DData* GraphicsApi::createModel( const char* name )
+{
+    cs.lock();
+    if( modelList->hatModel( name ) )
+    {
+        cs.unlock();
+        return 0;
+    }
+    Model3DData* model = new Model3DData( createVertexBuffer(), createIndexBuffer(), nextModelId++ );
+    modelList->addModel( model, name );
+    cs.unlock();
+    return dynamic_cast<Model3DData*>(model->getThis());
+}
+
+// check if a model exists
+bool GraphicsApi::hasModel( const char* name )
+{
+    cs.lock();
+    bool res = modelList->hatModel( name );
+    cs.unlock();
+    return res;
 }

+ 96 - 75
GraphicsApi.h

@@ -8,7 +8,7 @@
 //! DirectX 12 Types
 
 struct ID3D12Debug;
-struct ID3D12Device2;
+struct ID3D12Device;
 struct ID3D12InfoQueue;
 struct ID3D12CommandQueue;
 struct IDXGISwapChain4;
@@ -68,6 +68,9 @@ namespace Framework
     class DX12VertexShader;
     class DX12VertexBuffer;
     class DX12IndexBuffer;
+    class Model3DList;
+    class DXBuffer;
+    class Model3DData;
 
     enum GraphicApiType;
 
@@ -88,97 +91,115 @@ namespace Framework
     {
     protected:
         GraphicApiType typ;
-        WFenster *fenster;
+        WFenster* fenster;
         Vec2<int> backBufferSize;
+        Model3DList* modelList;
+        int nextModelId;
+        Critical cs;
+
         bool fullScreen;
 
+        DLLEXPORT virtual DXBuffer* createIndexBuffer() = 0;
+        DLLEXPORT virtual DXBuffer* createVertexBuffer() = 0;
+
     public:
         DLLEXPORT GraphicsApi( GraphicApiType typ );
         DLLEXPORT virtual ~GraphicsApi();
-        DLLEXPORT virtual void initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fullScreen );
+        DLLEXPORT virtual void initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen );
         DLLEXPORT virtual void setBackBufferSize( Vec2< int > size );
         DLLEXPORT virtual void setFullScreen( bool fullScreen );
         DLLEXPORT virtual void update() = 0;
         DLLEXPORT virtual void beginFrame( bool fill2D = 0, bool fill3D = 0, int fillColor = 0 );
-        DLLEXPORT virtual void renderKamera( Kam3D *zKamera );
+        DLLEXPORT virtual void renderKamera( Kam3D* zKamera );
         DLLEXPORT virtual void presentFrame() = 0;
-        DLLEXPORT virtual Textur *createOrGetTextur( const char *name, Bild *b = 0 );
+        DLLEXPORT virtual Textur* createOrGetTextur( const char* name, Bild* b = 0 );
         DLLEXPORT GraphicApiType getTyp() const;
         DLLEXPORT Vec2< int > getBackBufferSize() const;
         DLLEXPORT bool isFullScreen() const;
-        DLLEXPORT virtual Bild *zUIRenderBild() const = 0;
+        DLLEXPORT virtual Bild* zUIRenderBild() const = 0;
+        // returns the specified model without increased reference counter
+        DLLEXPORT virtual Model3DData* zModel( const char* name );
+        // returns the specified model with increased reference counter
+        DLLEXPORT virtual Model3DData* getModel( const char* name );
+        // creates a new empty Model3DData object if the model does not exist yet
+        DLLEXPORT virtual Model3DData* createModel( const char* name );
+        // check if a model exists
+        DLLEXPORT virtual bool hasModel( const char* name );
     };
 
     class DirectX9 : public GraphicsApi
     {
     private:
-        IDirect3D9 *pDirect3D;
-        IDirect3DDevice9 *pDevice;
-        IDirect3DSurface9 *pBackBuffer;
-        _D3DLOCKED_RECT *backRect;
-        Bild *uiBild;
+        IDirect3D9* pDirect3D;
+        IDirect3DDevice9* pDevice;
+        IDirect3DSurface9* pBackBuffer;
+        _D3DLOCKED_RECT* backRect;
+        Bild* uiBild;
+
+        DLLEXPORT virtual DXBuffer* createIndexBuffer() override;
+        DLLEXPORT virtual DXBuffer* createVertexBuffer() override;
 
     public:
         DLLEXPORT DirectX9();
         DLLEXPORT ~DirectX9();
-        DLLEXPORT void initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fullScreen ) override;
+        DLLEXPORT void initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen ) override;
         DLLEXPORT void update() override;
         DLLEXPORT void beginFrame( bool fill2D, bool fill3D, int fillColor ) override;
-        DLLEXPORT void renderKamera( Kam3D *zKamera ) override;
+        DLLEXPORT void renderKamera( Kam3D* zKamera ) override;
         DLLEXPORT void presentFrame() override;
-        DLLEXPORT Textur *createOrGetTextur( const char *name, Bild *b ) override;
-        DLLEXPORT Bild *zUIRenderBild() const override;
+        DLLEXPORT Textur* createOrGetTextur( const char* name, Bild* b ) override;
+        DLLEXPORT Bild* zUIRenderBild() const override;
     };
 
     class DirectX11 : public GraphicsApi
     {
     private:
-        ID3D11Device *d3d11Device;
-        ID3D11DeviceContext *d3d11Context;
-        IDXGISwapChain *d3d11SpawChain;
-        Textur *uiTextur;
-        DX11VertexShader *vertexShader;
-        DX11PixelShader *pixelShader;
-        ID3D11SamplerState *sampleState;
-        ID3D11RenderTargetView *rtview;
-        ID3D11DepthStencilView *dsView;
-        ID3D11Texture2D *depthStencilBuffer;
-        ID3D11DepthStencilState *depthStencilState;
-        ID3D11DepthStencilState *depthDisabledStencilState;
-        ID3D11BlendState *blendStateAlphaBlend;
-        D3D11_VIEWPORT *vp;
-        TexturModel *texturModel;
-        TexturList *texturRegister;
-        ID3D11RasterizerState *texturRS;
-        ID3D11RasterizerState *meshRS;
-        Textur *defaultTextur;
-        DX11StructuredBuffer *diffuseLights;
-        DX11StructuredBuffer *pointLights;
-        DX11Buffer *vertexBuffer;
-        DX11Buffer *indexBuffer;
+        ID3D11Device* d3d11Device;
+        ID3D11DeviceContext* d3d11Context;
+        IDXGISwapChain* d3d11SpawChain;
+        Textur* uiTextur;
+        DX11VertexShader* vertexShader;
+        DX11PixelShader* pixelShader;
+        ID3D11SamplerState* sampleState;
+        ID3D11RenderTargetView* rtview;
+        ID3D11DepthStencilView* dsView;
+        ID3D11Texture2D* depthStencilBuffer;
+        ID3D11DepthStencilState* depthStencilState;
+        ID3D11DepthStencilState* depthDisabledStencilState;
+        ID3D11BlendState* blendStateAlphaBlend;
+        D3D11_VIEWPORT* vp;
+        TexturModel* texturModel;
+        TexturList* texturRegister;
+        ID3D11RasterizerState* texturRS;
+        ID3D11RasterizerState* meshRS;
+        Textur* defaultTextur;
+        DX11StructuredBuffer* diffuseLights;
+        DX11StructuredBuffer* pointLights;
         Mat4< float > matrixBuffer[ MAX_KNOCHEN_ANZ ];
         Mat4< float > viewAndProj[ 2 ];
         Vec3< float > kamPos;
         Ebene3D< float > frustrum[ 6 ];
         int lastModelId = -1;
 
-        void renderObject( Model3D *zObj );
+        void renderObject( Model3D* zObj );
         //! Überprüft, ob eine Kugel in dem Sichtbaren Raum der Welt liegt und gezeichnet werden muss
         //! \param pos Der Mittelpunkt der Kugel
         //! \param radius Der Radius der Kugel
         //! \param dist Einen Zeiger auf einen float, in dem das quadrat des Abstands zur Kammeraposition gespeichert wird, falls diese Funktion true zurückgiebt und der Zeiger nicht 0 ist
-        bool isInFrustrum( const Vec3< float > &pos, float radius, float *dist = 0 ) const;
+        bool isInFrustrum( const Vec3< float >& pos, float radius, float* dist = 0 ) const;
+        DLLEXPORT virtual DXBuffer* createIndexBuffer() override;
+        DLLEXPORT virtual DXBuffer* createVertexBuffer() override;
 
     public:
         DLLEXPORT DirectX11();
         DLLEXPORT ~DirectX11();
-        DLLEXPORT void initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fullScreen ) override;
+        DLLEXPORT void initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen ) override;
         DLLEXPORT void update() override;
         DLLEXPORT void beginFrame( bool fill2D, bool fill3D, int fillColor ) override;
-        DLLEXPORT void renderKamera( Kam3D *zKamera ) override;
+        DLLEXPORT void renderKamera( Kam3D* zKamera ) override;
         DLLEXPORT void presentFrame() override;
-        DLLEXPORT Textur *createOrGetTextur( const char *name, Bild *b ) override;
-        DLLEXPORT Bild *zUIRenderBild() const override;
+        DLLEXPORT Textur* createOrGetTextur( const char* name, Bild* b ) override;
+        DLLEXPORT Bild* zUIRenderBild() const override;
 
         DLLEXPORT static bool isAvailable();
     };
@@ -186,55 +207,55 @@ namespace Framework
     class DirectX12 : public GraphicsApi
     {
     private:
-        ID3D12Debug *debug;
-        ID3D12Device2 *device;
-        ID3D12InfoQueue *infoQueue;
-        DX12DirectCommandQueue *directCommandQueue;
-        DX12CopyCommandQueue *copyCommandQueue;
-        DX12ComputeCommandQueue *computeCommandQueue;
-        IDXGISwapChain4 *swapChain;
-        ID3D12DescriptorHeap *rtvHeap;
-        ID3D12DescriptorHeap *dsvHeap;
-        ID3D12DescriptorHeap *shaderBufferHeap;
-        ID3D12Resource *depthBuffer;
-        ID3D12Resource *backBuffer[ 2 ];
+        ID3D12Debug* debug;
+        ID3D12Device* device;
+        ID3D12InfoQueue* infoQueue;
+        DX12DirectCommandQueue* directCommandQueue;
+        DX12CopyCommandQueue* copyCommandQueue;
+        DX12ComputeCommandQueue* computeCommandQueue;
+        IDXGISwapChain4* swapChain;
+        ID3D12DescriptorHeap* rtvHeap;
+        ID3D12DescriptorHeap* dsvHeap;
+        ID3D12DescriptorHeap* shaderBufferHeap;
+        ID3D12Resource* depthBuffer;
+        ID3D12Resource* backBuffer[ 2 ];
         int backBufferIndex;
         int tearing;
-        D3D12_VIEWPORT *viewPort;
-        tagRECT *allowedRenderArea;
-        D3D12_VERTEX_BUFFER_VIEW *vertexBufferView;
-        D3D12_INDEX_BUFFER_VIEW *indexBufferView;
-        DX12VertexBuffer *vertexBuffer;
-        DX12IndexBuffer *indexBuffer;
-        ID3D12RootSignature *signature;
-        ID3D12PipelineState *pipeline;
+        D3D12_VIEWPORT* viewPort;
+        tagRECT* allowedRenderArea;
+        D3D12_VERTEX_BUFFER_VIEW* vertexBufferView;
+        D3D12_INDEX_BUFFER_VIEW* indexBufferView;
+        ID3D12RootSignature* signature;
+        ID3D12PipelineState* pipeline;
         Mat4< float > matrixBuffer[ MAX_KNOCHEN_ANZ ];
         Mat4< float > viewAndProj[ 2 ];
         Vec3< float > kamPos;
         Ebene3D< float > frustrum[ 6 ];
-        TexturModel *texturModel;
-        Textur *uiTextur;
-        TexturList *texturRegister;
-        DX12VertexShader *vertexShader;
-        DX12PixelShader *pixelShader;
+        TexturModel* texturModel;
+        Textur* uiTextur;
+        TexturList* texturRegister;
+        DX12VertexShader* vertexShader;
+        DX12PixelShader* pixelShader;
 
-        void renderObject( Model3D *zObj );
+        void renderObject( Model3D* zObj );
         //! Überprüft, ob eine Kugel in dem Sichtbaren Raum der Welt liegt und gezeichnet werden muss
         //! \param pos Der Mittelpunkt der Kugel
         //! \param radius Der Radius der Kugel
         //! \param dist Einen Zeiger auf einen float, in dem das quadrat des Abstands zur Kammeraposition gespeichert wird, falls diese Funktion true zurückgiebt und der Zeiger nicht 0 ist
-        bool isInFrustrum( const Vec3< float > &pos, float radius, float *dist = 0 ) const;
+        bool isInFrustrum( const Vec3< float >& pos, float radius, float* dist = 0 ) const;
+        DLLEXPORT virtual DXBuffer* createIndexBuffer() override;
+        DLLEXPORT virtual DXBuffer* createVertexBuffer() override;
 
     public:
         DLLEXPORT DirectX12();
         DLLEXPORT ~DirectX12();
-        DLLEXPORT void initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fullScreen ) override;
+        DLLEXPORT void initialize( WFenster* fenster, Vec2<int> backBufferSize, bool fullScreen ) override;
         DLLEXPORT void update() override;
         DLLEXPORT void beginFrame( bool fill2D, bool fill3D, int fillColor ) override;
-        DLLEXPORT void renderKamera( Kam3D *zKamera ) override;
+        DLLEXPORT void renderKamera( Kam3D* zKamera ) override;
         DLLEXPORT void presentFrame() override;
-        DLLEXPORT Textur *createOrGetTextur( const char *name, Bild *b ) override;
-        DLLEXPORT Bild *zUIRenderBild() const override;
+        DLLEXPORT Textur* createOrGetTextur( const char* name, Bild* b ) override;
+        DLLEXPORT Bild* zUIRenderBild() const override;
 
         DLLEXPORT static bool isAvailable();
     };

+ 80 - 78
M3Datei.cpp

@@ -1,6 +1,7 @@
 #include "M3Datei.h"
 #include "Datei.h"
 #include "Model3D.h"
+#include "GraphicsApi.h"
 
 using namespace Framework;
 
@@ -15,7 +16,7 @@ M3Datei::M3Datei()
 
 // Konstruktor
 //  pfad: Der Pfad zur Datei
-M3Datei::M3Datei( const char *pfad )
+M3Datei::M3Datei( const char* pfad )
     : M3Datei()
 {
     this->pfad = pfad;
@@ -23,7 +24,7 @@ M3Datei::M3Datei( const char *pfad )
 
 // Konstruktor
 //  pfad: Der Pfad zur Datei
-M3Datei::M3Datei( Text *pfad )
+M3Datei::M3Datei( Text* pfad )
     : M3Datei( pfad->getText() )
 {
     pfad->release();
@@ -38,49 +39,49 @@ M3Datei::~M3Datei()
         modelPos->release();
 }
 
-void M3Datei::saveKnochen( Knochen *k, Datei *zDat )
+void M3Datei::saveKnochen( Knochen* k, Datei* zDat )
 {
     bool c = k != 0;
-    zDat->schreibe( (char *)&c, 1 );
+    zDat->schreibe( (char*)&c, 1 );
     if( c )
     {
         int id = k->getId();
-        zDat->schreibe( (char *)&id, 4 );
+        zDat->schreibe( (char*)&id, 4 );
         float f = k->getPosition().x;
-        zDat->schreibe( (char *)&f, 4 );
+        zDat->schreibe( (char*)&f, 4 );
         f = k->getPosition().y;
-        zDat->schreibe( (char *)&f, 4 );
+        zDat->schreibe( (char*)&f, 4 );
         f = k->getPosition().z;
-        zDat->schreibe( (char *)&f, 4 );
+        zDat->schreibe( (char*)&f, 4 );
         f = k->getDrehung().x;
-        zDat->schreibe( (char *)&f, 4 );
+        zDat->schreibe( (char*)&f, 4 );
         f = k->getDrehung().y;
-        zDat->schreibe( (char *)&f, 4 );
+        zDat->schreibe( (char*)&f, 4 );
         f = k->getDrehung().z;
-        zDat->schreibe( (char *)&f, 4 );
+        zDat->schreibe( (char*)&f, 4 );
         saveKnochen( k->zGeschwister(), zDat );
         saveKnochen( k->zKind(), zDat );
     }
 }
 
-Knochen *Framework::M3Datei::readKnochen( Datei *zDat ) const
+Knochen* Framework::M3Datei::readKnochen( Datei* zDat ) const
 {
     bool c;
-    zDat->lese( (char *)&c, 1 );
+    zDat->lese( (char*)&c, 1 );
     if( c )
     {
         int id;
-        zDat->lese( (char *)&id, 4 );
-        Knochen *k = new Knochen( id );
+        zDat->lese( (char*)&id, 4 );
+        Knochen* k = new Knochen( id );
         Vec3< float > pos;
-        zDat->lese( (char *)&pos.x, 4 );
-        zDat->lese( (char *)&pos.y, 4 );
-        zDat->lese( (char *)&pos.z, 4 );
+        zDat->lese( (char*)&pos.x, 4 );
+        zDat->lese( (char*)&pos.y, 4 );
+        zDat->lese( (char*)&pos.z, 4 );
         k->setPosition( pos );
         Vec3< float > rot;
-        zDat->lese( (char *)&rot.x, 4 );
-        zDat->lese( (char *)&rot.y, 4 );
-        zDat->lese( (char *)&rot.z, 4 );
+        zDat->lese( (char*)&rot.x, 4 );
+        zDat->lese( (char*)&rot.y, 4 );
+        zDat->lese( (char*)&rot.z, 4 );
         k->setDrehung( rot );
         k->addGeschwisterKnochen( readKnochen( zDat ) );
         k->addKind( id, readKnochen( zDat ) );
@@ -92,22 +93,22 @@ Knochen *Framework::M3Datei::readKnochen( Datei *zDat ) const
 // Setzt den Pfad zur Datei
 
 //  pfad: Pfad zur Datei
-void M3Datei::setPfad( const char *pfad )
+void M3Datei::setPfad( const char* pfad )
 {
     this->pfad = pfad;
     if( modelName )
-        modelName = ( RCArray<Text>* )modelName->release();
+        modelName = (RCArray<Text>*)modelName->release();
     if( modelPos )
-        modelPos = ( Array<__int64>* )modelPos->release();
+        modelPos = (Array<__int64>*)modelPos->release();
 }
 
 // Ließt grundlegende Informationen aus der Datei, die für ihre Verwendung benötigt werden
 void M3Datei::leseDaten()
 {
     if( modelName )
-        modelName = ( RCArray<Text>* )modelName->release();
+        modelName = (RCArray<Text>*)modelName->release();
     if( modelPos )
-        modelPos = ( Array<__int64>* )modelPos->release();
+        modelPos = (Array<__int64>*)modelPos->release();
     modelName = new RCArray< Text >();
     modelPos = new Array< __int64 >();
     Datei d;
@@ -115,18 +116,18 @@ void M3Datei::leseDaten()
     if( !d.open( Datei::Style::lesen ) )
         return;
     unsigned char anz = 0;
-    d.lese( (char *)&anz, 1 );
+    d.lese( (char*)&anz, 1 );
     for( int i = 0; i < anz; i++ )
     {
         char len = 0;
         d.lese( &len, 1 );
-        char *n = new char[ len + 1 ];
+        char* n = new char[ len + 1 ];
         n[ (int)len ] = 0;
         d.lese( n, len );
         modelName->add( new Text( n ) );
         delete[] n;
         __int64 p = 0;
-        d.lese( (char *)&p, 8 );
+        d.lese( (char*)&p, 8 );
         modelPos->add( p );
     }
     d.close();
@@ -136,7 +137,7 @@ void M3Datei::leseDaten()
 //  zMdr: Ein Zeiger auf die zu speichernden Daten ohne erhöhtem Reference Counter
 //  name: Der Name, unter dem die Daten in der Datei gespeichert werden sollen
 //  return: 1, falls das Modell gespeichert wurde. 0, falls ein fehler beim speichern auftrat
-bool M3Datei::saveModel( Model3DData *zMdr, Text *name )
+bool M3Datei::saveModel( Model3DData* zMdr, Text* name )
 {
     bool ret = saveModel( zMdr, name->getText() );
     name->release();
@@ -147,7 +148,7 @@ bool M3Datei::saveModel( Model3DData *zMdr, Text *name )
 //  zMdr: Ein Zeiger auf die zu speichernden Daten ohne erhöhtem Reference Counter
 //  name: Der Name, unter dem die Daten in der Datei gespeichert werden sollen
 //  return: 1, falls das Modell gespeichert wurde. 0, falls ein fehler beim speichern auftrat
-bool M3Datei::saveModel( Model3DData *zMdr, const char *name )
+bool M3Datei::saveModel( Model3DData* zMdr, const char* name )
 {
     if( !modelName || !pfad.getLength() )
         return 0;
@@ -186,7 +187,7 @@ bool M3Datei::saveModel( Model3DData *zMdr, const char *name )
         neu.schreibe( &len, 1 );
         neu.schreibe( modelName->z( i )->getText(), len );
         __int64 pos = modelPos->get( i );
-        neu.schreibe( (char *)&pos, 8 );
+        neu.schreibe( (char*)&pos, 8 );
     }
     if( d.existiert() )
     {
@@ -203,45 +204,45 @@ bool M3Datei::saveModel( Model3DData *zMdr, const char *name )
     }
     d.close();
     int vAnz = zMdr->getVertexAnzahl();
-    neu.schreibe( (char *)&vAnz, 4 );
+    neu.schreibe( (char*)&vAnz, 4 );
     for( int i = 0; i < vAnz; i++ )
     {
-        neu.schreibe( (char *)&zMdr->zVertexBuffer()[ i ].knochenId, 4 );
-        neu.schreibe( (char *)&zMdr->zVertexBuffer()[ i ].pos.x, 4 );
-        neu.schreibe( (char *)&zMdr->zVertexBuffer()[ i ].pos.y, 4 );
-        neu.schreibe( (char *)&zMdr->zVertexBuffer()[ i ].pos.z, 4 );
-        neu.schreibe( (char *)&zMdr->zVertexBuffer()[ i ].tPos.x, 4 );
-        neu.schreibe( (char *)&zMdr->zVertexBuffer()[ i ].tPos.y, 4 );
+        neu.schreibe( (char*)&zMdr->zVertexBuffer()[ i ].knochenId, 4 );
+        neu.schreibe( (char*)&zMdr->zVertexBuffer()[ i ].pos.x, 4 );
+        neu.schreibe( (char*)&zMdr->zVertexBuffer()[ i ].pos.y, 4 );
+        neu.schreibe( (char*)&zMdr->zVertexBuffer()[ i ].pos.z, 4 );
+        neu.schreibe( (char*)&zMdr->zVertexBuffer()[ i ].tPos.x, 4 );
+        neu.schreibe( (char*)&zMdr->zVertexBuffer()[ i ].tPos.y, 4 );
     }
     int pAnz = zMdr->getPolygonAnzahl();
-    neu.schreibe( (char *)&pAnz, 4 );
+    neu.schreibe( (char*)&pAnz, 4 );
     for( int p = 0; p < pAnz; p++ )
     {
-        Polygon3D *pol = zMdr->getPolygon( p );
+        Polygon3D* pol = zMdr->getPolygon( p );
         int anz = pol->indexAnz;
-        neu.schreibe( (char *)&anz, 4 );
-        neu.schreibe( (char *)pol->indexList, anz * 4 );
+        neu.schreibe( (char*)&anz, 4 );
+        neu.schreibe( (char*)pol->indexList, anz * 4 );
     }
     float factor = zMdr->getAmbientFactor();
-    neu.schreibe( (char *)&factor, 4 );
+    neu.schreibe( (char*)&factor, 4 );
     factor = zMdr->getDiffusFactor();
-    neu.schreibe( (char *)&factor, 4 );
+    neu.schreibe( (char*)&factor, 4 );
     factor = zMdr->getSpecularFactor();
-    neu.schreibe( (char *)&factor, 4 );
-    Skelett *skelet = zMdr->copySkelett();
+    neu.schreibe( (char*)&factor, 4 );
+    Skelett* skelet = zMdr->copySkelett();
     if( skelet )
     {
         bool b = 1;
-        neu.schreibe( (char *)&b, 1 );
+        neu.schreibe( (char*)&b, 1 );
         int nId = skelet->zNextKnochenId();
-        neu.schreibe( (char *)&nId, 4 );
+        neu.schreibe( (char*)&nId, 4 );
         saveKnochen( skelet->zKnochen(), &neu );
         skelet->release();
     }
     else
     {
         bool b = 0;
-        neu.schreibe( (char *)&b, 1 );
+        neu.schreibe( (char*)&b, 1 );
     }
     d.remove();
     neu.close();
@@ -252,7 +253,7 @@ bool M3Datei::saveModel( Model3DData *zMdr, const char *name )
 // Löscht ein 3D Modell aus der Datei
 //  name: Der Name des Modells
 //  return: 1, wenn das Modell gelöscht wurde. 0, wenn das Modell nicht gefunden wurde, oder ein fehler beim speichern auftrat
-bool M3Datei::removeModel( Text *name )
+bool M3Datei::removeModel( Text* name )
 {
     bool res = removeModel( name->getText() );
     name->release();
@@ -262,7 +263,7 @@ bool M3Datei::removeModel( Text *name )
 // Löscht ein 3D Modell aus der Datei
 //  name: Der Name des Modells
 //  return: 1, wenn das Modell gelöscht wurde. 0, wenn das Modell nicht gefunden wurde, oder ein fehler beim speichern auftrat
-bool M3Datei::removeModel( const char *name )
+bool M3Datei::removeModel( const char* name )
 {
     if( !modelName || !pfad.getLength() )
         return 0;
@@ -283,7 +284,7 @@ bool M3Datei::removeModel( const char *name )
         d.close();
         return 0;
     }
-    char anz = (char)( modelName->getEintragAnzahl() - 1 );
+    char anz = (char)(modelName->getEintragAnzahl() - 1);
     neu.schreibe( &anz, 1 );
     __int64 offset = textLength( name ) + 9;
     __int64 removedLength = 0;
@@ -298,7 +299,7 @@ bool M3Datei::removeModel( const char *name )
             neu.schreibe( modelName->z( i )->getText(), len );
             modelPos->set( modelPos->get( i ) - offset, i );
             __int64 pos = modelPos->get( i );
-            neu.schreibe( (char *)&pos, 8 );
+            neu.schreibe( (char*)&pos, 8 );
         }
         else
         {
@@ -342,17 +343,18 @@ bool M3Datei::removeModel( const char *name )
 // Lähd ein 3D Modell aus der Datei
 //  name: Der name des zu ladenden Modells
 //  return: Die geladenen Daten
-Model3DData *M3Datei::ladeModel( Text *name ) const
+Model3DData* M3Datei::ladeModel( Text* name, GraphicsApi* zApi, Text* uniqueName ) const
 {
-    Model3DData *d = ladeModel( name->getText() );
+    Model3DData* d = ladeModel( name->getText(), zApi, uniqueName->getText() );
     name->release();
+    uniqueName->release();
     return d;
 }
 
 // Lähd ein 3D Modell aus der Datei
 //  name: Der name des zu ladenden Modells
 //  return: Die geladenen Daten
-Model3DData *M3Datei::ladeModel( const char *name ) const
+Model3DData* M3Datei::ladeModel( const char* name, GraphicsApi* zApi, const char* uniqueName ) const
 {
     if( !modelName || !pfad.getLength() )
         return 0;
@@ -375,44 +377,44 @@ Model3DData *M3Datei::ladeModel( const char *name ) const
             return 0;
         }
         d.setLPosition( pos, 0 );
-        Model3DData *model = new Model3DData();
+        Model3DData* model = zApi->createModel( uniqueName );
         int vAnz;
-        d.lese( (char *)&vAnz, 4 );
-        Vertex3D *vertices = new Vertex3D[ vAnz ];
+        d.lese( (char*)&vAnz, 4 );
+        Vertex3D* vertices = new Vertex3D[ vAnz ];
         for( int i = 0; i < vAnz; i++ )
         {
-            d.lese( (char *)&vertices[ i ].knochenId, 4 );
-            d.lese( (char *)&vertices[ i ].pos.x, 4 );
-            d.lese( (char *)&vertices[ i ].pos.y, 4 );
-            d.lese( (char *)&vertices[ i ].pos.z, 4 );
-            d.lese( (char *)&vertices[ i ].tPos.x, 4 );
-            d.lese( (char *)&vertices[ i ].tPos.y, 4 );
+            d.lese( (char*)&vertices[ i ].knochenId, 4 );
+            d.lese( (char*)&vertices[ i ].pos.x, 4 );
+            d.lese( (char*)&vertices[ i ].pos.y, 4 );
+            d.lese( (char*)&vertices[ i ].pos.z, 4 );
+            d.lese( (char*)&vertices[ i ].tPos.x, 4 );
+            d.lese( (char*)&vertices[ i ].tPos.y, 4 );
         }
         model->setVertecies( vertices, vAnz );
         int pAnz;
-        d.lese( (char *)&pAnz, 4 );
+        d.lese( (char*)&pAnz, 4 );
         for( int i = 0; i < pAnz; i++ )
         {
-            Polygon3D *p = new Polygon3D();
-            d.lese( (char *)&p->indexAnz, 4 );
+            Polygon3D* p = new Polygon3D();
+            d.lese( (char*)&p->indexAnz, 4 );
             p->indexList = new int[ p->indexAnz ];
-            d.lese( (char *)p->indexList, p->indexAnz * 4 );
+            d.lese( (char*)p->indexList, p->indexAnz * 4 );
             model->addPolygon( p );
         }
         float factor;
-        d.lese( (char *)&factor, 4 );
+        d.lese( (char*)&factor, 4 );
         model->setAmbientFactor( factor );
-        d.lese( (char *)&factor, 4 );
+        d.lese( (char*)&factor, 4 );
         model->setDiffusFactor( factor );
-        d.lese( (char *)&factor, 4 );
+        d.lese( (char*)&factor, 4 );
         model->setSpecularFactor( factor );
         bool b;
-        d.lese( (char *)&b, 1 );
+        d.lese( (char*)&b, 1 );
         if( b )
         {
-            Skelett *s = new Skelett();
+            Skelett* s = new Skelett();
             int nId;
-            d.lese( (char *)&nId, 4 );
+            d.lese( (char*)&nId, 4 );
             s->setNextKnochenId( nId );
             s->addKnochen( readKnochen( &d ) );
             model->setSkelettZ( s );
@@ -427,7 +429,7 @@ Model3DData *M3Datei::ladeModel( const char *name ) const
 // überprft, ob ein bestimmtes 3D Modell in der Datei existiert
 //  name: Der Name des zu suchenden 3D Modells
 //  return: 1, wenn das Modell gefunden wurde. 0 sonst
-bool M3Datei::hatModel( const char *name ) const
+bool M3Datei::hatModel( const char* name ) const
 {
     if( !modelName || !pfad.getLength() )
         return 0;
@@ -450,7 +452,7 @@ int M3Datei::getModelAnzahl() const
 // Gibt den Namen eines Bestimmten Modells zurück
 //  i: Der Index des Modells
 //  return: Ein Zeiger aud den Namen des Modells ohne erhöhten Reference Counter
-Text *M3Datei::zModelName( int i ) const
+Text* M3Datei::zModelName( int i ) const
 {
     if( !modelName || !pfad.getLength() )
         return 0;

+ 16 - 15
M3Datei.h

@@ -9,69 +9,70 @@ namespace Framework
     class Model3DData;
     class Knochen;
     class Datei;
+    class GraphicsApi;
 
     //! Verwaltet eine Datei, in der 3d Modelle abgespeichert wurden
     class M3Datei : public virtual ReferenceCounter
     {
     private:
         Text pfad;
-        RCArray< Text > *modelName;
-        Array< __int64 > *modelPos;
+        RCArray< Text >* modelName;
+        Array< __int64 >* modelPos;
 
-        void saveKnochen( Knochen *k, Datei *zDat );
-        Knochen *readKnochen( Datei *zDat ) const;
+        void saveKnochen( Knochen* k, Datei* zDat );
+        Knochen* readKnochen( Datei* zDat ) const;
 
     public:
         //! Konstruktor
         DLLEXPORT M3Datei();
         //! Konstruktor
         //! \param pfad Der Pfad zur Datei
-        DLLEXPORT M3Datei( const char *pfad );
+        DLLEXPORT M3Datei( const char* pfad );
         //! Konstruktor
         //! \param pfad Der Pfad zur Datei
-        DLLEXPORT M3Datei( Text *pfad );
+        DLLEXPORT M3Datei( Text* pfad );
         //! Destruktor
         DLLEXPORT ~M3Datei();
         //! Setzt den Pfad zur Datei
         //! \param pfad Pfad zur Datei
-        DLLEXPORT void setPfad( const char *pfad );
+        DLLEXPORT void setPfad( const char* pfad );
         //! Ließt grundlegende Informationen aus der Datei, die für ihre Verwendung benötigt werden
         DLLEXPORT void leseDaten();
         //! Speichert 3D Modell Daten in der Datei
         //! \param zMdr Ein Zeiger auf die zu speichernden Daten ohne erhöhtem Reference Counter
         //! \param name Der Name, unter dem die Daten in der Datei gespeichert werden sollen
         //! \return 1, falls das Modell gespeichert wurde. 0, falls ein fehler beim speichern auftrat
-        DLLEXPORT bool saveModel( Model3DData *zMdr, Text *name );
+        DLLEXPORT bool saveModel( Model3DData* zMdr, Text* name );
         //! Speichert 3D Modell Daten in der Datei
         //! \param zMdr Ein Zeiger auf die zu speichernden Daten ohne erhöhtem Reference Counter
         //! \param name Der Name, unter dem die Daten in der Datei gespeichert werden sollen
         //! \return 1, falls das Modell gespeichert wurde. 0, falls ein fehler beim speichern auftrat
-        DLLEXPORT bool saveModel( Model3DData *zMdr, const char *name );
+        DLLEXPORT bool saveModel( Model3DData* zMdr, const char* name );
         //! Löscht ein 3D Modell aus der Datei
         //! \param name Der Name des Modells
         //! \return 1, wenn das Modell gelöscht wurde. 0, wenn das Modell nicht gefunden wurde, oder ein fehler beim speichern auftrat
-        DLLEXPORT bool removeModel( Text *name );
+        DLLEXPORT bool removeModel( Text* name );
         //! Löscht ein 3D Modell aus der Datei
         //! \param name Der Name des Modells
         //! \return 1, wenn das Modell gelöscht wurde. 0, wenn das Modell nicht gefunden wurde, oder ein fehler beim speichern auftrat
-        DLLEXPORT bool removeModel( const char *name );
+        DLLEXPORT bool removeModel( const char* name );
         //! Lähd ein 3D Modell aus der Datei
         //! \param name Der name des zu ladenden Modells
         //! \return Die geladenen Daten
-        DLLEXPORT Model3DData *ladeModel( Text *name ) const;
+        DLLEXPORT Model3DData* ladeModel( Text* name, GraphicsApi* zApi, Text* uniqueName ) const;
         //! Lähd ein 3D Modell aus der Datei
         //! \param name Der name des zu ladenden Modells
         //! \return Die geladenen Daten
-        DLLEXPORT Model3DData *ladeModel( const char *name ) const;
+        DLLEXPORT Model3DData* ladeModel( const char* name, GraphicsApi* zApi, const char* uniqueName ) const;
         //! überprft, ob ein bestimmtes 3D Modell in der Datei existiert
         //! \param name Der Name des zu suchenden 3D Modells
         //! \return 1, wenn das Modell gefunden wurde. 0 sonst
-        DLLEXPORT bool hatModel( const char *name ) const;
+        DLLEXPORT bool hatModel( const char* name ) const;
         //! ügibt die Anzahl der gespeicherten Modelle zurück
         DLLEXPORT int getModelAnzahl() const;
         //! Gibt den Namen eines Bestimmten Modells zurück
         //! \param i Der Index des Modells
         //! \return Ein Zeiger aud den Namen des Modells ohne erhöhten Reference Counter
-        DLLEXPORT Text *zModelName( int i ) const;
+        DLLEXPORT Text* zModelName( int i ) const;
     };
 }

+ 42 - 3
Model3D.cpp

@@ -256,10 +256,12 @@ Polygon3D::~Polygon3D()
 // Inhalt der Model3DData Klasse
 
 // Konstruktor
-Model3DData::Model3DData()
-    : ReferenceCounter()
+Model3DData::Model3DData( DXBuffer* dxVertexBuffer, DXBuffer* dxIndexBuffer, int id )
+    : ReferenceCounter(),
+    dxIndexBuffer( dxIndexBuffer ),
+    dxVertexBuffer( dxVertexBuffer ),
+    id( id )
 {
-    id = -1;
     skelett = 0;
     vertexList = 0;
     vertexCount = 0;
@@ -277,9 +279,18 @@ Model3DData::~Model3DData()
 {
     clearModel();
     polygons->release();
+    dxIndexBuffer->release();
+    dxVertexBuffer->release();
     delete[] indexBuffer;
 }
 
+// updates the DX Buffer gpu memory if changed
+DLLEXPORT void Model3DData::updateGPUMemory()
+{
+    dxIndexBuffer->copieren();
+    dxVertexBuffer->copieren();
+}
+
 // Löscht alle Model daten
 void Model3DData::clearModel()
 {
@@ -339,6 +350,8 @@ void Model3DData::buildIndexBuffer()
         memcpy( indexBuffer + current, p->indexList, sizeof( int ) * p->indexAnz );
         current += p->indexAnz;
     }
+    dxIndexBuffer->setLength( indexCount * sizeof( int ) );
+    dxIndexBuffer->setData( indexBuffer );
 }
 
 // Setzt den Zeiger auf ein standartmäßig verwendete Skelett
@@ -365,6 +378,8 @@ void Model3DData::setVertecies( Vertex3D* vertexList, int anz )
         if( r > radius )
             radius = r;
     }
+    dxVertexBuffer->setLength( anz * sizeof( Vertex3D ) );
+    dxVertexBuffer->setData( vertexList );
 }
 
 // Fügt ein Polygon zum Model hinzu
@@ -440,6 +455,8 @@ void Model3DData::copyModel2D( Model2DData* model, float z )
             }
             addPolygon( p );
         }
+        dxVertexBuffer->setLength( vAnz * sizeof( Vertex3D ) );
+        dxVertexBuffer->setData( vertexList );
     }
 }
 
@@ -548,6 +565,18 @@ int Model3DData::getIndexCount() const
     return indexCount;
 }
 
+//! Gibt den Index buffer zurück;
+DXBuffer* Model3DData::zDXIndexBuffer() const
+{
+    return dxIndexBuffer;
+}
+
+//! Gibt den Vertex buffer zurück;
+DXBuffer* Model3DData::zDXVertexBuffer() const
+{
+    return dxVertexBuffer;
+}
+
 
 // Inhalt der Model3DTextur
 
@@ -904,4 +933,14 @@ const Vertex3D* Model3D::zVertexBuffer() const
 bool Model3D::needRenderPolygon( int index )
 {
     return 1;
+}
+
+Textur* Model3D::zEffectTextur()
+{
+    return 0;
+}
+
+float Model3D::getEffectPercentage()
+{
+    return 0;
 }

+ 12 - 3
Model3D.h

@@ -18,6 +18,7 @@ namespace Framework
     class Model3DList; //! Model3DList.h
     class Animation3D; //! Animation3D.h
     class Welt3D; //! Welt3D.h
+    class DXBuffer;
 
     //! Repräsentiert einen Knochen eines 3D Models. Kann annimiert werden
     class Knochen
@@ -148,13 +149,17 @@ namespace Framework
         float radius;
         int* indexBuffer;
         int indexCount;
+        DXBuffer* dxIndexBuffer;
+        DXBuffer* dxVertexBuffer;
         int id;
 
     public:
         //! Konstruktor
-        DLLEXPORT Model3DData();
+        DLLEXPORT Model3DData( DXBuffer* dxVertexBuffer, DXBuffer* dxIndexBuffer, int id );
         //! Destruktor
         DLLEXPORT ~Model3DData();
+        // updates the DX Buffer gpu memory if changed
+        DLLEXPORT void updateGPUMemory();
         //! Löscht alle Model daten
         DLLEXPORT void clearModel();
         //! Berechnet die normalen für die Eckpunkte des Modells
@@ -221,8 +226,10 @@ namespace Framework
         DLLEXPORT const int* getIndexBuffer() const;
         //! Gibt eine die Anzahl der indizes im indexBuffer zurück
         DLLEXPORT int getIndexCount() const;
-
-        friend Model3DList;
+        //! Gibt den Index buffer zurück;
+        DLLEXPORT DXBuffer* zDXIndexBuffer() const;
+        //! Gibt den Vertex buffer zurück;
+        DLLEXPORT DXBuffer* zDXVertexBuffer() const;
     };
 
     //! Speichert eine Liste mit Texturen und für welche Polygone welche Textur benutzt werden soll
@@ -337,5 +344,7 @@ namespace Framework
         DLLEXPORT const Vertex3D* zVertexBuffer() const;
         //! Gibt true zurück wenn ein bestimmtes polygon gezeichnet werden muss
         DLLEXPORT virtual bool needRenderPolygon( int index );
+        DLLEXPORT virtual Textur* zEffectTextur();
+        DLLEXPORT virtual float getEffectPercentage();
     };
 }

+ 12 - 34
Model3DList.cpp

@@ -4,10 +4,9 @@
 
 using namespace Framework;
 
-int Model3DList::id = 0;
-Critical Model3DList::cs;
 
-const char *Standart3DTypes::cube = "f_würfel";
+const char* Standart3DTypes::cube = "f_würfel";
+const char* Standart3DTypes::texturModel = "f_texturModel";
 
 // Inhalt der Model3DList Klasse
 // Konstruktor
@@ -28,30 +27,25 @@ Model3DList::~Model3DList()
 // Fügt der Liste ein Model Hinzu
 //  mdl: Das Model
 //  name: Der name, unter dem das Model in der Liste gespeichert wird
-bool Model3DList::addModel( Model3DData *mdl, const char *name )
+bool Model3DList::addModel( Model3DData* mdl, const char* name )
 {
-    cs.lock();
     for( auto i : *names )
     {
         if( i->istGleich( name ) )
         {
             mdl->release();
-            cs.unlock();
             return 0;
         }
     }
-    mdl->id = id++;
     models->add( mdl );
     names->add( new Text( name ) );
-    cs.unlock();
     return 1;
 }
 
 // Entfernt ein Model aus der Liste
 //  name: Der Name des Models
-void Model3DList::removeModel( const char *name )
+void Model3DList::removeModel( const char* name )
 {
-    cs.lock();
     int index = 0;
     for( auto i : *names )
     {
@@ -59,78 +53,62 @@ void Model3DList::removeModel( const char *name )
         {
             names->remove( index );
             models->remove( index );
-            cs.unlock();
             return;
         }
         index++;
     }
-    cs.unlock();
 }
 
 // Überprüft, ob unter einem bestimmten Namen ein Model abgespeichert wurde
 //  name: Der Name
 //  return: true, wenn ein Model mit dem Namen existiert
-bool Model3DList::hatModel( const char *name ) const
+bool Model3DList::hatModel( const char* name ) const
 {
-    cs.lock();
     for( auto i : *names )
     {
         if( i->istGleich( name ) )
         {
-            cs.unlock();
             return 1;
         }
     }
-    cs.unlock();
     return 0;
 }
 
 // Gibt ein bestimmtes Model zurück
 //  name: Der Name des Models
-Model3DData *Model3DList::getModel( const char *name ) const
+Model3DData* Model3DList::getModel( const char* name ) const
 {
-    cs.lock();
     int index = 0;
     for( auto i : *names )
     {
         if( i->istGleich( name ) )
         {
-            cs.unlock();
             return models->get( index );
         }
         index++;
     }
-    cs.unlock();
     return 0;
 }
 
 // Gibt ein bestimmtes Model ohne erhöhten Reference Counter zurück
 //  name: Der Name des Models
-Model3DData *Model3DList::zModel( const char *name ) const
+Model3DData* Model3DList::zModel( const char* name ) const
 {
-    cs.lock();
     int index = 0;
     for( auto i : *names )
     {
         if( i->istGleich( name ) )
         {
-            cs.unlock();
             return models->z( index );
         }
         index++;
     }
-    cs.unlock();
     return 0;
 }
 
-// statische Funktionen
-
-// Initialisiert statische private member. Wird vom Framework automatisch aufgerufen.
-void Model3DList::init()
+//! remove All models
+DLLEXPORT void Model3DList::removeAll()
 {
-    id = 0;
-}
-
-// Löscht statische private member. Wird vom Framework automatisch aufgerufen.
-void Model3DList::destroy()
-{}
+    models->leeren();
+    names->leeren();
+}

+ 11 - 15
Model3DList.h

@@ -1,7 +1,6 @@
 #pragma once
 
 #include "Array.h"
-#include "Critical.h"
 
 namespace Framework
 {
@@ -11,17 +10,16 @@ namespace Framework
 
     namespace Standart3DTypes
     {
-        extern const char *cube; //! = "f_würfel"; Die Modeldaten eines Würfels der 100 * 100 * 100 groß ist
+        extern const char* cube; //! = "f_würfel"; Die Modeldaten eines Würfels der 100 * 100 * 100 groß ist
+        extern const char* texturModel; //! = "f_würfel"; Die Modeldaten eines Würfels der 100 * 100 * 100 groß ist
     };
 
     //! Verwaltet alle geladenen Modeldaten, so dass mehrere Zeichnungen die selben Daten benutzen können
     class Model3DList : public virtual ReferenceCounter
     {
     private:
-        static int id;
-        static Critical cs;
-        RCArray< Model3DData > *models;
-        RCArray< Text > *names;
+        RCArray< Model3DData >* models;
+        RCArray< Text >* names;
 
     public:
         //! Konstruktor
@@ -31,23 +29,21 @@ namespace Framework
         //! Fügt der Liste ein Model Hinzu
         //! \param mdl Das Model
         //! \param name Der name, unter dem das Model in der Liste gespeichert wird
-        DLLEXPORT bool addModel( Model3DData *mdl, const char *name );
+        DLLEXPORT bool addModel( Model3DData* mdl, const char* name );
         //! Entfernt ein Model aus der Liste
         //! \param name Der Name des Models
-        DLLEXPORT void removeModel( const char *name );
+        DLLEXPORT void removeModel( const char* name );
         //! Überprüft, ob unter einem bestimmten Namen ein Model abgespeichert wurde
         //! \param name Der Name
         //! \return true, wenn ein Model mit dem Namen existiert
-        DLLEXPORT bool hatModel( const char *name ) const;
+        DLLEXPORT bool hatModel( const char* name ) const;
         //! Gibt ein bestimmtes Model zurück
         //! \param name Der Name des Models
-        DLLEXPORT Model3DData *getModel( const char *name ) const;
+        DLLEXPORT Model3DData* getModel( const char* name ) const;
         //! Gibt ein bestimmtes Model ohne erhöhten Reference Counter zurück
         //! \param name Der Name des Models
-        DLLEXPORT Model3DData *zModel( const char *name ) const;
-        //! Initialisiert statische private member. Wird vom Framework automatisch aufgerufen.
-        DLLEXPORT static void init();
-        //! Löscht statische private member. Wird vom Framework automatisch aufgerufen.
-        DLLEXPORT static void destroy();
+        DLLEXPORT Model3DData* zModel( const char* name ) const;
+        //! remove All models
+        DLLEXPORT void removeAll();
     };
 }

+ 15 - 141
Shader.cpp

@@ -40,11 +40,11 @@ bool Shader::removeConstBuffer( int index )
 //  data: Einen zeiger auf en byte Array der größe des Buffers
 //  index: Der Index des Buffers
 //  län: Die Länge der Daten in Bytes (-1 für die maximale größe des Buffers)
-bool Shader::füllConstBuffer( char *data, int index, int len )
+bool Shader::füllConstBuffer( char* data, int index, int len )
 {
     if( index < 0 || index > constBuffers->getLastIndex() )
         return 0;
-    DXBuffer * zB = constBuffers->z( index );
+    DXBuffer* zB = constBuffers->z( index );
     if( !zB )
         return 0;
     if( len < 0 )
@@ -60,7 +60,7 @@ int Shader::getConstBufferL
 {
     if( index < 0 || index > constBuffers->getLastIndex() )
         return 0;
-    DXBuffer * zB = constBuffers->z( index );
+    DXBuffer* zB = constBuffers->z( index );
     if( !zB )
         return 0;
     return zB->getElementAnzahl() * zB->getElementLength();
@@ -72,7 +72,7 @@ ShaderType Shader::getType() const
     return type;
 }
 
-DX11Shader::DX11Shader( ID3D11Device * device, ID3D11DeviceContext * context )
+DX11Shader::DX11Shader( ID3D11Device* device, ID3D11DeviceContext* context )
     : Shader()
 {
     this->device = device;
@@ -92,7 +92,7 @@ bool DX11Shader::erstelleConstBuffer( int gr
     if( index < 0 || index >= 14 )
         return 0;
     bool ok = 1;
-    while( ( größe / 16 ) * 16 != größe ) // es sind nur vielfache von 16 als größe erlaubt
+    while( (größe / 16) * 16 != größe ) // es sind nur vielfache von 16 als größe erlaubt
         größe++;
     while( !constBuffers->hat( index ) )
         constBuffers->add( 0 );
@@ -105,7 +105,7 @@ bool DX11Shader::erstelleConstBuffer( int gr
 // Inhalt der PixelShader Klasse
 
 // Konstruktor
-DX11PixelShader::DX11PixelShader( ID3D11Device * device, ID3D11DeviceContext * context )
+DX11PixelShader::DX11PixelShader( ID3D11Device* device, ID3D11DeviceContext* context )
     : DX11Shader( device, context )
 {
     pixelShader = 0;
@@ -122,7 +122,7 @@ DX11PixelShader::~DX11PixelShader()
 //  bytes: Die Bytes des compilierten codes
 //  length: die Länge des bytearrays
 //  return: true, wenn bytes gültig ist, false sonst
-bool DX11PixelShader::setCompiledByteArray( unsigned char *bytes, int length )
+bool DX11PixelShader::setCompiledByteArray( unsigned char* bytes, int length )
 {
     HRESULT result = device->CreatePixelShader( bytes, length, 0, &pixelShader );
     return result == S_OK;
@@ -137,9 +137,9 @@ void DX11PixelShader::benutzeShader()
     {
         if( !constBuffers->z( i ) )
             continue;
-        if( !( (DX11Buffer *)constBuffers->z( i ) )->zBuffer() )
+        if( !((DX11Buffer*)constBuffers->z( i ))->zBuffer() )
             constBuffers->z( i )->copieren();
-        ID3D11Buffer * buf = ( (DX11Buffer *)constBuffers->z( i ) )->zBuffer();
+        ID3D11Buffer* buf = ((DX11Buffer*)constBuffers->z( i ))->zBuffer();
         context->PSSetConstantBuffers( i, 1, &buf );
     }
     if( pixelShader )
@@ -150,7 +150,7 @@ void DX11PixelShader::benutzeShader()
 // Inhalt der VertexShader Klasse
 
 // Konstruktor
-DX11VertexShader::DX11VertexShader( ID3D11Device * device, ID3D11DeviceContext * context )
+DX11VertexShader::DX11VertexShader( ID3D11Device* device, ID3D11DeviceContext* context )
     : DX11Shader( device, context )
 {
     vertexShader = 0;
@@ -172,9 +172,9 @@ DX11VertexShader::~DX11VertexShader()
 //  bytes: Die Bytes des compilierten codes
 //  length: die Länge des bytearrays
 //  return: true, wenn bytes gültig ist, false sonst
-bool DX11VertexShader::setCompiledByteArray( unsigned char *bytes, int length )
+bool DX11VertexShader::setCompiledByteArray( unsigned char* bytes, int length )
 {
-    shaderByteBuffer = (unsigned char *)bytes;
+    shaderByteBuffer = (unsigned char*)bytes;
     byteBufferSize = length;
     HRESULT result = device->CreateVertexShader( bytes, length, 0, &vertexShader );
     return result == S_OK;
@@ -185,7 +185,7 @@ bool DX11VertexShader::setCompiledByteArray( unsigned char *bytes, int length )
 //  zD3d11Device: Das Device, mit dem das Layout erstellt werden soll
 //  descArray: Ein Array mit initialisierungsdaten
 //  anz: Die Anzahl der Elemente im Array
-bool DX11VertexShader::erstelleInputLayout( D3D11_INPUT_ELEMENT_DESC * descArray, int anz )
+bool DX11VertexShader::erstelleInputLayout( D3D11_INPUT_ELEMENT_DESC* descArray, int anz )
 {
     if( !shaderByteBuffer )
         return 0;
@@ -210,139 +210,13 @@ void DX11VertexShader::benutzeShader()
     {
         if( !constBuffers->z( i ) )
             continue;
-        if( !( (DX11Buffer *)constBuffers->z( i ) )->zBuffer() )
+        if( !((DX11Buffer*)constBuffers->z( i ))->zBuffer() )
             constBuffers->z( i )->copieren();
-        ID3D11Buffer * buf = ( (DX11Buffer *)constBuffers->z( i ) )->zBuffer();
+        ID3D11Buffer* buf = ((DX11Buffer*)constBuffers->z( i ))->zBuffer();
         context->VSSetConstantBuffers( i, 1, &buf );
     }
     if( inputLayout )
         context->IASetInputLayout( inputLayout );
     if( vertexShader )
         context->VSSetShader( vertexShader, 0, 0 );
-}
-
-
-DX12Shader::DX12Shader( ID3D12Device2 * device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct )
-    : Shader()
-{
-    shaderByteBuffer = 0;
-    byteBufferSize = 0;
-    this->device = device;
-    this->copy = copy;
-    this->direct = direct;
-}
-
-DX12Shader::~DX12Shader()
-{
-    delete[] shaderByteBuffer;
-}
-
-// erstellt ein constanten Buffer, der constante daten an den Shader übergibt
-// es können maximal 14 Buffer erstellt werden
-//  zD3d11Device: Das Device, mit dem der Buffer erstellt werden soll
-//  size: Die größe des buffers in byte
-//  index: Die position des Buffers im Buffer Array. Bereits vorhanderner Buffer wird ersetzt. Buffer 1 kann nicht erstellt werden, wenn Buffer 0 noch nicht erstellt wurde usw.
-bool DX12Shader::erstelleConstBuffer( int size, int index )
-{
-    if( index < 0 || index >= 14 )
-        return 0;
-    while( ( size / 256 ) * 256 != size )
-        size++;
-    while( !constBuffers->hat( index ) )
-        constBuffers->add( 0 );
-    constBuffers->set( new DX12VertexBuffer( 1, device, copy, direct ), index );
-    constBuffers->z( index )->setLength( size );
-    constBuffers->z( index )->copieren();
-    return 1;
-}
-
-// Setzt den Compilierten Shader
-//  zD3d11Device: Das Device, mit welchem der Shader erstellt werden soll
-//  bytes: Die Bytes des compilierten codes
-//  length: die Länge des bytearrays
-//  return: true, wenn bytes gültig ist, false sonst
-bool DX12Shader::setCompiledByteArray( unsigned char *bytes, int length )
-{
-    delete[] shaderByteBuffer;
-    shaderByteBuffer = new unsigned char[ length ];
-    memcpy( shaderByteBuffer, bytes, length );
-    byteBufferSize = length;
-    return 1;
-}
-
-// Nach dem Aufruf dieser Funktion wird dieser Shader als Pixel Shader benutzt
-//  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
-void DX12Shader::benutzeShader()
-{
-    // not needet in DirectX 12
-}
-
-// gibt die compilierten bytes zurück
-unsigned char *DX12Shader::getCompiledShader() const
-{
-    return shaderByteBuffer;
-}
-
-// gitbt die anzahl der compilierten bytes zurück
-int DX12Shader::getCompiledLength() const
-{
-    return byteBufferSize;
-}
-
-// Erstellt den RootParameter zu einem constanten buffer
-//  index: Der Index des Buffers
-//  view: enthält nach dem Aufruf die position und größe des buffers im speicher
-void DX12Shader::getViewDesc( int index, D3D12_CONSTANT_BUFFER_VIEW_DESC &view )
-{
-    DX12Buffer *zB = (DX12Buffer *)constBuffers->z( index );
-    if( !zB )
-        return;
-    view.SizeInBytes = zB->getElementAnzahl() * zB->getElementLength();
-    view.BufferLocation = zB->zBuffer()->GetGPUVirtualAddress();
-}
-
-
-DX12PixelShader::DX12PixelShader( ID3D12Device2 * device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct )
-    : DX12Shader( device, copy, direct )
-{}
-
-
-// Konstruktor
-DX12VertexShader::DX12VertexShader( ID3D12Device2 * device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct )
-    : DX12Shader( device, copy, direct )
-{
-    inputLayout = 0;
-    inputLayoutSize = 0;
-}
-
-// Destruktor
-DX12VertexShader::~DX12VertexShader()
-{
-    delete[] inputLayout;
-}
-
-// erstellt ein InputLayout für den Shader
-// Darf erst nach compile aufgerufen werden
-//  zD3d11Device: Das Device, mit dem das Layout erstellt werden soll
-//  descArray: Ein Array mit initialisierungsdaten
-//  anz: Die Anzahl der Elemente im Array
-bool DX12VertexShader::erstelleInputLayout( D3D12_INPUT_ELEMENT_DESC * descArray, int anz )
-{
-    delete[] inputLayout;
-    inputLayout = new D3D12_INPUT_ELEMENT_DESC[ anz ];
-    memcpy( inputLayout, descArray, anz * sizeof( D3D12_INPUT_ELEMENT_DESC ) );
-    inputLayoutSize = anz;
-    return 1;
-}
-
-// Gint die Anzahl an eingabeparametern des Shaders zurück
-int DX12VertexShader::getInputLayoutSize() const
-{
-    return inputLayoutSize;
-}
-
-// Gibt eine Liste mit formaten für jeden Eingabewert zurück
-D3D12_INPUT_ELEMENT_DESC *DX12VertexShader::zInputLayout() const
-{
-    return inputLayout;
 }

+ 15 - 87
Shader.h

@@ -11,12 +11,6 @@ struct D3D11_INPUT_ELEMENT_DESC;
 struct ID3D11Buffer;
 struct ID3D11InputLayout;
 
-struct ID3D12Device2;
-struct ID3D12GraphicsCommandList2;
-struct D3D12_INPUT_ELEMENT_DESC;
-struct D3D12_ROOT_PARAMETER1;
-struct D3D12_CONSTANT_BUFFER_VIEW_DESC;
-
 namespace Framework
 {
     class Text;
@@ -36,7 +30,7 @@ namespace Framework
     {
     protected:
         ShaderType type;
-        RCArray< DXBuffer > *constBuffers;
+        RCArray< DXBuffer >* constBuffers;
 
     public:
         //! Konstruktor
@@ -48,7 +42,7 @@ namespace Framework
         //! \param bytes Die Bytes des compilierten codes
         //! \param length die Länge des bytearrays
         //! \return true, wenn bytes gültig ist, false sonst
-        virtual bool setCompiledByteArray( unsigned char *bytes, int length ) = 0;
+        virtual bool setCompiledByteArray( unsigned char* bytes, int length ) = 0;
         //! Nach dem Aufruf dieser Funktion wird dieser Shader als Pixel Shader benutzt
         //!  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
         virtual void benutzeShader() = 0;
@@ -66,7 +60,7 @@ namespace Framework
         //! \param data Einen zeiger auf en byte Array der größe des Buffers
         //! \param index Der Index des Buffers
         //! \param len Die Länge der Daten in Bytes (-1 für die maximale größe des Buffers)
-        bool füllConstBuffer( char *data, int index, int len = -1 );
+        bool füllConstBuffer( char* data, int index, int len = -1 );
         //! Gibt die Länge eines constanten Buffers zurück
         //! \param index Der Index des Buffers
         int getConstBufferLänge( int index ) const;
@@ -77,11 +71,11 @@ namespace Framework
     class DX11Shader : public Shader
     {
     protected:
-        ID3D11Device *device;
-        ID3D11DeviceContext *context;
+        ID3D11Device* device;
+        ID3D11DeviceContext* context;
 
     public:
-        DX11Shader( ID3D11Device *device, ID3D11DeviceContext *context );
+        DX11Shader( ID3D11Device* device, ID3D11DeviceContext* context );
         virtual ~DX11Shader();
         //! erstellt ein constanten Buffer, der constante daten an den Shader übergibt
         //! es können maximal 14 Buffer erstellt werden
@@ -95,11 +89,11 @@ namespace Framework
     class DX11PixelShader : public DX11Shader
     {
     private:
-        ID3D11PixelShader *pixelShader;
+        ID3D11PixelShader* pixelShader;
 
     public:
         //! Konstruktor
-        DX11PixelShader( ID3D11Device *device, ID3D11DeviceContext *context );
+        DX11PixelShader( ID3D11Device* device, ID3D11DeviceContext* context );
         //! Destruktor
         ~DX11PixelShader();
         //! Setzt den Compilierten Shader
@@ -107,7 +101,7 @@ namespace Framework
         //! \param bytes Die Bytes des compilierten codes
         //! \param length die Länge des bytearrays
         //! \return true, wenn bytes gültig ist, false sonst
-        bool setCompiledByteArray( unsigned char *bytes, int length ) override;
+        bool setCompiledByteArray( unsigned char* bytes, int length ) override;
         //! Nach dem Aufruf dieser Funktion wird dieser Shader als Pixel Shader benutzt
         //!  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
         void benutzeShader() override;
@@ -117,14 +111,14 @@ namespace Framework
     class DX11VertexShader : public DX11Shader
     {
     private:
-        ID3D11VertexShader *vertexShader;
-        ID3D11InputLayout *inputLayout;
-        unsigned char *shaderByteBuffer;
+        ID3D11VertexShader* vertexShader;
+        ID3D11InputLayout* inputLayout;
+        unsigned char* shaderByteBuffer;
         int byteBufferSize;
 
     public:
         //! Konstruktor
-        DX11VertexShader( ID3D11Device *device, ID3D11DeviceContext *context );
+        DX11VertexShader( ID3D11Device* device, ID3D11DeviceContext* context );
         //! Destruktor
         ~DX11VertexShader();
         //! Setzt den Compilierten Shader
@@ -132,81 +126,15 @@ namespace Framework
         //! \param bytes Die Bytes des compilierten codes
         //! \param length die Länge des bytearrays
         //! \return true, wenn bytes gültig ist, false sonst
-        bool setCompiledByteArray( unsigned char *bytes, int length ) override;
+        bool setCompiledByteArray( unsigned char* bytes, int length ) override;
         //! erstellt ein InputLayout für den Shader
         //! Darf erst nach compile aufgerufen werden
         //!  zD3d11Device: Das Device, mit dem das Layout erstellt werden soll
         //! \param descArray Ein Array mit initialisierungsdaten
         //! \param anz Die Anzahl der Elemente im Array
-        bool erstelleInputLayout( D3D11_INPUT_ELEMENT_DESC *descArray, int anz );
+        bool erstelleInputLayout( D3D11_INPUT_ELEMENT_DESC* descArray, int anz );
         //! Nach dem Aufruf dieser Funktion wird dieser Shader als Vertex Shader benutzt
         //!  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
         void benutzeShader() override;
     };
-
-    class DX12Shader : public Shader
-    {
-    protected:
-        ID3D12Device2 *device;
-        DX12CopyCommandQueue *copy;
-        DX12DirectCommandQueue *direct;
-        unsigned char *shaderByteBuffer;
-        int byteBufferSize;
-
-    public:
-        DX12Shader( ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct );
-        virtual ~DX12Shader();
-        //! erstellt ein constanten Buffer, der constante daten an den Shader übergibt
-        //! es können maximal 14 Buffer erstellt werden
-        //!  zD3d11Device: Das Device, mit dem der Buffer erstellt werden soll
-        //! \param size Die größe des buffers in byte
-        //! \param index Die position des Buffers im Buffer Array. Bereits vorhanderner Buffer wird ersetzt. Buffer 1 kann nicht erstellt werden, wenn Buffer 0 noch nicht erstellt wurde usw.
-        virtual bool erstelleConstBuffer( int size, int index ) override;
-        //! Setzt den Compilierten Shader
-        //!  zD3d11Device: Das Device, mit welchem der Shader erstellt werden soll
-        //! \param bytes Die Bytes des compilierten codes
-        //! \param length die Länge des bytearrays
-        //! \return true, wenn bytes gültig ist, false sonst
-        bool setCompiledByteArray( unsigned char *bytes, int length ) override;
-        //! Nach dem Aufruf dieser Funktion wird dieser Shader als Pixel Shader benutzt
-        //!  zD3d11Context: Das Context Objekt, mit dem der Shader verwendet werden soll
-        void benutzeShader() override;
-        //! gibt die compilierten bytes zurück
-        unsigned char *getCompiledShader() const;
-        //! gitbt die anzahl der compilierten bytes zurück
-        int getCompiledLength() const;
-        //! Erstellt den RootParameter zu einem constanten buffer
-        //! \param index Der Index des Buffers
-        //! \param view enthält nach dem Aufruf die position und größe des buffers im speicher
-        virtual void getViewDesc( int index, D3D12_CONSTANT_BUFFER_VIEW_DESC &view );
-    };
-
-    class DX12PixelShader : public DX12Shader
-    {
-    public:
-        DX12PixelShader( ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct );
-    };
-
-    class DX12VertexShader : public DX12Shader
-    {
-    private:
-        D3D12_INPUT_ELEMENT_DESC *inputLayout;
-        int inputLayoutSize;
-
-    public:
-        //! Konstruktor
-        DX12VertexShader( ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct );
-        //! Destruktor
-        ~DX12VertexShader();
-        //! erstellt ein InputLayout für den Shader
-        //! Darf erst nach compile aufgerufen werden
-        //!  zD3d11Device: Das Device, mit dem das Layout erstellt werden soll
-        //! \param descArray Ein Array mit initialisierungsdaten
-        //! \param anz Die Anzahl der Elemente im Array
-        bool erstelleInputLayout( D3D12_INPUT_ELEMENT_DESC *descArray, int anz );
-        //! Gint die Anzahl an eingabeparametern des Shaders zurück
-        int getInputLayoutSize() const;
-        //! Gibt eine Liste mit formaten für jeden Eingabewert zurück
-        D3D12_INPUT_ELEMENT_DESC *zInputLayout() const;
-    };
 }

+ 10 - 120
Textur.cpp

@@ -1,10 +1,9 @@
 #include "Textur.h"
 #include "Bild.h"
 #ifdef WIN32
-#include "DXCommandQueue.h"
 #include <d3d11.h>
 #include <d3d12.h>
-#include <d3dx12.h>
+#include "d3dx12.h"
 #endif
 
 using namespace Framework;
@@ -29,7 +28,7 @@ Textur::~Textur()
 
 // Setzt einen Zeiger auf das Bild, welches die Textur enthält
 //  b: Der Zeiger auf das Bild
-void Textur::setBildZ( Bild *b )
+void Textur::setBildZ( Bild* b )
 {
     if( bild )
         bild->release();
@@ -38,7 +37,7 @@ void Textur::setBildZ( Bild *b )
 
 // Setzt das Bild welches die Textur enthält, indem es kopiert wird
 //  b: Das Bild, was kopiert werden soll
-void Textur::setBild( Bild *b )
+void Textur::setBild( Bild* b )
 {
     if( !b )
         return;
@@ -53,13 +52,13 @@ void Textur::setBild( Bild *b )
 }
 
 // Gibt einen Zeiger auf das Bild zurück
-Bild *Textur::getBild() const
+Bild* Textur::getBild() const
 {
-    return bild ? dynamic_cast<Bild *>( bild->getThis() ) : 0;
+    return bild ? dynamic_cast<Bild*>(bild->getThis()) : 0;
 }
 
 // Gibt einen Zeiger auf das Bild ohne erhöhten Reference Counter zurück
-Bild *Textur::zBild() const
+Bild* Textur::zBild() const
 {
     return bild;
 }
@@ -84,7 +83,7 @@ bool DX9Textur::brauchtUpdate() const
 }
 
 
-DX11Textur::DX11Textur( ID3D11Device *device, ID3D11DeviceContext *context )
+DX11Textur::DX11Textur( ID3D11Device* device, ID3D11DeviceContext* context )
     : Textur(),
     txt( 0 ),
     view( 0 ),
@@ -130,10 +129,10 @@ bool DX11Textur::updateTextur()
     }
     D3D11_MAPPED_SUBRESOURCE buffer;
     context->Map( txt, 0, D3D11_MAP::D3D11_MAP_WRITE_DISCARD, 0, &buffer );
-    int *bgBuff = bild->getBuffer();
+    int* bgBuff = bild->getBuffer();
     int tmpBr = 4 * bild->getBreite();
     for( int y = 0, pitch = 0, bry = 0; y < bild->getHeight(); ++y, pitch += buffer.RowPitch, bry += bild->getBreite() )
-        memcpy( &( (BYTE *)buffer.pData )[ pitch ], (void *)&( bgBuff[ bry ] ), tmpBr );
+        memcpy( &((BYTE*)buffer.pData)[ pitch ], (void*)&(bgBuff[ bry ]), tmpBr );
     context->Unmap( txt, 0 );
     if( !view || lastGr != bild->getSize() )
     {
@@ -161,116 +160,7 @@ bool DX11Textur::brauchtUpdate() const
 }
 
 // Gibt die verwendtete Shader Resource View zurück
-DX11Textur::operator ID3D11ShaderResourceView *( ) const
+DX11Textur::operator ID3D11ShaderResourceView* () const
 {
     return view;
-}
-
-
-DX12Textur::DX12Textur( ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct )
-    : Textur(),
-    buffer( 0 ),
-    intermediate( 0 ),
-    device( device ),
-    copy( copy ),
-    direct( direct ),
-    shaderResource( 0 )
-{}
-
-DX12Textur::~DX12Textur()
-{
-#ifdef WIN32
-    if( buffer )
-        buffer->Release();
-    if( intermediate )
-        intermediate->Release();
-#endif
-}
-
-// Aktualisiert die Textur. Die Pixel des aktuellen Bildes werden in den Graphikspeicher kopiert
-bool DX12Textur::updateTextur()
-{
-    if( !bild )
-        return 0;
-#ifdef WIN32
-    if( !buffer )
-    {
-        D3D12_RESOURCE_DESC description;
-        ZeroMemory( &description, sizeof( D3D12_RESOURCE_DESC ) );
-        description.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
-        description.Height = bild->getHeight();
-        description.Width = bild->getBreite();
-        description.DepthOrArraySize = 1;
-        description.MipLevels = 1;
-        description.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
-        description.SampleDesc.Count = 1;
-        description.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
-        description.Flags = D3D12_RESOURCE_FLAG_NONE;
-        D3D12_HEAP_PROPERTIES hprop;
-        hprop.Type = D3D12_HEAP_TYPE_DEFAULT;
-        hprop.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
-        hprop.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
-        hprop.CreationNodeMask = 1;
-        hprop.VisibleNodeMask = 1;
-        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, &description, D3D12_RESOURCE_STATE_COPY_DEST, 0, __uuidof( ID3D12Resource ), (void **)&buffer );
-        const UINT64 uploadBufferSize = GetRequiredIntermediateSize( buffer, 0, 1 );
-        D3D12_RESOURCE_DESC iDescription;
-        iDescription.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
-        iDescription.Alignment = 0;
-        iDescription.Width = uploadBufferSize;
-        iDescription.Height = 1;
-        iDescription.DepthOrArraySize = 1;
-        iDescription.MipLevels = 1;
-        iDescription.Format = DXGI_FORMAT_UNKNOWN;
-        iDescription.SampleDesc.Count = 1;
-        iDescription.SampleDesc.Quality = 0;
-        iDescription.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
-        iDescription.Flags = D3D12_RESOURCE_FLAG_NONE;
-        hprop.Type = D3D12_HEAP_TYPE_UPLOAD;
-        device->CreateCommittedResource( &hprop, D3D12_HEAP_FLAG_NONE, &iDescription, D3D12_RESOURCE_STATE_GENERIC_READ, 0, __uuidof( ID3D12Resource ), (void **)&intermediate );
-        shaderResource = 0;
-    }
-    if( bild )
-    {
-        if( shaderResource )
-        {
-            D3D12_RESOURCE_BARRIER barrier;
-            barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-            barrier.Transition.pResource = buffer;
-            barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
-            barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;
-            barrier.Transition.Subresource = 0;
-            barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-            direct->getCommandList()->ResourceBarrier( 1, &barrier );
-            shaderResource = 0;
-        }
-        D3D12_SUBRESOURCE_DATA textureData = {};
-        textureData.pData = bild->getBuffer();
-        textureData.RowPitch = bild->getBreite() * sizeof( int );
-        textureData.SlicePitch = textureData.RowPitch * bild->getHeight();
-        UpdateSubresources( direct->getCommandList(), buffer, intermediate, 0, 0, 1, &textureData );
-        D3D12_RESOURCE_BARRIER barrier;
-        barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
-        barrier.Transition.pResource = buffer;
-        barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
-        barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE;
-        barrier.Transition.Subresource = 0;
-        barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
-        direct->getCommandList()->ResourceBarrier( 1, &barrier );
-        shaderResource = 1;
-    }
-#endif
-    return 1;
-}
-
-// Gibt true zurük, wenn updateTextur aufgerufen werden muss
-bool DX12Textur::brauchtUpdate() const
-{
-    return bild && !buffer;
-}
-
-// Gibt die DX12 Resource zurück
-ID3D12Resource *DX12Textur::getResource()
-{
-    return buffer;
 }

+ 11 - 37
Textur.h

@@ -8,11 +8,6 @@ struct ID3D11ShaderResourceView;
 struct ID3D11Device;
 struct ID3D11DeviceContext;
 
-struct ID3D12Device2;
-struct D3D12_RESOURCE_DESC;
-struct ID3D12Resource;
-struct ID3D12GraphicsCommandList2;
-
 namespace Framework
 {
     class Bild; //! Bild.h
@@ -25,7 +20,7 @@ namespace Framework
     class Textur : public virtual ReferenceCounter
     {
     protected:
-        Bild *bild;
+        Bild* bild;
         Punkt lastGr;
         int id;
 
@@ -36,18 +31,18 @@ namespace Framework
         DLLEXPORT virtual ~Textur();
         //! Setzt einen Zeiger auf das Bild, welches die Textur enthält
         //! \param b Der Zeiger auf das Bild
-        DLLEXPORT void setBildZ( Bild *b );
+        DLLEXPORT void setBildZ( Bild* b );
         //! Setzt das Bild welches die Textur enthält, indem es kopiert wird
         //! \param b Das Bild, was kopiert werden soll
-        DLLEXPORT void setBild( Bild *b );
+        DLLEXPORT void setBild( Bild* b );
         //! Aktualisiert die Textur. Die Pixel des aktuellen Bildes werden in den Graphikspeicher kopiert
         DLLEXPORT virtual bool updateTextur() = 0;
         //! Gibt true zurük, wenn updateTextur aufgerufen werden muss
         DLLEXPORT virtual bool brauchtUpdate() const = 0;
         //! Gibt einen Zeiger auf das Bild zurück
-        DLLEXPORT Bild *getBild() const;
+        DLLEXPORT Bild* getBild() const;
         //! Gibt einen Zeiger auf das Bild ohne erhöhten Reference Counter zurück
-        DLLEXPORT Bild *zBild() const;
+        DLLEXPORT Bild* zBild() const;
         //! Gibt die Id der Textur zurück, wenn sie in einer TexturList registriert wurde. (siehe Framework::zTexturRegister())
         DLLEXPORT int getId() const;
 
@@ -67,40 +62,19 @@ namespace Framework
     class DX11Textur : public Textur
     {
     private:
-        ID3D11Texture2D *txt;
-        ID3D11ShaderResourceView *view;
-        ID3D11Device *device;
-        ID3D11DeviceContext *context;
+        ID3D11Texture2D* txt;
+        ID3D11ShaderResourceView* view;
+        ID3D11Device* device;
+        ID3D11DeviceContext* context;
 
     public:
-        DLLEXPORT DX11Textur( ID3D11Device *device, ID3D11DeviceContext *context );
+        DLLEXPORT DX11Textur( ID3D11Device* device, ID3D11DeviceContext* context );
         DLLEXPORT ~DX11Textur();
         //! Aktualisiert die Textur. Die Pixel des aktuellen Bildes werden in den Graphikspeicher kopiert
         DLLEXPORT bool updateTextur() override;
         //! Gibt true zurük, wenn updateTextur aufgerufen werden muss
         DLLEXPORT bool brauchtUpdate() const override;
         //! Gibt die verwendtete Shader Resource View zurück
-        DLLEXPORT operator ID3D11ShaderResourceView *( ) const;
-    };
-
-    class DX12Textur : public Textur
-    {
-    private:
-        ID3D12Resource *buffer;
-        ID3D12Resource *intermediate;
-        ID3D12Device2 *device;
-        DX12CopyCommandQueue *copy;
-        DX12DirectCommandQueue *direct;
-        bool shaderResource;
-
-    public:
-        DLLEXPORT DX12Textur( ID3D12Device2 *device, DX12CopyCommandQueue *copy, DX12DirectCommandQueue *direct );
-        DLLEXPORT ~DX12Textur();
-        //! Aktualisiert die Textur. Die Pixel des aktuellen Bildes werden in den Graphikspeicher kopiert
-        DLLEXPORT bool updateTextur() override;
-        //! Gibt true zurük, wenn updateTextur aufgerufen werden muss
-        DLLEXPORT bool brauchtUpdate() const override;
-        //! Gibt die DX12 Resource zurück
-        DLLEXPORT ID3D12Resource *getResource();
+        DLLEXPORT operator ID3D11ShaderResourceView* () const;
     };
 }

+ 35 - 28
TexturModel.cpp

@@ -3,47 +3,54 @@
 #include "Textur.h"
 #include "Globals.h"
 #include "TexturList.h"
+#include "GraphicsApi.h"
+#include "Model3DList.h"
 
 using namespace Framework;
 
 // Inhalt der TexturModel Klasse
 
 // Konstruktor
-TexturModel::TexturModel()
+TexturModel::TexturModel( GraphicsApi* zApi )
     : Model3D()
 {
-    Vertex3D *vertecies = new Vertex3D[ 4 ];
-    for( int i = 0; i < 4; i++ )
-        vertecies[ i ].knochenId = 0;
-    vertecies[ 0 ].pos = Vec3<float >( -50, 50, 0.f );
-    vertecies[ 0 ].tPos = Vec2< float >( 0.f, 0.f );
-    vertecies[ 1 ].pos = Vec3<float >( 50, 50, 0.f );
-    vertecies[ 1 ].tPos = Vec2< float >( 1.f, 0.f );
-    vertecies[ 2 ].pos = Vec3<float >( -50, -50, 0.f );
-    vertecies[ 2 ].tPos = Vec2< float >( 0.f, 1.f );
-    vertecies[ 3 ].pos = Vec3<float >( 50, -50, 0.f );
-    vertecies[ 3 ].tPos = Vec2< float >( 1.f, 1.f );
+    if( zApi->hasModel( Standart3DTypes::texturModel ) )
+        model = zApi->getModel( Standart3DTypes::texturModel );
+    else
+    {
+        model = zApi->createModel( Standart3DTypes::texturModel );
+        Vertex3D* vertecies = new Vertex3D[ 4 ];
+        for( int i = 0; i < 4; i++ )
+            vertecies[ i ].knochenId = 0;
+        vertecies[ 0 ].pos = Vec3<float >( -50, 50, 0.f );
+        vertecies[ 0 ].tPos = Vec2< float >( 0.f, 0.f );
+        vertecies[ 1 ].pos = Vec3<float >( 50, 50, 0.f );
+        vertecies[ 1 ].tPos = Vec2< float >( 1.f, 0.f );
+        vertecies[ 2 ].pos = Vec3<float >( -50, -50, 0.f );
+        vertecies[ 2 ].tPos = Vec2< float >( 0.f, 1.f );
+        vertecies[ 3 ].pos = Vec3<float >( 50, -50, 0.f );
+        vertecies[ 3 ].tPos = Vec2< float >( 1.f, 1.f );
 
-    model = new Model3DData();
-    model->setVertecies( vertecies, 4 );
-    Polygon3D *p = new Polygon3D();
-    p->indexAnz = 6;
-    p->indexList = new int[ p->indexAnz ];
-    p->indexList[ 0 ] = 0;
-    p->indexList[ 1 ] = 3;
-    p->indexList[ 2 ] = 2;
-    p->indexList[ 3 ] = 0;
-    p->indexList[ 4 ] = 1;
-    p->indexList[ 5 ] = 3;
-    model->addPolygon( p );
+        model->setVertecies( vertecies, 4 );
+        Polygon3D* p = new Polygon3D();
+        p->indexAnz = 6;
+        p->indexList = new int[ p->indexAnz ];
+        p->indexList[ 0 ] = 0;
+        p->indexList[ 1 ] = 3;
+        p->indexList[ 2 ] = 2;
+        p->indexList[ 3 ] = 0;
+        p->indexList[ 4 ] = 1;
+        p->indexList[ 5 ] = 3;
+        model->addPolygon( p );
 
+        model->calculateNormals();
+    }
     textur = new Model3DTextur();
-    model->calculateNormals();
 }
 
 // Setzt die Textur die angezeigt werden soll 
 //  t: Die Textur
-void TexturModel::setTextur( Textur *t )
+void TexturModel::setTextur( Textur* t )
 {
     if( !t )
         return;
@@ -56,7 +63,7 @@ void TexturModel::setTextur( Textur *t )
 void TexturModel::setSize( Vec2< float > gr )
 {
     gr /= 2;
-    Vertex3D *vertecies = new Vertex3D[ 4 ];
+    Vertex3D* vertecies = new Vertex3D[ 4 ];
     for( int i = 0; i < 4; i++ )
         vertecies[ i ].knochenId = 0;
     vertecies[ 0 ].pos = Vec3<float >( -gr.x, gr.y, 0.f );
@@ -77,7 +84,7 @@ void TexturModel::setSize( float b, float h )
 {
     b /= 2;
     h /= 2;
-    Vertex3D *vertecies = new Vertex3D[ 4 ];
+    Vertex3D* vertecies = new Vertex3D[ 4 ];
     for( int i = 0; i < 4; i++ )
         vertecies[ i ].knochenId = 0;
     vertecies[ 0 ].pos = Vec3<float >( -b, h, 0.f );

+ 3 - 2
TexturModel.h

@@ -5,16 +5,17 @@
 namespace Framework
 {
     class Textur;
+    class GraphicsApi;
 
     //! Ein 3D Modell, das zur Darstellung einer Textur im dreidimensionalen Raum verwendet werden kann
     class TexturModel : public Model3D
     {
     public:
         //! Konstruktor
-        DLLEXPORT TexturModel();
+        DLLEXPORT TexturModel( GraphicsApi* zApi );
         //! Setzt die Textur die angezeigt werden soll 
         //! \param t Die Textur
-        DLLEXPORT void setTextur( Textur *t );
+        DLLEXPORT void setTextur( Textur* t );
         //! Setzt die Größe, in der Die Textur angezeigt wird
         //! \param gr Ein Vektor, der für x und y die breite und höhe beinhaltet
         DLLEXPORT void setSize( Vec2< float > gr );

+ 2506 - 1947
UIPixelShader.h

@@ -26,6 +26,15 @@
 //
 //   int diffuseLightCount;             // Offset:    0 Size:     4
 //   int pointLightCount;               // Offset:    4 Size:     4
+//   int effectCount;                   // Offset:    8 Size:     4 [unused]
+//
+// }
+//
+// cbuffer TexturEffect
+// {
+//
+//   bool effectEnabled;                // Offset:    0 Size:     4
+//   float effectPercentage;            // Offset:    4 Size:     4
 //
 // }
 //
@@ -65,9 +74,11 @@
 // shaderTexture                     texture  float4          2d             t0      1 
 // difuseLights                      texture  struct         r/o             t1      1 
 // pointLights                       texture  struct         r/o             t2      1 
+// additionalTexture                 texture  float4          2d             t3      1 
 // Kamera                            cbuffer      NA          NA            cb0      1 
 // Material                          cbuffer      NA          NA            cb1      1 
 // LightCount                        cbuffer      NA          NA            cb2      1 
+// TexturEffect                      cbuffer      NA          NA            cb3      1 
 //
 //
 //
@@ -92,10 +103,12 @@ dcl_globalFlags refactoringAllowed | skipOptimization
 dcl_constantbuffer CB0[1], immediateIndexed
 dcl_constantbuffer CB1[1], immediateIndexed
 dcl_constantbuffer CB2[1], immediateIndexed
+dcl_constantbuffer CB3[1], immediateIndexed
 dcl_sampler s0, mode_default
 dcl_resource_texture2d (float,float,float,float) t0
 dcl_resource_structured t1, 24
 dcl_resource_structured t2, 28
+dcl_resource_texture2d (float,float,float,float) t3
 dcl_input_ps linear v0.xyz
 dcl_input_ps linear v2.xy
 dcl_input_ps linear v3.xyz
@@ -109,13 +122,13 @@ dcl_temps 6
 //   v3.x <- input.normal.x; v3.y <- input.normal.y; v3.z <- input.normal.z; 
 //   o0.x <- <TexturePixelShader return value>.x; o0.y <- <TexturePixelShader return value>.y; o0.z <- <TexturePixelShader return value>.z; o0.w <- <TexturePixelShader return value>.w
 //
-#line 60 "C:\Users\kolja\Desktop\Kolja-Strohm-Games\Allgemein\Framework\DX11PixelShader.hlsl"
+#line 68 "C:\Users\kolja\Desktop\Kolja-Strohm-Games\Allgemein\Framework\DX11PixelShader.hlsl"
 itof r0.xyz, l(0, 0, 0, 0)  // r0.x <- diffuseLight.x; r0.y <- diffuseLight.y; r0.z <- diffuseLight.z
 
-#line 61
+#line 69
 itof r1.xyz, l(0, 0, 0, 0)  // r1.x <- specularLight.x; r1.y <- specularLight.y; r1.z <- specularLight.z
 
-#line 62
+#line 70
 mov r0.w, l(0)  // r0.w <- j
 mov r2.xyz, r0.xyzx  // r2.x <- diffuseLight.x; r2.y <- diffuseLight.y; r2.z <- diffuseLight.z
 mov r1.w, r0.w  // r1.w <- j
@@ -123,7 +136,7 @@ loop
   ilt r2.w, r1.w, cb2[0].x
   breakc_z r2.w
 
-#line 64
+#line 72
   ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.x, r1.w, l(0), t1.xxxx
   ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.y, r1.w, l(4), t1.xxxx
   ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.z, r1.w, l(8), t1.xxxx
@@ -133,12 +146,12 @@ loop
   lt r2.w, r2.w, r3.x
   if_nz r2.w
 
-#line 65
+#line 73
     iadd r1.w, r1.w, l(1)
     continue 
   endif 
 
-#line 66
+#line 74
   ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.x, r1.w, l(12), t1.xxxx
   ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.y, r1.w, l(16), t1.xxxx
   ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.z, r1.w, l(20), t1.xxxx
@@ -150,13 +163,13 @@ loop
   mul r3.xyz, r2.wwww, r3.xyzx
   add r2.xyz, r2.xyzx, r3.xyzx
 
-#line 62
+#line 70
   iadd r1.w, r1.w, l(1)
 
-#line 67
+#line 75
 endloop 
 
-#line 68
+#line 76
 mov r0.x, l(0)  // r0.x <- i
 mov r0.yzw, r1.xxyz  // r0.y <- specularLight.x; r0.z <- specularLight.y; r0.w <- specularLight.z
 mov r3.yz, r2.yyzy  // r3.y <- diffuseLight.y; r3.z <- diffuseLight.z
@@ -166,43 +179,43 @@ loop
   ilt r2.w, r1.w, cb2[0].y
   breakc_z r2.w
 
-#line 70
+#line 78
   ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r4.x, r1.w, l(0), t2.xxxx
   ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r4.y, r1.w, l(4), t2.xxxx
   ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r4.z, r1.w, l(8), t2.xxxx
   mov r5.xyz, -v0.xyzx
   add r4.xyz, r4.xyzx, r5.xyzx  // r4.x <- lightDir.x; r4.y <- lightDir.y; r4.z <- lightDir.z
 
-#line 72
+#line 80
   dp3 r2.w, r4.xyzx, r4.xyzx
   sqrt r2.w, r2.w
   itof r3.w, l(1)
   lt r2.w, r2.w, r3.w
   if_nz r2.w
 
-#line 73
+#line 81
     itof r2.w, l(1)  // r2.w <- factor
   else 
 
-#line 75
+#line 83
     ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r3.w, r1.w, l(24), t2.xxxx
     dp3 r4.w, r4.xyzx, r4.xyzx
     sqrt r4.w, r4.w
     div r2.w, r3.w, r4.w  // r2.w <- factor
   endif 
 
-#line 76
+#line 84
   dp3 r3.w, r4.xyzx, r4.xyzx
   rsq r3.w, r3.w
   mul r5.xyz, r3.wwww, r4.xyzx
   dp3 r3.w, v3.xyzx, r5.xyzx  // r3.w <- f
 
-#line 77
+#line 85
   itof r4.w, l(0)
   lt r4.w, r4.w, r3.w
   if_nz r4.w
 
-#line 79
+#line 87
     ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r5.x, r1.w, l(12), t2.xxxx
     ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r5.y, r1.w, l(16), t2.xxxx
     ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r5.z, r1.w, l(20), t2.xxxx
@@ -210,7 +223,7 @@ loop
     mul r5.xyz, r2.wwww, r5.xyzx
     add r3.xyz, r5.xyzx, r3.xyzx
 
-#line 80
+#line 88
     mov r4.xyz, -r4.xyzx
     dp3 r3.w, r4.xyzx, r4.xyzx
     rsq r3.w, r3.w
@@ -230,12 +243,12 @@ loop
     mul r5.xyz, r3.wwww, r5.xyzx
     dp3 r3.w, r4.xyzx, r5.xyzx  // r3.w <- f
 
-#line 81
+#line 89
     itof r4.x, l(0)
     lt r4.x, r4.x, r3.w
     if_nz r4.x
 
-#line 82
+#line 90
       ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r4.x, r1.w, l(12), t2.xxxx
       ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r4.y, r1.w, l(16), t2.xxxx
       ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r4.z, r1.w, l(20), t2.xxxx
@@ -244,17 +257,57 @@ loop
       add r0.yzw, r0.yyzw, r4.xxyz
     endif 
 
-#line 83
+#line 91
   endif 
 
-#line 84
+#line 92
   iadd r1.w, r1.w, l(1)
 endloop 
 
-#line 87
+#line 95
 sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v2.xyxx, t0.xyzw, s0  // r1.x <- materialColor.x; r1.y <- materialColor.y; r1.z <- materialColor.z; r1.w <- materialColor.w
 
-#line 88
+#line 96
+ine r0.x, l(0, 0, 0, 0), cb3[0].x
+if_nz r0.x
+
+#line 98
+  mov r0.x, l(-0.500000)
+  add r0.x, r0.x, v2.x
+  mov r2.x, l(-0.500000)
+  add r2.x, r2.x, v2.x
+  mul r0.x, r0.x, r2.x
+  mov r2.x, l(-0.500000)
+  add r2.x, r2.x, v2.y
+  mov r2.y, l(-0.500000)
+  add r2.y, r2.y, v2.y
+  mul r2.x, r2.y, r2.x
+  add r0.x, r0.x, r2.x
+  sqrt r0.x, r0.x
+  div r0.x, r0.x, l(0.707107)  // r0.x <- dist
+
+#line 99
+  lt r0.x, r0.x, cb3[0].y
+  if_nz r0.x
+
+#line 101
+    sample_indexable(texture2d)(float,float,float,float) r2.xyzw, v2.xyxx, t3.xyzw, s0  // r2.x <- effectColor.x; r2.y <- effectColor.y; r2.z <- effectColor.z; r2.w <- effectColor.w
+
+#line 102
+    mul r4.xyzw, r2.wwww, r2.xyzw
+    itof r0.x, l(1)
+    mov r2.x, -r2.w
+    add r0.x, r0.x, r2.x
+    mul r2.xyzw, r0.xxxx, r1.xyzw
+    add r1.xyzw, r2.xyzw, r4.xyzw
+
+#line 103
+  endif 
+
+#line 104
+endif 
+
+#line 105
 mul r2.xyz, r1.xyzx, cb1[0].xxxx
 mul r3.yzw, r3.xxyz, cb1[0].yyyy
 add r2.xyz, r2.xyzx, r3.yzwy
@@ -263,178 +316,204 @@ add r0.xyz, r0.xyzx, r2.xyzx
 max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
 min r0.xyz, r0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)  // r0.x <- textureColor.x; r0.y <- textureColor.y; r0.z <- textureColor.z
 
-#line 89
+#line 106
 mov r1.w, r1.w  // r1.w <- textureColor.w
 
-#line 90
+#line 107
 mul r0.w, r3.x, cb1[0].y
 ne r0.w, r0.w, r0.w
 if_nz r0.w
 
-#line 91
+#line 108
   mov r0.xyz, r1.xyzx
 endif 
 
-#line 92
+#line 109
 mov o0.xyz, r0.xyzx
 mov o0.w, r1.w
 ret 
-// Approximately 117 instruction slots used
+// Approximately 143 instruction slots used
 #endif
 
 const BYTE UIPixelShader[] =
 {
-     68,  88,  66,  67, 126, 158, 
-     30, 212, 156,  16, 253,  56, 
-    165,  43, 140, 104, 171,  65, 
-    127, 182,   1,   0,   0,   0, 
-    132, 113,   0,   0,   6,   0, 
+     68,  88,  66,  67,  65,  88, 
+    142, 125,  93,   2,   4,  77, 
+    248, 111,  83, 186, 204,  55, 
+    202,   8,   1,   0,   0,   0, 
+     96, 125,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
-    124,   5,   0,   0,  12,   6, 
-      0,   0,  64,   6,   0,   0, 
-    224,  18,   0,   0, 124,  19, 
+    192,   6,   0,   0,  80,   7, 
+      0,   0, 132,   7,   0,   0, 
+    188,  22,   0,   0,  88,  23, 
       0,   0,  82,  68,  69,  70, 
-     60,   5,   0,   0,   5,   0, 
-      0,   0, 108,   1,   0,   0, 
-      7,   0,   0,   0,  60,   0, 
+    128,   6,   0,   0,   6,   0, 
+      0,   0, 200,   1,   0,   0, 
+      9,   0,   0,   0,  60,   0, 
       0,   0,   0,   5, 255, 255, 
-      5,   1,   0,   0,  20,   5, 
+      5,   1,   0,   0,  88,   6, 
       0,   0,  82,  68,  49,  49, 
      60,   0,   0,   0,  24,   0, 
       0,   0,  32,   0,   0,   0, 
      40,   0,   0,   0,  36,   0, 
       0,   0,  12,   0,   0,   0, 
-      0,   0,   0,   0,  28,   1, 
+      0,   0,   0,   0,  92,   1, 
       0,   0,   3,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
-     39,   1,   0,   0,   2,   0, 
+    103,   1,   0,   0,   2,   0, 
       0,   0,   5,   0,   0,   0, 
       4,   0,   0,   0, 255, 255, 
     255, 255,   0,   0,   0,   0, 
       1,   0,   0,   0,  13,   0, 
-      0,   0,  53,   1,   0,   0, 
+      0,   0, 117,   1,   0,   0, 
       5,   0,   0,   0,   6,   0, 
       0,   0,   1,   0,   0,   0, 
      24,   0,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
-      1,   0,   0,   0,  66,   1, 
+      1,   0,   0,   0, 130,   1, 
       0,   0,   5,   0,   0,   0, 
       6,   0,   0,   0,   1,   0, 
       0,   0,  28,   0,   0,   0, 
       2,   0,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
-     78,   1,   0,   0,   0,   0, 
+    142,   1,   0,   0,   2,   0, 
+      0,   0,   5,   0,   0,   0, 
+      4,   0,   0,   0, 255, 255, 
+    255, 255,   3,   0,   0,   0, 
+      1,   0,   0,   0,  13,   0, 
+      0,   0, 160,   1,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      1,   0,   0,   0,   1,   0, 
-      0,   0,  85,   1,   0,   0, 
+      0,   0,   1,   0,   0,   0, 
+      1,   0,   0,   0, 167,   1, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   1,   0, 
+      0,   0,   0,   0,   0,   0, 
+      1,   0,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
-      1,   0,   0,   0,  94,   1, 
+    176,   1,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+      0,   0,   2,   0,   0,   0, 
+      1,   0,   0,   0,   1,   0, 
+      0,   0, 187,   1,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      2,   0,   0,   0,   1,   0, 
+      0,   0,   0,   0,   3,   0, 
       0,   0,   1,   0,   0,   0, 
-     83,  97, 109, 112, 108, 101, 
-     84, 121, 112, 101,   0, 115, 
-    104,  97, 100, 101, 114,  84, 
-    101, 120, 116, 117, 114, 101, 
-      0, 100, 105, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-    115,   0, 112, 111, 105, 110, 
-    116,  76, 105, 103, 104, 116, 
-    115,   0,  75,  97, 109, 101, 
-    114,  97,   0,  77,  97, 116, 
-    101, 114, 105,  97, 108,   0, 
-     76, 105, 103, 104, 116,  67, 
-    111, 117, 110, 116,   0, 171, 
-    171, 171,  78,   1,   0,   0, 
-      1,   0,   0,   0, 228,   1, 
-      0,   0,  16,   0,   0,   0, 
+      1,   0,   0,   0,  83,  97, 
+    109, 112, 108, 101,  84, 121, 
+    112, 101,   0, 115, 104,  97, 
+    100, 101, 114,  84, 101, 120, 
+    116, 117, 114, 101,   0, 100, 
+    105, 102, 117, 115, 101,  76, 
+    105, 103, 104, 116, 115,   0, 
+    112, 111, 105, 110, 116,  76, 
+    105, 103, 104, 116, 115,   0, 
+     97, 100, 100, 105, 116, 105, 
+    111, 110,  97, 108,  84, 101, 
+    120, 116, 117, 114, 101,   0, 
+     75,  97, 109, 101, 114,  97, 
+      0,  77,  97, 116, 101, 114, 
+    105,  97, 108,   0,  76, 105, 
+    103, 104, 116,  67, 111, 117, 
+    110, 116,   0,  84, 101, 120, 
+    116, 117, 114,  69, 102, 102, 
+    101,  99, 116,   0, 160,   1, 
+      0,   0,   1,   0,   0,   0, 
+     88,   2,   0,   0,  16,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,  85,   1,   0,   0, 
-      3,   0,   0,   0,  68,   2, 
-      0,   0,  16,   0,   0,   0, 
+      0,   0,   0,   0, 167,   1, 
+      0,   0,   3,   0,   0,   0, 
+    184,   2,   0,   0,  16,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,  94,   1,   0,   0, 
-      2,   0,   0,   0,  16,   3, 
-      0,   0,  16,   0,   0,   0, 
+      0,   0,   0,   0, 176,   1, 
+      0,   0,   3,   0,   0,   0, 
+    132,   3,   0,   0,  16,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,  53,   1,   0,   0, 
-      1,   0,   0,   0, 172,   3, 
-      0,   0,  24,   0,   0,   0, 
-      0,   0,   0,   0,   3,   0, 
-      0,   0,  66,   1,   0,   0, 
-      1,   0,   0,   0, 100,   4, 
-      0,   0,  28,   0,   0,   0, 
-      0,   0,   0,   0,   3,   0, 
-      0,   0,  12,   2,   0,   0, 
-      0,   0,   0,   0,  16,   0, 
+      0,   0,   0,   0, 187,   1, 
       0,   0,   2,   0,   0,   0, 
-     32,   2,   0,   0,   0,   0, 
-      0,   0, 255, 255, 255, 255, 
+     84,   4,   0,   0,  16,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0, 117,   1, 
+      0,   0,   1,   0,   0,   0, 
+    240,   4,   0,   0,  24,   0, 
+      0,   0,   0,   0,   0,   0, 
+      3,   0,   0,   0, 130,   1, 
+      0,   0,   1,   0,   0,   0, 
+    168,   5,   0,   0,  28,   0, 
+      0,   0,   0,   0,   0,   0, 
+      3,   0,   0,   0, 128,   2, 
+      0,   0,   0,   0,   0,   0, 
+     16,   0,   0,   0,   2,   0, 
+      0,   0, 148,   2,   0,   0, 
       0,   0,   0,   0, 255, 255, 
     255, 255,   0,   0,   0,   0, 
-    107,  80, 111, 115, 105, 116, 
-    105, 111, 110,   0, 102, 108, 
-    111,  97, 116,  52,   0, 171, 
-    171, 171,   1,   0,   3,   0, 
-      1,   0,   4,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 107,  80, 111, 115, 
+    105, 116, 105, 111, 110,   0, 
+    102, 108, 111,  97, 116,  52, 
+      0, 171, 171, 171,   1,   0, 
+      3,   0,   1,   0,   4,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,  22,   2, 
-      0,   0, 188,   2,   0,   0, 
-      0,   0,   0,   0,   4,   0, 
+      0,   0,   0,   0,   0,   0, 
+    138,   2,   0,   0,  48,   3, 
+      0,   0,   0,   0,   0,   0, 
+      4,   0,   0,   0,   2,   0, 
+      0,   0,  68,   3,   0,   0, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 104,   3,   0,   0, 
+      4,   0,   0,   0,   4,   0, 
       0,   0,   2,   0,   0,   0, 
-    208,   2,   0,   0,   0,   0, 
+     68,   3,   0,   0,   0,   0, 
       0,   0, 255, 255, 255, 255, 
       0,   0,   0,   0, 255, 255, 
     255, 255,   0,   0,   0,   0, 
-    244,   2,   0,   0,   4,   0, 
+    117,   3,   0,   0,   8,   0, 
       0,   0,   4,   0,   0,   0, 
-      2,   0,   0,   0, 208,   2, 
+      2,   0,   0,   0,  68,   3, 
       0,   0,   0,   0,   0,   0, 
     255, 255, 255, 255,   0,   0, 
       0,   0, 255, 255, 255, 255, 
-      0,   0,   0,   0,   1,   3, 
-      0,   0,   8,   0,   0,   0, 
-      4,   0,   0,   0,   2,   0, 
-      0,   0, 208,   2,   0,   0, 
-      0,   0,   0,   0, 255, 255, 
-    255, 255,   0,   0,   0,   0, 
-    255, 255, 255, 255,   0,   0, 
-      0,   0,  97, 109,  98, 105, 
-    101, 110, 116,  70,  97,  99, 
-    116, 111, 114,   0, 102, 108, 
-    111,  97, 116,   0,   0,   0, 
-      3,   0,   1,   0,   1,   0, 
+      0,   0,   0,   0,  97, 109, 
+     98, 105, 101, 110, 116,  70, 
+     97,  99, 116, 111, 114,   0, 
+    102, 108, 111,  97, 116,   0, 
+      0,   0,   3,   0,   1,   0, 
+      1,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+      0,   0,  62,   3,   0,   0, 
+    100, 105, 102, 102, 117, 115, 
+     70,  97,  99, 116, 111, 114, 
+      0, 115, 112, 101,  99, 117, 
+    108,  97, 114,  70,  97,  99, 
+    116, 111, 114,   0, 252,   3, 
       0,   0,   0,   0,   0,   0, 
-    202,   2,   0,   0, 100, 105, 
-    102, 102, 117, 115,  70,  97, 
-     99, 116, 111, 114,   0, 115, 
-    112, 101,  99, 117, 108,  97, 
-    114,  70,  97,  99, 116, 111, 
-    114,   0,  96,   3,   0,   0, 
-      0,   0,   0,   0,   4,   0, 
+      4,   0,   0,   0,   2,   0, 
+      0,   0,  20,   4,   0,   0, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0,  56,   4,   0,   0, 
+      4,   0,   0,   0,   4,   0, 
       0,   0,   2,   0,   0,   0, 
-    120,   3,   0,   0,   0,   0, 
+     20,   4,   0,   0,   0,   0, 
       0,   0, 255, 255, 255, 255, 
       0,   0,   0,   0, 255, 255, 
     255, 255,   0,   0,   0,   0, 
-    156,   3,   0,   0,   4,   0, 
+     72,   4,   0,   0,   8,   0, 
       0,   0,   4,   0,   0,   0, 
-      2,   0,   0,   0, 120,   3, 
+      0,   0,   0,   0,  20,   4, 
       0,   0,   0,   0,   0,   0, 
     255, 255, 255, 255,   0,   0, 
       0,   0, 255, 255, 255, 255, 
@@ -448,13 +527,41 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    114,   3,   0,   0, 112, 111, 
+     14,   4,   0,   0, 112, 111, 
     105, 110, 116,  76, 105, 103, 
     104, 116,  67, 111, 117, 110, 
-    116,   0, 212,   3,   0,   0, 
+    116,   0, 101, 102, 102, 101, 
+     99, 116,  67, 111, 117, 110, 
+    116,   0, 164,   4,   0,   0, 
+      0,   0,   0,   0,   4,   0, 
+      0,   0,   2,   0,   0,   0, 
+    184,   4,   0,   0,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 255, 255, 
+    255, 255,   0,   0,   0,   0, 
+    220,   4,   0,   0,   4,   0, 
+      0,   0,   4,   0,   0,   0, 
+      2,   0,   0,   0,  68,   3, 
+      0,   0,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0, 255, 255, 255, 255, 
+      0,   0,   0,   0, 101, 102, 
+    102, 101,  99, 116,  69, 110, 
+     97,  98, 108, 101, 100,   0, 
+     98, 111, 111, 108,   0, 171, 
+      0,   0,   1,   0,   1,   0, 
+      1,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0, 178,   4,   0,   0, 
+    101, 102, 102, 101,  99, 116, 
+     80, 101, 114,  99, 101, 110, 
+    116,  97, 103, 101,   0, 171, 
+    171, 171,  24,   5,   0,   0, 
       0,   0,   0,   0,  24,   0, 
       0,   0,   2,   0,   0,   0, 
-     64,   4,   0,   0,   0,   0, 
+    132,   5,   0,   0,   0,   0, 
       0,   0, 255, 255, 255, 255, 
       0,   0,   0,   0, 255, 255, 
     255, 255,   0,   0,   0,   0, 
@@ -470,21 +577,21 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    244,   3,   0,   0,  99, 111, 
+     56,   5,   0,   0,  99, 111, 
     108, 111, 114,   0, 171, 171, 
-    234,   3,   0,   0, 252,   3, 
+     46,   5,   0,   0,  64,   5, 
       0,   0,   0,   0,   0,   0, 
-     32,   4,   0,   0, 252,   3, 
+    100,   5,   0,   0,  64,   5, 
       0,   0,  12,   0,   0,   0, 
       5,   0,   0,   0,   1,   0, 
       6,   0,   0,   0,   2,   0, 
-     40,   4,   0,   0,   0,   0, 
+    108,   5,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0, 221,   3,   0,   0, 
-    212,   3,   0,   0,   0,   0, 
+      0,   0,  33,   5,   0,   0, 
+     24,   5,   0,   0,   0,   0, 
       0,   0,  28,   0,   0,   0, 
-      2,   0,   0,   0, 240,   4, 
+      2,   0,   0,   0,  52,   6, 
       0,   0,   0,   0,   0,   0, 
     255, 255, 255, 255,   0,   0, 
       0,   0, 255, 255, 255, 255, 
@@ -498,19 +605,19 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0, 202,   2, 
-      0,   0, 151,   4,   0,   0, 
-    252,   3,   0,   0,   0,   0, 
-      0,   0,  32,   4,   0,   0, 
-    252,   3,   0,   0,  12,   0, 
-      0,   0, 160,   4,   0,   0, 
-    168,   4,   0,   0,  24,   0, 
+      0,   0,   0,   0,  62,   3, 
+      0,   0, 219,   5,   0,   0, 
+     64,   5,   0,   0,   0,   0, 
+      0,   0, 100,   5,   0,   0, 
+     64,   5,   0,   0,  12,   0, 
+      0,   0, 228,   5,   0,   0, 
+    236,   5,   0,   0,  24,   0, 
       0,   0,   5,   0,   0,   0, 
       1,   0,   7,   0,   0,   0, 
-      3,   0, 204,   4,   0,   0, 
+      3,   0,  16,   6,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0, 140,   4, 
+      0,   0,   0,   0, 208,   5, 
       0,   0,  77, 105,  99, 114, 
     111, 115, 111, 102, 116,  32, 
      40,  82,  41,  32,  72,  76, 
@@ -551,8 +658,8 @@ const BYTE UIPixelShader[] =
      15,   0,   0,   0,  83,  86, 
      95,  84,  65,  82,  71,  69, 
      84,   0, 171, 171,  83,  72, 
-     69,  88, 152,  12,   0,   0, 
-     80,   0,   0,   0,  38,   3, 
+     69,  88,  48,  15,   0,   0, 
+     80,   0,   0,   0, 204,   3, 
       0,   0, 106, 136,   0,   1, 
      89,   0,   0,   4,  70, 142, 
      32,   0,   0,   0,   0,   0, 
@@ -562,334 +669,272 @@ const BYTE UIPixelShader[] =
       0,   0,  89,   0,   0,   4, 
      70, 142,  32,   0,   2,   0, 
       0,   0,   1,   0,   0,   0, 
-     90,   0,   0,   3,   0,  96, 
-     16,   0,   0,   0,   0,   0, 
-     88,  24,   0,   4,   0, 112, 
-     16,   0,   0,   0,   0,   0, 
-     85,  85,   0,   0, 162,   0, 
+     89,   0,   0,   4,  70, 142, 
+     32,   0,   3,   0,   0,   0, 
+      1,   0,   0,   0,  90,   0, 
+      0,   3,   0,  96,  16,   0, 
+      0,   0,   0,   0,  88,  24, 
       0,   4,   0, 112,  16,   0, 
-      1,   0,   0,   0,  24,   0, 
+      0,   0,   0,   0,  85,  85, 
       0,   0, 162,   0,   0,   4, 
-      0, 112,  16,   0,   2,   0, 
-      0,   0,  28,   0,   0,   0, 
-     98,  16,   0,   3, 114,  16, 
-     16,   0,   0,   0,   0,   0, 
-     98,  16,   0,   3,  50,  16, 
+      0, 112,  16,   0,   1,   0, 
+      0,   0,  24,   0,   0,   0, 
+    162,   0,   0,   4,   0, 112, 
      16,   0,   2,   0,   0,   0, 
-     98,  16,   0,   3, 114,  16, 
-     16,   0,   3,   0,   0,   0, 
-    101,   0,   0,   3, 242,  32, 
-     16,   0,   0,   0,   0,   0, 
-    104,   0,   0,   2,   6,   0, 
-      0,   0,  43,   0,   0,   8, 
-    114,   0,  16,   0,   0,   0, 
-      0,   0,   2,  64,   0,   0, 
+     28,   0,   0,   0,  88,  24, 
+      0,   4,   0, 112,  16,   0, 
+      3,   0,   0,   0,  85,  85, 
+      0,   0,  98,  16,   0,   3, 
+    114,  16,  16,   0,   0,   0, 
+      0,   0,  98,  16,   0,   3, 
+     50,  16,  16,   0,   2,   0, 
+      0,   0,  98,  16,   0,   3, 
+    114,  16,  16,   0,   3,   0, 
+      0,   0, 101,   0,   0,   3, 
+    242,  32,  16,   0,   0,   0, 
+      0,   0, 104,   0,   0,   2, 
+      6,   0,   0,   0,  43,   0, 
+      0,   8, 114,   0,  16,   0, 
+      0,   0,   0,   0,   2,  64, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,  43,   0, 
-      0,   8, 114,   0,  16,   0, 
-      1,   0,   0,   0,   2,  64, 
       0,   0,   0,   0,   0,   0, 
+     43,   0,   0,   8, 114,   0, 
+     16,   0,   1,   0,   0,   0, 
+      2,  64,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-     54,   0,   0,   5, 130,   0, 
-     16,   0,   0,   0,   0,   0, 
-      1,  64,   0,   0,   0,   0, 
       0,   0,  54,   0,   0,   5, 
-    114,   0,  16,   0,   2,   0, 
-      0,   0,  70,   2,  16,   0, 
+    130,   0,  16,   0,   0,   0, 
+      0,   0,   1,  64,   0,   0, 
       0,   0,   0,   0,  54,   0, 
-      0,   5, 130,   0,  16,   0, 
-      1,   0,   0,   0,  58,   0, 
+      0,   5, 114,   0,  16,   0, 
+      2,   0,   0,   0,  70,   2, 
      16,   0,   0,   0,   0,   0, 
-     48,   0,   0,   1,  34,   0, 
-      0,   8, 130,   0,  16,   0, 
-      2,   0,   0,   0,  58,   0, 
+     54,   0,   0,   5, 130,   0, 
      16,   0,   1,   0,   0,   0, 
-     10, 128,  32,   0,   2,   0, 
-      0,   0,   0,   0,   0,   0, 
-      3,   0,   0,   3,  58,   0, 
+     58,   0,  16,   0,   0,   0, 
+      0,   0,  48,   0,   0,   1, 
+     34,   0,   0,   8, 130,   0, 
      16,   0,   2,   0,   0,   0, 
-    167,   0,   0, 139,   2, 195, 
-      0, 128, 131, 153,  25,   0, 
-     18,   0,  16,   0,   3,   0, 
-      0,   0,  58,   0,  16,   0, 
-      1,   0,   0,   0,   1,  64, 
-      0,   0,   0,   0,   0,   0, 
-      6, 112,  16,   0,   1,   0, 
+     58,   0,  16,   0,   1,   0, 
+      0,   0,  10, 128,  32,   0, 
+      2,   0,   0,   0,   0,   0, 
+      0,   0,   3,   0,   0,   3, 
+     58,   0,  16,   0,   2,   0, 
       0,   0, 167,   0,   0, 139, 
       2, 195,   0, 128, 131, 153, 
-     25,   0,  34,   0,  16,   0, 
+     25,   0,  18,   0,  16,   0, 
       3,   0,   0,   0,  58,   0, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,   4,   0, 
+      1,  64,   0,   0,   0,   0, 
       0,   0,   6, 112,  16,   0, 
       1,   0,   0,   0, 167,   0, 
       0, 139,   2, 195,   0, 128, 
-    131, 153,  25,   0,  66,   0, 
+    131, 153,  25,   0,  34,   0, 
      16,   0,   3,   0,   0,   0, 
      58,   0,  16,   0,   1,   0, 
       0,   0,   1,  64,   0,   0, 
-      8,   0,   0,   0,   6, 112, 
+      4,   0,   0,   0,   6, 112, 
      16,   0,   1,   0,   0,   0, 
-     54,   0,   0,   6, 114,   0, 
+    167,   0,   0, 139,   2, 195, 
+      0, 128, 131, 153,  25,   0, 
+     66,   0,  16,   0,   3,   0, 
+      0,   0,  58,   0,  16,   0, 
+      1,   0,   0,   0,   1,  64, 
+      0,   0,   8,   0,   0,   0, 
+      6, 112,  16,   0,   1,   0, 
+      0,   0,  54,   0,   0,   6, 
+    114,   0,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16, 128, 
+     65,   0,   0,   0,   3,   0, 
+      0,   0,  16,   0,   0,   7, 
+    130,   0,  16,   0,   2,   0, 
+      0,   0,  70,  18,  16,   0, 
+      3,   0,   0,   0,  70,   2, 
      16,   0,   3,   0,   0,   0, 
-     70,   2,  16, 128,  65,   0, 
-      0,   0,   3,   0,   0,   0, 
-     16,   0,   0,   7, 130,   0, 
-     16,   0,   2,   0,   0,   0, 
-     70,  18,  16,   0,   3,   0, 
-      0,   0,  70,   2,  16,   0, 
-      3,   0,   0,   0,  43,   0, 
-      0,   5,  18,   0,  16,   0, 
-      3,   0,   0,   0,   1,  64, 
-      0,   0,   0,   0,   0,   0, 
-     49,   0,   0,   7, 130,   0, 
+     43,   0,   0,   5,  18,   0, 
+     16,   0,   3,   0,   0,   0, 
+      1,  64,   0,   0,   0,   0, 
+      0,   0,  49,   0,   0,   7, 
+    130,   0,  16,   0,   2,   0, 
+      0,   0,  58,   0,  16,   0, 
+      2,   0,   0,   0,  10,   0, 
+     16,   0,   3,   0,   0,   0, 
+     31,   0,   4,   3,  58,   0, 
      16,   0,   2,   0,   0,   0, 
-     58,   0,  16,   0,   2,   0, 
-      0,   0,  10,   0,  16,   0, 
-      3,   0,   0,   0,  31,   0, 
-      4,   3,  58,   0,  16,   0, 
-      2,   0,   0,   0,  30,   0, 
-      0,   7, 130,   0,  16,   0, 
-      1,   0,   0,   0,  58,   0, 
+     30,   0,   0,   7, 130,   0, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,   1,   0, 
-      0,   0,   7,   0,   0,   1, 
-     21,   0,   0,   1, 167,   0, 
-      0, 139,   2, 195,   0, 128, 
-    131, 153,  25,   0,  18,   0, 
-     16,   0,   3,   0,   0,   0, 
      58,   0,  16,   0,   1,   0, 
       0,   0,   1,  64,   0,   0, 
-     12,   0,   0,   0,   6, 112, 
-     16,   0,   1,   0,   0,   0, 
+      1,   0,   0,   0,   7,   0, 
+      0,   1,  21,   0,   0,   1, 
     167,   0,   0, 139,   2, 195, 
       0, 128, 131, 153,  25,   0, 
-     34,   0,  16,   0,   3,   0, 
+     18,   0,  16,   0,   3,   0, 
       0,   0,  58,   0,  16,   0, 
       1,   0,   0,   0,   1,  64, 
-      0,   0,  16,   0,   0,   0, 
+      0,   0,  12,   0,   0,   0, 
       6, 112,  16,   0,   1,   0, 
       0,   0, 167,   0,   0, 139, 
       2, 195,   0, 128, 131, 153, 
-     25,   0,  66,   0,  16,   0, 
+     25,   0,  34,   0,  16,   0, 
       3,   0,   0,   0,  58,   0, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,  20,   0, 
+      1,  64,   0,   0,  16,   0, 
       0,   0,   6, 112,  16,   0, 
       1,   0,   0,   0, 167,   0, 
       0, 139,   2, 195,   0, 128, 
-    131, 153,  25,   0,  18,   0, 
-     16,   0,   4,   0,   0,   0, 
+    131, 153,  25,   0,  66,   0, 
+     16,   0,   3,   0,   0,   0, 
      58,   0,  16,   0,   1,   0, 
       0,   0,   1,  64,   0,   0, 
-      0,   0,   0,   0,   6, 112, 
+     20,   0,   0,   0,   6, 112, 
      16,   0,   1,   0,   0,   0, 
     167,   0,   0, 139,   2, 195, 
       0, 128, 131, 153,  25,   0, 
-     34,   0,  16,   0,   4,   0, 
+     18,   0,  16,   0,   4,   0, 
       0,   0,  58,   0,  16,   0, 
       1,   0,   0,   0,   1,  64, 
-      0,   0,   4,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
       6, 112,  16,   0,   1,   0, 
       0,   0, 167,   0,   0, 139, 
       2, 195,   0, 128, 131, 153, 
-     25,   0,  66,   0,  16,   0, 
+     25,   0,  34,   0,  16,   0, 
       4,   0,   0,   0,  58,   0, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,   8,   0, 
+      1,  64,   0,   0,   4,   0, 
       0,   0,   6, 112,  16,   0, 
-      1,   0,   0,   0,  54,   0, 
-      0,   6, 114,   0,  16,   0, 
-      4,   0,   0,   0,  70,   2, 
-     16, 128,  65,   0,   0,   0, 
-      4,   0,   0,   0,  16,   0, 
-      0,   7, 130,   0,  16,   0, 
-      2,   0,   0,   0,  70,  18, 
-     16,   0,   3,   0,   0,   0, 
-     70,   2,  16,   0,   4,   0, 
-      0,   0,  56,   0,   0,   7, 
-    114,   0,  16,   0,   3,   0, 
-      0,   0, 246,  15,  16,   0, 
-      2,   0,   0,   0,  70,   2, 
-     16,   0,   3,   0,   0,   0, 
-      0,   0,   0,   7, 114,   0, 
-     16,   0,   2,   0,   0,   0, 
-     70,   2,  16,   0,   2,   0, 
-      0,   0,  70,   2,  16,   0, 
-      3,   0,   0,   0,  30,   0, 
-      0,   7, 130,   0,  16,   0, 
-      1,   0,   0,   0,  58,   0, 
+      1,   0,   0,   0, 167,   0, 
+      0, 139,   2, 195,   0, 128, 
+    131, 153,  25,   0,  66,   0, 
+     16,   0,   4,   0,   0,   0, 
+     58,   0,  16,   0,   1,   0, 
+      0,   0,   1,  64,   0,   0, 
+      8,   0,   0,   0,   6, 112, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,   1,   0, 
-      0,   0,  22,   0,   0,   1, 
-     54,   0,   0,   5,  18,   0, 
-     16,   0,   0,   0,   0,   0, 
-      1,  64,   0,   0,   0,   0, 
-      0,   0,  54,   0,   0,   5, 
-    226,   0,  16,   0,   0,   0, 
-      0,   0,   6,   9,  16,   0, 
-      1,   0,   0,   0,  54,   0, 
-      0,   5,  98,   0,  16,   0, 
-      3,   0,   0,   0,  86,   6, 
+     54,   0,   0,   6, 114,   0, 
+     16,   0,   4,   0,   0,   0, 
+     70,   2,  16, 128,  65,   0, 
+      0,   0,   4,   0,   0,   0, 
+     16,   0,   0,   7, 130,   0, 
+     16,   0,   2,   0,   0,   0, 
+     70,  18,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16,   0, 
+      4,   0,   0,   0,  56,   0, 
+      0,   7, 114,   0,  16,   0, 
+      3,   0,   0,   0, 246,  15, 
      16,   0,   2,   0,   0,   0, 
-     54,   0,   0,   5,  18,   0, 
+     70,   2,  16,   0,   3,   0, 
+      0,   0,   0,   0,   0,   7, 
+    114,   0,  16,   0,   2,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0,  70,   2, 
      16,   0,   3,   0,   0,   0, 
-     10,   0,  16,   0,   2,   0, 
-      0,   0,  54,   0,   0,   5, 
-    130,   0,  16,   0,   1,   0, 
-      0,   0,  10,   0,  16,   0, 
-      0,   0,   0,   0,  48,   0, 
-      0,   1,  34,   0,   0,   8, 
-    130,   0,  16,   0,   2,   0, 
-      0,   0,  58,   0,  16,   0, 
-      1,   0,   0,   0,  26, 128, 
-     32,   0,   2,   0,   0,   0, 
-      0,   0,   0,   0,   3,   0, 
-      0,   3,  58,   0,  16,   0, 
-      2,   0,   0,   0, 167,   0, 
-      0, 139,   2, 227,   0, 128, 
-    131, 153,  25,   0,  18,   0, 
-     16,   0,   4,   0,   0,   0, 
+     30,   0,   0,   7, 130,   0, 
+     16,   0,   1,   0,   0,   0, 
      58,   0,  16,   0,   1,   0, 
       0,   0,   1,  64,   0,   0, 
-      0,   0,   0,   0,   6, 112, 
+      1,   0,   0,   0,  22,   0, 
+      0,   1,  54,   0,   0,   5, 
+     18,   0,  16,   0,   0,   0, 
+      0,   0,   1,  64,   0,   0, 
+      0,   0,   0,   0,  54,   0, 
+      0,   5, 226,   0,  16,   0, 
+      0,   0,   0,   0,   6,   9, 
+     16,   0,   1,   0,   0,   0, 
+     54,   0,   0,   5,  98,   0, 
+     16,   0,   3,   0,   0,   0, 
+     86,   6,  16,   0,   2,   0, 
+      0,   0,  54,   0,   0,   5, 
+     18,   0,  16,   0,   3,   0, 
+      0,   0,  10,   0,  16,   0, 
+      2,   0,   0,   0,  54,   0, 
+      0,   5, 130,   0,  16,   0, 
+      1,   0,   0,   0,  10,   0, 
+     16,   0,   0,   0,   0,   0, 
+     48,   0,   0,   1,  34,   0, 
+      0,   8, 130,   0,  16,   0, 
+      2,   0,   0,   0,  58,   0, 
+     16,   0,   1,   0,   0,   0, 
+     26, 128,  32,   0,   2,   0, 
+      0,   0,   0,   0,   0,   0, 
+      3,   0,   0,   3,  58,   0, 
      16,   0,   2,   0,   0,   0, 
     167,   0,   0, 139,   2, 227, 
       0, 128, 131, 153,  25,   0, 
-     34,   0,  16,   0,   4,   0, 
+     18,   0,  16,   0,   4,   0, 
       0,   0,  58,   0,  16,   0, 
       1,   0,   0,   0,   1,  64, 
-      0,   0,   4,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
       6, 112,  16,   0,   2,   0, 
       0,   0, 167,   0,   0, 139, 
       2, 227,   0, 128, 131, 153, 
-     25,   0,  66,   0,  16,   0, 
+     25,   0,  34,   0,  16,   0, 
       4,   0,   0,   0,  58,   0, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,   8,   0, 
+      1,  64,   0,   0,   4,   0, 
       0,   0,   6, 112,  16,   0, 
-      2,   0,   0,   0,  54,   0, 
-      0,   6, 114,   0,  16,   0, 
-      5,   0,   0,   0,  70,  18, 
-     16, 128,  65,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   7, 114,   0,  16,   0, 
-      4,   0,   0,   0,  70,   2, 
-     16,   0,   4,   0,   0,   0, 
-     70,   2,  16,   0,   5,   0, 
-      0,   0,  16,   0,   0,   7, 
-    130,   0,  16,   0,   2,   0, 
-      0,   0,  70,   2,  16,   0, 
-      4,   0,   0,   0,  70,   2, 
+      2,   0,   0,   0, 167,   0, 
+      0, 139,   2, 227,   0, 128, 
+    131, 153,  25,   0,  66,   0, 
      16,   0,   4,   0,   0,   0, 
-     75,   0,   0,   5, 130,   0, 
-     16,   0,   2,   0,   0,   0, 
-     58,   0,  16,   0,   2,   0, 
-      0,   0,  43,   0,   0,   5, 
-    130,   0,  16,   0,   3,   0, 
+     58,   0,  16,   0,   1,   0, 
       0,   0,   1,  64,   0,   0, 
-      1,   0,   0,   0,  49,   0, 
-      0,   7, 130,   0,  16,   0, 
-      2,   0,   0,   0,  58,   0, 
+      8,   0,   0,   0,   6, 112, 
      16,   0,   2,   0,   0,   0, 
-     58,   0,  16,   0,   3,   0, 
-      0,   0,  31,   0,   4,   3, 
-     58,   0,  16,   0,   2,   0, 
-      0,   0,  43,   0,   0,   5, 
-    130,   0,  16,   0,   2,   0, 
-      0,   0,   1,  64,   0,   0, 
-      1,   0,   0,   0,  18,   0, 
-      0,   1, 167,   0,   0, 139, 
-      2, 227,   0, 128, 131, 153, 
-     25,   0, 130,   0,  16,   0, 
-      3,   0,   0,   0,  58,   0, 
-     16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,  24,   0, 
-      0,   0,   6, 112,  16,   0, 
-      2,   0,   0,   0,  16,   0, 
+     54,   0,   0,   6, 114,   0, 
+     16,   0,   5,   0,   0,   0, 
+     70,  18,  16, 128,  65,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   7, 114,   0, 
+     16,   0,   4,   0,   0,   0, 
+     70,   2,  16,   0,   4,   0, 
+      0,   0,  70,   2,  16,   0, 
+      5,   0,   0,   0,  16,   0, 
       0,   7, 130,   0,  16,   0, 
-      4,   0,   0,   0,  70,   2, 
+      2,   0,   0,   0,  70,   2, 
      16,   0,   4,   0,   0,   0, 
      70,   2,  16,   0,   4,   0, 
       0,   0,  75,   0,   0,   5, 
-    130,   0,  16,   0,   4,   0, 
+    130,   0,  16,   0,   2,   0, 
       0,   0,  58,   0,  16,   0, 
-      4,   0,   0,   0,  14,   0, 
-      0,   7, 130,   0,  16,   0, 
-      2,   0,   0,   0,  58,   0, 
+      2,   0,   0,   0,  43,   0, 
+      0,   5, 130,   0,  16,   0, 
+      3,   0,   0,   0,   1,  64, 
+      0,   0,   1,   0,   0,   0, 
+     49,   0,   0,   7, 130,   0, 
+     16,   0,   2,   0,   0,   0, 
+     58,   0,  16,   0,   2,   0, 
+      0,   0,  58,   0,  16,   0, 
+      3,   0,   0,   0,  31,   0, 
+      4,   3,  58,   0,  16,   0, 
+      2,   0,   0,   0,  43,   0, 
+      0,   5, 130,   0,  16,   0, 
+      2,   0,   0,   0,   1,  64, 
+      0,   0,   1,   0,   0,   0, 
+     18,   0,   0,   1, 167,   0, 
+      0, 139,   2, 227,   0, 128, 
+    131, 153,  25,   0, 130,   0, 
      16,   0,   3,   0,   0,   0, 
-     58,   0,  16,   0,   4,   0, 
-      0,   0,  21,   0,   0,   1, 
+     58,   0,  16,   0,   1,   0, 
+      0,   0,   1,  64,   0,   0, 
+     24,   0,   0,   0,   6, 112, 
+     16,   0,   2,   0,   0,   0, 
      16,   0,   0,   7, 130,   0, 
-     16,   0,   3,   0,   0,   0, 
+     16,   0,   4,   0,   0,   0, 
      70,   2,  16,   0,   4,   0, 
       0,   0,  70,   2,  16,   0, 
-      4,   0,   0,   0,  68,   0, 
+      4,   0,   0,   0,  75,   0, 
       0,   5, 130,   0,  16,   0, 
-      3,   0,   0,   0,  58,   0, 
-     16,   0,   3,   0,   0,   0, 
-     56,   0,   0,   7, 114,   0, 
-     16,   0,   5,   0,   0,   0, 
-    246,  15,  16,   0,   3,   0, 
-      0,   0,  70,   2,  16,   0, 
-      4,   0,   0,   0,  16,   0, 
-      0,   7, 130,   0,  16,   0, 
-      3,   0,   0,   0,  70,  18, 
-     16,   0,   3,   0,   0,   0, 
-     70,   2,  16,   0,   5,   0, 
-      0,   0,  43,   0,   0,   5, 
-    130,   0,  16,   0,   4,   0, 
-      0,   0,   1,  64,   0,   0, 
-      0,   0,   0,   0,  49,   0, 
-      0,   7, 130,   0,  16,   0, 
       4,   0,   0,   0,  58,   0, 
      16,   0,   4,   0,   0,   0, 
-     58,   0,  16,   0,   3,   0, 
-      0,   0,  31,   0,   4,   3, 
-     58,   0,  16,   0,   4,   0, 
-      0,   0, 167,   0,   0, 139, 
-      2, 227,   0, 128, 131, 153, 
-     25,   0,  18,   0,  16,   0, 
-      5,   0,   0,   0,  58,   0, 
-     16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,  12,   0, 
-      0,   0,   6, 112,  16,   0, 
-      2,   0,   0,   0, 167,   0, 
-      0, 139,   2, 227,   0, 128, 
-    131, 153,  25,   0,  34,   0, 
-     16,   0,   5,   0,   0,   0, 
-     58,   0,  16,   0,   1,   0, 
-      0,   0,   1,  64,   0,   0, 
-     16,   0,   0,   0,   6, 112, 
+     14,   0,   0,   7, 130,   0, 
      16,   0,   2,   0,   0,   0, 
-    167,   0,   0, 139,   2, 227, 
-      0, 128, 131, 153,  25,   0, 
-     66,   0,  16,   0,   5,   0, 
+     58,   0,  16,   0,   3,   0, 
       0,   0,  58,   0,  16,   0, 
-      1,   0,   0,   0,   1,  64, 
-      0,   0,  20,   0,   0,   0, 
-      6, 112,  16,   0,   2,   0, 
-      0,   0,  56,   0,   0,   7, 
-    114,   0,  16,   0,   5,   0, 
-      0,   0, 246,  15,  16,   0, 
-      3,   0,   0,   0,  70,   2, 
-     16,   0,   5,   0,   0,   0, 
-     56,   0,   0,   7, 114,   0, 
-     16,   0,   5,   0,   0,   0, 
-    246,  15,  16,   0,   2,   0, 
-      0,   0,  70,   2,  16,   0, 
-      5,   0,   0,   0,   0,   0, 
-      0,   7, 114,   0,  16,   0, 
-      3,   0,   0,   0,  70,   2, 
-     16,   0,   5,   0,   0,   0, 
-     70,   2,  16,   0,   3,   0, 
-      0,   0,  54,   0,   0,   6, 
-    114,   0,  16,   0,   4,   0, 
-      0,   0,  70,   2,  16, 128, 
-     65,   0,   0,   0,   4,   0, 
-      0,   0,  16,   0,   0,   7, 
+      4,   0,   0,   0,  21,   0, 
+      0,   1,  16,   0,   0,   7, 
     130,   0,  16,   0,   3,   0, 
       0,   0,  70,   2,  16,   0, 
       4,   0,   0,   0,  70,   2, 
@@ -898,33 +943,65 @@ const BYTE UIPixelShader[] =
      16,   0,   3,   0,   0,   0, 
      58,   0,  16,   0,   3,   0, 
       0,   0,  56,   0,   0,   7, 
-    114,   0,  16,   0,   4,   0, 
+    114,   0,  16,   0,   5,   0, 
       0,   0, 246,  15,  16,   0, 
       3,   0,   0,   0,  70,   2, 
      16,   0,   4,   0,   0,   0, 
      16,   0,   0,   7, 130,   0, 
      16,   0,   3,   0,   0,   0, 
-     70,   2,  16,   0,   4,   0, 
-      0,   0,  70,  18,  16,   0, 
-      3,   0,   0,   0,   0,   0, 
-      0,   7, 130,   0,  16,   0, 
-      3,   0,   0,   0,  58,   0, 
+     70,  18,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16,   0, 
+      5,   0,   0,   0,  43,   0, 
+      0,   5, 130,   0,  16,   0, 
+      4,   0,   0,   0,   1,  64, 
+      0,   0,   0,   0,   0,   0, 
+     49,   0,   0,   7, 130,   0, 
+     16,   0,   4,   0,   0,   0, 
+     58,   0,  16,   0,   4,   0, 
+      0,   0,  58,   0,  16,   0, 
+      3,   0,   0,   0,  31,   0, 
+      4,   3,  58,   0,  16,   0, 
+      4,   0,   0,   0, 167,   0, 
+      0, 139,   2, 227,   0, 128, 
+    131, 153,  25,   0,  18,   0, 
+     16,   0,   5,   0,   0,   0, 
+     58,   0,  16,   0,   1,   0, 
+      0,   0,   1,  64,   0,   0, 
+     12,   0,   0,   0,   6, 112, 
+     16,   0,   2,   0,   0,   0, 
+    167,   0,   0, 139,   2, 227, 
+      0, 128, 131, 153,  25,   0, 
+     34,   0,  16,   0,   5,   0, 
+      0,   0,  58,   0,  16,   0, 
+      1,   0,   0,   0,   1,  64, 
+      0,   0,  16,   0,   0,   0, 
+      6, 112,  16,   0,   2,   0, 
+      0,   0, 167,   0,   0, 139, 
+      2, 227,   0, 128, 131, 153, 
+     25,   0,  66,   0,  16,   0, 
+      5,   0,   0,   0,  58,   0, 
+     16,   0,   1,   0,   0,   0, 
+      1,  64,   0,   0,  20,   0, 
+      0,   0,   6, 112,  16,   0, 
+      2,   0,   0,   0,  56,   0, 
+      0,   7, 114,   0,  16,   0, 
+      5,   0,   0,   0, 246,  15, 
      16,   0,   3,   0,   0,   0, 
-     58,   0,  16,   0,   3,   0, 
-      0,   0,  54,   0,   0,   6, 
-    130,   0,  16,   0,   3,   0, 
-      0,   0,  58,   0,  16, 128, 
-     65,   0,   0,   0,   3,   0, 
+     70,   2,  16,   0,   5,   0, 
       0,   0,  56,   0,   0,   7, 
     114,   0,  16,   0,   5,   0, 
       0,   0, 246,  15,  16,   0, 
-      3,   0,   0,   0,  70,  18, 
-     16,   0,   3,   0,   0,   0, 
+      2,   0,   0,   0,  70,   2, 
+     16,   0,   5,   0,   0,   0, 
       0,   0,   0,   7, 114,   0, 
-     16,   0,   4,   0,   0,   0, 
-     70,   2,  16,   0,   4,   0, 
+     16,   0,   3,   0,   0,   0, 
+     70,   2,  16,   0,   5,   0, 
       0,   0,  70,   2,  16,   0, 
-      5,   0,   0,   0,  16,   0, 
+      3,   0,   0,   0,  54,   0, 
+      0,   6, 114,   0,  16,   0, 
+      4,   0,   0,   0,  70,   2, 
+     16, 128,  65,   0,   0,   0, 
+      4,   0,   0,   0,  16,   0, 
       0,   7, 130,   0,  16,   0, 
       3,   0,   0,   0,  70,   2, 
      16,   0,   4,   0,   0,   0, 
@@ -937,175 +1014,315 @@ const BYTE UIPixelShader[] =
       4,   0,   0,   0, 246,  15, 
      16,   0,   3,   0,   0,   0, 
      70,   2,  16,   0,   4,   0, 
-      0,   0,  54,   0,   0,   6, 
-    114,   0,  16,   0,   5,   0, 
-      0,   0,  70,  18,  16, 128, 
-     65,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   8, 
-    114,   0,  16,   0,   5,   0, 
-      0,   0,  70,   2,  16,   0, 
-      5,   0,   0,   0,  70, 130, 
-     32,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,  16,   0, 
-      0,   7, 130,   0,  16,   0, 
-      3,   0,   0,   0,  70,   2, 
-     16,   0,   5,   0,   0,   0, 
-     70,   2,  16,   0,   5,   0, 
-      0,   0,  68,   0,   0,   5, 
+      0,   0,  16,   0,   0,   7, 
     130,   0,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16,   0, 
+      4,   0,   0,   0,  70,  18, 
+     16,   0,   3,   0,   0,   0, 
+      0,   0,   0,   7, 130,   0, 
+     16,   0,   3,   0,   0,   0, 
+     58,   0,  16,   0,   3,   0, 
       0,   0,  58,   0,  16,   0, 
+      3,   0,   0,   0,  54,   0, 
+      0,   6, 130,   0,  16,   0, 
+      3,   0,   0,   0,  58,   0, 
+     16, 128,  65,   0,   0,   0, 
       3,   0,   0,   0,  56,   0, 
       0,   7, 114,   0,  16,   0, 
       5,   0,   0,   0, 246,  15, 
      16,   0,   3,   0,   0,   0, 
-     70,   2,  16,   0,   5,   0, 
-      0,   0,  16,   0,   0,   7, 
-    130,   0,  16,   0,   3,   0, 
+     70,  18,  16,   0,   3,   0, 
+      0,   0,   0,   0,   0,   7, 
+    114,   0,  16,   0,   4,   0, 
       0,   0,  70,   2,  16,   0, 
       4,   0,   0,   0,  70,   2, 
      16,   0,   5,   0,   0,   0, 
-     43,   0,   0,   5,  18,   0, 
+     16,   0,   0,   7, 130,   0, 
+     16,   0,   3,   0,   0,   0, 
+     70,   2,  16,   0,   4,   0, 
+      0,   0,  70,   2,  16,   0, 
+      4,   0,   0,   0,  68,   0, 
+      0,   5, 130,   0,  16,   0, 
+      3,   0,   0,   0,  58,   0, 
+     16,   0,   3,   0,   0,   0, 
+     56,   0,   0,   7, 114,   0, 
      16,   0,   4,   0,   0,   0, 
-      1,  64,   0,   0,   0,   0, 
-      0,   0,  49,   0,   0,   7, 
-     18,   0,  16,   0,   4,   0, 
-      0,   0,  10,   0,  16,   0, 
-      4,   0,   0,   0,  58,   0, 
+    246,  15,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16,   0, 
+      4,   0,   0,   0,  54,   0, 
+      0,   6, 114,   0,  16,   0, 
+      5,   0,   0,   0,  70,  18, 
+     16, 128,  65,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   8, 114,   0,  16,   0, 
+      5,   0,   0,   0,  70,   2, 
+     16,   0,   5,   0,   0,   0, 
+     70, 130,  32,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+     16,   0,   0,   7, 130,   0, 
      16,   0,   3,   0,   0,   0, 
-     31,   0,   4,   3,  10,   0, 
+     70,   2,  16,   0,   5,   0, 
+      0,   0,  70,   2,  16,   0, 
+      5,   0,   0,   0,  68,   0, 
+      0,   5, 130,   0,  16,   0, 
+      3,   0,   0,   0,  58,   0, 
+     16,   0,   3,   0,   0,   0, 
+     56,   0,   0,   7, 114,   0, 
+     16,   0,   5,   0,   0,   0, 
+    246,  15,  16,   0,   3,   0, 
+      0,   0,  70,   2,  16,   0, 
+      5,   0,   0,   0,  16,   0, 
+      0,   7, 130,   0,  16,   0, 
+      3,   0,   0,   0,  70,   2, 
      16,   0,   4,   0,   0,   0, 
-    167,   0,   0, 139,   2, 227, 
-      0, 128, 131, 153,  25,   0, 
+     70,   2,  16,   0,   5,   0, 
+      0,   0,  43,   0,   0,   5, 
      18,   0,  16,   0,   4,   0, 
-      0,   0,  58,   0,  16,   0, 
-      1,   0,   0,   0,   1,  64, 
-      0,   0,  12,   0,   0,   0, 
-      6, 112,  16,   0,   2,   0, 
+      0,   0,   1,  64,   0,   0, 
+      0,   0,   0,   0,  49,   0, 
+      0,   7,  18,   0,  16,   0, 
+      4,   0,   0,   0,  10,   0, 
+     16,   0,   4,   0,   0,   0, 
+     58,   0,  16,   0,   3,   0, 
+      0,   0,  31,   0,   4,   3, 
+     10,   0,  16,   0,   4,   0, 
       0,   0, 167,   0,   0, 139, 
       2, 227,   0, 128, 131, 153, 
-     25,   0,  34,   0,  16,   0, 
+     25,   0,  18,   0,  16,   0, 
       4,   0,   0,   0,  58,   0, 
      16,   0,   1,   0,   0,   0, 
-      1,  64,   0,   0,  16,   0, 
+      1,  64,   0,   0,  12,   0, 
       0,   0,   6, 112,  16,   0, 
       2,   0,   0,   0, 167,   0, 
       0, 139,   2, 227,   0, 128, 
-    131, 153,  25,   0,  66,   0, 
+    131, 153,  25,   0,  34,   0, 
      16,   0,   4,   0,   0,   0, 
      58,   0,  16,   0,   1,   0, 
       0,   0,   1,  64,   0,   0, 
-     20,   0,   0,   0,   6, 112, 
+     16,   0,   0,   0,   6, 112, 
      16,   0,   2,   0,   0,   0, 
+    167,   0,   0, 139,   2, 227, 
+      0, 128, 131, 153,  25,   0, 
+     66,   0,  16,   0,   4,   0, 
+      0,   0,  58,   0,  16,   0, 
+      1,   0,   0,   0,   1,  64, 
+      0,   0,  20,   0,   0,   0, 
+      6, 112,  16,   0,   2,   0, 
+      0,   0,  56,   0,   0,   7, 
+    114,   0,  16,   0,   4,   0, 
+      0,   0, 246,  15,  16,   0, 
+      3,   0,   0,   0,  70,   2, 
+     16,   0,   4,   0,   0,   0, 
      56,   0,   0,   7, 114,   0, 
      16,   0,   4,   0,   0,   0, 
-    246,  15,  16,   0,   3,   0, 
+    246,  15,  16,   0,   2,   0, 
       0,   0,  70,   2,  16,   0, 
-      4,   0,   0,   0,  56,   0, 
-      0,   7, 114,   0,  16,   0, 
-      4,   0,   0,   0, 246,  15, 
-     16,   0,   2,   0,   0,   0, 
-     70,   2,  16,   0,   4,   0, 
-      0,   0,   0,   0,   0,   7, 
-    226,   0,  16,   0,   0,   0, 
-      0,   0,  86,  14,  16,   0, 
-      0,   0,   0,   0,   6,   9, 
-     16,   0,   4,   0,   0,   0, 
-     21,   0,   0,   1,  21,   0, 
-      0,   1,  30,   0,   0,   7, 
-    130,   0,  16,   0,   1,   0, 
-      0,   0,  58,   0,  16,   0, 
-      1,   0,   0,   0,   1,  64, 
-      0,   0,   1,   0,   0,   0, 
-     22,   0,   0,   1,  69,   0, 
-      0, 139, 194,   0,   0, 128, 
-     67,  85,  21,   0, 242,   0, 
+      4,   0,   0,   0,   0,   0, 
+      0,   7, 226,   0,  16,   0, 
+      0,   0,   0,   0,  86,  14, 
+     16,   0,   0,   0,   0,   0, 
+      6,   9,  16,   0,   4,   0, 
+      0,   0,  21,   0,   0,   1, 
+     21,   0,   0,   1,  30,   0, 
+      0,   7, 130,   0,  16,   0, 
+      1,   0,   0,   0,  58,   0, 
      16,   0,   1,   0,   0,   0, 
-     70,  16,  16,   0,   2,   0, 
-      0,   0,  70, 126,  16,   0, 
-      0,   0,   0,   0,   0,  96, 
+      1,  64,   0,   0,   1,   0, 
+      0,   0,  22,   0,   0,   1, 
+     69,   0,   0, 139, 194,   0, 
+      0, 128,  67,  85,  21,   0, 
+    242,   0,  16,   0,   1,   0, 
+      0,   0,  70,  16,  16,   0, 
+      2,   0,   0,   0,  70, 126, 
      16,   0,   0,   0,   0,   0, 
-     56,   0,   0,   8, 114,   0, 
+      0,  96,  16,   0,   0,   0, 
+      0,   0,  39,   0,   0,  11, 
+     18,   0,  16,   0,   0,   0, 
+      0,   0,   2,  64,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,  10, 128, 
+     32,   0,   3,   0,   0,   0, 
+      0,   0,   0,   0,  31,   0, 
+      4,   3,  10,   0,  16,   0, 
+      0,   0,   0,   0,  54,   0, 
+      0,   5,  18,   0,  16,   0, 
+      0,   0,   0,   0,   1,  64, 
+      0,   0,   0,   0,   0, 191, 
+      0,   0,   0,   7,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+     10,   0,  16,   0,   0,   0, 
+      0,   0,  10,  16,  16,   0, 
+      2,   0,   0,   0,  54,   0, 
+      0,   5,  18,   0,  16,   0, 
+      2,   0,   0,   0,   1,  64, 
+      0,   0,   0,   0,   0, 191, 
+      0,   0,   0,   7,  18,   0, 
      16,   0,   2,   0,   0,   0, 
-     70,   2,  16,   0,   1,   0, 
-      0,   0,   6, 128,  32,   0, 
-      1,   0,   0,   0,   0,   0, 
-      0,   0,  56,   0,   0,   8, 
-    226,   0,  16,   0,   3,   0, 
-      0,   0,   6,   9,  16,   0, 
-      3,   0,   0,   0,  86, 133, 
-     32,   0,   1,   0,   0,   0, 
+     10,   0,  16,   0,   2,   0, 
+      0,   0,  10,  16,  16,   0, 
+      2,   0,   0,   0,  56,   0, 
+      0,   7,  18,   0,  16,   0, 
+      0,   0,   0,   0,  10,   0, 
+     16,   0,   0,   0,   0,   0, 
+     10,   0,  16,   0,   2,   0, 
+      0,   0,  54,   0,   0,   5, 
+     18,   0,  16,   0,   2,   0, 
+      0,   0,   1,  64,   0,   0, 
+      0,   0,   0, 191,   0,   0, 
+      0,   7,  18,   0,  16,   0, 
+      2,   0,   0,   0,  10,   0, 
+     16,   0,   2,   0,   0,   0, 
+     26,  16,  16,   0,   2,   0, 
+      0,   0,  54,   0,   0,   5, 
+     34,   0,  16,   0,   2,   0, 
+      0,   0,   1,  64,   0,   0, 
+      0,   0,   0, 191,   0,   0, 
+      0,   7,  34,   0,  16,   0, 
+      2,   0,   0,   0,  26,   0, 
+     16,   0,   2,   0,   0,   0, 
+     26,  16,  16,   0,   2,   0, 
+      0,   0,  56,   0,   0,   7, 
+     18,   0,  16,   0,   2,   0, 
+      0,   0,  26,   0,  16,   0, 
+      2,   0,   0,   0,  10,   0, 
+     16,   0,   2,   0,   0,   0, 
+      0,   0,   0,   7,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+     10,   0,  16,   0,   0,   0, 
+      0,   0,  10,   0,  16,   0, 
+      2,   0,   0,   0,  75,   0, 
+      0,   5,  18,   0,  16,   0, 
+      0,   0,   0,   0,  10,   0, 
+     16,   0,   0,   0,   0,   0, 
+     14,   0,   0,   7,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+     10,   0,  16,   0,   0,   0, 
+      0,   0,   1,  64,   0,   0, 
+    243,   4,  53,  63,  49,   0, 
+      0,   8,  18,   0,  16,   0, 
+      0,   0,   0,   0,  10,   0, 
+     16,   0,   0,   0,   0,   0, 
+     26, 128,  32,   0,   3,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   7, 114,   0,  16,   0, 
-      2,   0,   0,   0,  70,   2, 
+     31,   0,   4,   3,  10,   0, 
+     16,   0,   0,   0,   0,   0, 
+     69,   0,   0, 139, 194,   0, 
+      0, 128,  67,  85,  21,   0, 
+    242,   0,  16,   0,   2,   0, 
+      0,   0,  70,  16,  16,   0, 
+      2,   0,   0,   0,  70, 126, 
+     16,   0,   3,   0,   0,   0, 
+      0,  96,  16,   0,   0,   0, 
+      0,   0,  56,   0,   0,   7, 
+    242,   0,  16,   0,   4,   0, 
+      0,   0, 246,  15,  16,   0, 
+      2,   0,   0,   0,  70,  14, 
      16,   0,   2,   0,   0,   0, 
-    150,   7,  16,   0,   3,   0, 
-      0,   0,  56,   0,   0,   8, 
-    114,   0,  16,   0,   0,   0, 
-      0,   0, 150,   7,  16,   0, 
-      0,   0,   0,   0, 166, 138, 
-     32,   0,   1,   0,   0,   0, 
+     43,   0,   0,   5,  18,   0, 
+     16,   0,   0,   0,   0,   0, 
+      1,  64,   0,   0,   1,   0, 
+      0,   0,  54,   0,   0,   6, 
+     18,   0,  16,   0,   2,   0, 
+      0,   0,  58,   0,  16, 128, 
+     65,   0,   0,   0,   2,   0, 
+      0,   0,   0,   0,   0,   7, 
+     18,   0,  16,   0,   0,   0, 
+      0,   0,  10,   0,  16,   0, 
+      0,   0,   0,   0,  10,   0, 
+     16,   0,   2,   0,   0,   0, 
+     56,   0,   0,   7, 242,   0, 
+     16,   0,   2,   0,   0,   0, 
+      6,   0,  16,   0,   0,   0, 
+      0,   0,  70,  14,  16,   0, 
+      1,   0,   0,   0,   0,   0, 
+      0,   7, 242,   0,  16,   0, 
+      1,   0,   0,   0,  70,  14, 
+     16,   0,   2,   0,   0,   0, 
+     70,  14,  16,   0,   4,   0, 
+      0,   0,  21,   0,   0,   1, 
+     21,   0,   0,   1,  56,   0, 
+      0,   8, 114,   0,  16,   0, 
+      2,   0,   0,   0,  70,   2, 
+     16,   0,   1,   0,   0,   0, 
+      6, 128,  32,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   7, 114,   0,  16,   0, 
-      0,   0,   0,   0,  70,   2, 
+     56,   0,   0,   8, 226,   0, 
+     16,   0,   3,   0,   0,   0, 
+      6,   9,  16,   0,   3,   0, 
+      0,   0,  86, 133,  32,   0, 
+      1,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   7, 
+    114,   0,  16,   0,   2,   0, 
+      0,   0,  70,   2,  16,   0, 
+      2,   0,   0,   0, 150,   7, 
+     16,   0,   3,   0,   0,   0, 
+     56,   0,   0,   8, 114,   0, 
      16,   0,   0,   0,   0,   0, 
-     70,   2,  16,   0,   2,   0, 
-      0,   0,  52,   0,   0,  10, 
+    150,   7,  16,   0,   0,   0, 
+      0,   0, 166, 138,  32,   0, 
+      1,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   7, 
     114,   0,  16,   0,   0,   0, 
       0,   0,  70,   2,  16,   0, 
-      0,   0,   0,   0,   2,  64, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-     51,   0,   0,  10, 114,   0, 
+      0,   0,   0,   0,  70,   2, 
+     16,   0,   2,   0,   0,   0, 
+     52,   0,   0,  10, 114,   0, 
      16,   0,   0,   0,   0,   0, 
      70,   2,  16,   0,   0,   0, 
       0,   0,   2,  64,   0,   0, 
-      0,   0, 128,  63,   0,   0, 
-    128,  63,   0,   0, 128,  63, 
-      0,   0,   0,   0,  54,   0, 
-      0,   5, 130,   0,  16,   0, 
-      1,   0,   0,   0,  58,   0, 
-     16,   0,   1,   0,   0,   0, 
-     56,   0,   0,   8, 130,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,  51,   0, 
+      0,  10, 114,   0,  16,   0, 
+      0,   0,   0,   0,  70,   2, 
      16,   0,   0,   0,   0,   0, 
-     10,   0,  16,   0,   3,   0, 
-      0,   0,  26, 128,  32,   0, 
-      1,   0,   0,   0,   0,   0, 
-      0,   0,  57,   0,   0,   7, 
-    130,   0,  16,   0,   0,   0, 
+      2,  64,   0,   0,   0,   0, 
+    128,  63,   0,   0, 128,  63, 
+      0,   0, 128,  63,   0,   0, 
+      0,   0,  54,   0,   0,   5, 
+    130,   0,  16,   0,   1,   0, 
       0,   0,  58,   0,  16,   0, 
-      0,   0,   0,   0,  58,   0, 
-     16,   0,   0,   0,   0,   0, 
-     31,   0,   4,   3,  58,   0, 
+      1,   0,   0,   0,  56,   0, 
+      0,   8, 130,   0,  16,   0, 
+      0,   0,   0,   0,  10,   0, 
+     16,   0,   3,   0,   0,   0, 
+     26, 128,  32,   0,   1,   0, 
+      0,   0,   0,   0,   0,   0, 
+     57,   0,   0,   7, 130,   0, 
      16,   0,   0,   0,   0,   0, 
-     54,   0,   0,   5, 114,   0, 
+     58,   0,  16,   0,   0,   0, 
+      0,   0,  58,   0,  16,   0, 
+      0,   0,   0,   0,  31,   0, 
+      4,   3,  58,   0,  16,   0, 
+      0,   0,   0,   0,  54,   0, 
+      0,   5, 114,   0,  16,   0, 
+      0,   0,   0,   0,  70,   2, 
+     16,   0,   1,   0,   0,   0, 
+     21,   0,   0,   1,  54,   0, 
+      0,   5, 114,  32,  16,   0, 
+      0,   0,   0,   0,  70,   2, 
      16,   0,   0,   0,   0,   0, 
-     70,   2,  16,   0,   1,   0, 
-      0,   0,  21,   0,   0,   1, 
-     54,   0,   0,   5, 114,  32, 
+     54,   0,   0,   5, 130,  32, 
      16,   0,   0,   0,   0,   0, 
-     70,   2,  16,   0,   0,   0, 
-      0,   0,  54,   0,   0,   5, 
-    130,  32,  16,   0,   0,   0, 
-      0,   0,  58,   0,  16,   0, 
-      1,   0,   0,   0,  62,   0, 
-      0,   1,  83,  84,  65,  84, 
-    148,   0,   0,   0, 117,   0, 
-      0,   0,   6,   0,   0,   0, 
-      0,   0,   0,   0,   4,   0, 
-      0,   0,  54,   0,   0,   0, 
-      5,   0,   0,   0,   0,   0, 
-      0,   0,   3,   0,   0,   0, 
-      7,   0,   0,   0,   0,   0, 
+     58,   0,  16,   0,   1,   0, 
+      0,   0,  62,   0,   0,   1, 
+     83,  84,  65,  84, 148,   0, 
+      0,   0, 143,   0,   0,   0, 
+      6,   0,   0,   0,   0,   0, 
+      0,   0,   4,   0,   0,   0, 
+     73,   0,   0,   0,   5,   0, 
       0,   0,   0,   0,   0,   0, 
+      3,   0,   0,   0,   9,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      1,   0,   0,   0,  19,   0, 
       0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   2,   0, 
+      0,   0,  19,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,  12,   0,   0,   0, 
-      0,   0,   0,   0,   7,   0, 
       0,   0,   0,   0,   0,   0, 
+     12,   0,   0,   0,   0,   0, 
+      0,   0,   9,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1115,18 +1332,18 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,  83,  80,  68,  66, 
-      0,  94,   0,   0,  77, 105, 
-     99, 114, 111, 115, 111, 102, 
-    116,  32,  67,  47,  67,  43, 
-     43,  32,  77,  83,  70,  32, 
-     55,  46,  48,  48,  13,  10, 
-     26,  68,  83,   0,   0,   0, 
-      0,   2,   0,   0,   2,   0, 
-      0,   0,  47,   0,   0,   0, 
-    228,   0,   0,   0,   0,   0, 
-      0,   0,  46,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+     83,  80,  68,  66,   0, 102, 
+      0,   0,  77, 105,  99, 114, 
+    111, 115, 111, 102, 116,  32, 
+     67,  47,  67,  43,  43,  32, 
+     77,  83,  70,  32,  55,  46, 
+     48,  48,  13,  10,  26,  68, 
+     83,   0,   0,   0,   0,   2, 
+      0,   0,   2,   0,   0,   0, 
+     51,   0,   0,   0, 244,   0, 
+      0,   0,   0,   0,   0,   0, 
+     50,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1202,7 +1419,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    192, 255, 255, 255, 255, 255, 
+      0,   0,   0,   0, 192, 255, 
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
@@ -1287,9 +1504,9 @@ const BYTE UIPixelShader[] =
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
-    255, 255,  56,   0,   0,   0, 
-      0, 128, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
+     56,   0,   0,   0,   0,   0, 
+    248, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
@@ -1372,13 +1589,13 @@ const BYTE UIPixelShader[] =
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
     255, 255, 255, 255, 255, 255, 
-    255, 255, 255, 255,   5,   0, 
-      0,   0,  32,   0,   0,   0, 
-     60,   0,   0,   0,   0,   0, 
-      0,   0, 255, 255, 255, 255, 
-      0,   0,   0,   0,   6,   0, 
-      0,   0,   5,   0,   0,   0, 
+    255, 255, 255, 255, 255, 255, 
+    255, 255,   5,   0,   0,   0, 
+     32,   0,   0,   0,  60,   0, 
       0,   0,   0,   0,   0,   0, 
+    255, 255, 255, 255,   0,   0, 
+      0,   0,   6,   0,   0,   0, 
+      5,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1458,7 +1675,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      3,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   3,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1543,19 +1760,17 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0, 148,  46,  49,   1, 
-    213, 106, 170,  97,   1,   0, 
-      0,   0, 205,  46, 115,  22, 
-    201, 124, 195,  71, 191,  39, 
-    131, 132,  55, 196, 205, 231, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   1,   0,   0,   0, 
-      1,   0,   0,   0,   0,   0, 
+    148,  46,  49,   1,   5, 126, 
+    208,  97,   1,   0,   0,   0, 
+    218,  47, 137, 160, 191, 138, 
+     43,  77, 163, 110, 124, 130, 
+     92, 201, 139,  45,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0, 220,  81, 
-     51,   1,   0,   0,   0,   0, 
+      1,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+      0,   0, 220,  81,  51,   1, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1628,27 +1843,29 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0, 101, 114, 
-     84, 101, 120, 116, 117, 114, 
-    101,  32,  58,  32, 114, 101, 
-    103, 105, 115, 116, 101, 114, 
-     40,  32, 116,  48,  32,  41, 
-     59,  13,  10,  83,  97, 109, 
-    112, 108, 101, 114,  83, 116, 
-     97, 116, 101,  32,  83,  97, 
-    109, 112, 108, 101,  84, 121, 
-    112, 101,  59,  13,  10,  13, 
-     10,  47,  47,  32,  84, 104, 
-    101,  32, 112, 111, 115, 105, 
-    116, 105, 111, 110,  32, 111, 
-    102,  32, 116, 104, 101,  32, 
-    107,  97, 109, 101, 114,  97, 
-     13,  10,  99,  98, 117, 102, 
-    102, 101, 114,  32,  75,  97, 
-    109, 101, 114,  97,  32,  58, 
-     32, 114, 101, 103, 105, 115, 
-    116, 101, 114,  40,  32,  98, 
-     48,  32,  41,  13,  10, 123, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0, 101, 114,  84, 101, 
+    120, 116, 117, 114, 101,  32, 
+     58,  32, 114, 101, 103, 105, 
+    115, 116, 101, 114,  40, 116, 
+     48,  41,  59,  13,  10,  83, 
+     97, 109, 112, 108, 101, 114, 
+     83, 116,  97, 116, 101,  32, 
+     83,  97, 109, 112, 108, 101, 
+     84, 121, 112, 101,  59,  13, 
+     10,  13,  10,  47,  47,  32, 
+     84, 104, 101,  32, 112, 111, 
+    115, 105, 116, 105, 111, 110, 
+     32, 111, 102,  32, 116, 104, 
+    101,  32, 107,  97, 109, 101, 
+    114,  97,  13,  10,  99,  98, 
+    117, 102, 102, 101, 114,  32, 
+     75,  97, 109, 101, 114,  97, 
+     32,  58,  32, 114, 101, 103, 
+    105, 115, 116, 101, 114,  40, 
+     98,  48,  41,  13,  10, 123, 
      13,  10,  32,  32,  32,  32, 
     102, 108, 111,  97, 116,  52, 
      32, 107,  80, 111, 115, 105, 
@@ -1664,37 +1881,40 @@ const BYTE UIPixelShader[] =
     114,  32,  77,  97, 116, 101, 
     114, 105,  97, 108,  32,  58, 
      32, 114, 101, 103, 105, 115, 
-    116, 101, 114,  40,  32,  98, 
-     49,  32,  41,  13,  10, 123, 
+    116, 101, 114,  40,  98,  49, 
+     41,  13,  10, 123,  13,  10, 
+     32,  32,  32,  32, 102, 108, 
+    111,  97, 116,  32,  97, 109, 
+     98, 105, 101, 110, 116,  70, 
+     97,  99, 116, 111, 114,  59, 
      13,  10,  32,  32,  32,  32, 
     102, 108, 111,  97, 116,  32, 
-     97, 109,  98, 105, 101, 110, 
-    116,  70,  97,  99, 116, 111, 
-    114,  59,  13,  10,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  32, 100, 105, 102, 102, 
-    117, 115,  70,  97,  99, 116, 
-    111, 114,  59,  13,  10,  32, 
-     32,  32,  32, 102, 108, 111, 
-     97, 116,  32, 115, 112, 101, 
-     99, 117, 108,  97, 114,  70, 
-     97,  99, 116, 111, 114,  59, 
-     13,  10, 125,  59,  13,  10, 
-     13,  10,  99,  98, 117, 102, 
-    102, 101, 114,  32,  76, 105, 
-    103, 104, 116,  67, 111, 117, 
-    110, 116,  32,  58,  32, 114, 
-    101, 103, 105, 115, 116, 101, 
-    114,  40,  32,  98,  50,  32, 
-     41,  13,  10, 123,  13,  10, 
-     32,  32,  32,  32, 105, 110, 
-    116,  32, 100, 105, 102, 102, 
-    117, 115, 101,  76, 105, 103, 
-    104, 116,  67, 111, 117, 110, 
-    116,  59,  13,  10,  32,  32, 
-     32,  32, 105, 110, 116,  32, 
-    112, 111, 105, 110, 116,  76, 
+    100, 105, 102, 102, 117, 115, 
+     70,  97,  99, 116, 111, 114, 
+     59,  13,  10,  32,  32,  32, 
+     32, 102, 108, 111,  97, 116, 
+     32, 115, 112, 101,  99, 117, 
+    108,  97, 114,  70,  97,  99, 
+    116, 111, 114,  59,  13,  10, 
+    125,  59,  13,  10,  13,  10, 
+     99,  98, 117, 102, 102, 101, 
+    114,  32,  76, 105, 103, 104, 
+    116,  67, 111, 117, 110, 116, 
+     32,  58,  32, 114, 101, 103, 
+    105, 115, 116, 101, 114,  40, 
+     98,  50,  41,  13,  10, 123, 
+     13,  10,  32,  32,  32,  32, 
+    105, 110, 116,  32, 100, 105, 
+    102, 102, 117, 115, 101,  76, 
     105, 103, 104, 116,  67, 111, 
+    117, 110, 116,  59,  13,  10, 
+     32,  32,  32,  32, 105, 110, 
+    116,  32, 112, 111, 105, 110, 
+    116,  76, 105, 103, 104, 116, 
+     67, 111, 117, 110, 116,  59, 
+     13,  10,  32,  32,  32,  32, 
+    105, 110, 116,  32, 101, 102, 
+    102, 101,  99, 116,  67, 111, 
     117, 110, 116,  59,  13,  10, 
     125,  13,  10,  13,  10,  47, 
      47,  32, 108, 105, 103, 104, 
@@ -1711,30 +1931,28 @@ const BYTE UIPixelShader[] =
      51,  32,  99, 111, 108, 111, 
     114,  59,  13,  10, 125,  59, 
      13,  10,  13,  10, 115, 116, 
-    114, 117,  99, 116,  32,  80, 
-    111, 105, 110, 116,  76, 105, 
-    103, 104, 116,  13,  10, 123, 
-    198,  90,   0,   0, 117, 131, 
-      1,   0,  76, 232,   3,   0, 
-    242,  56,   1,   0,  43, 236, 
-      3,   0,  28,  19,   2,   0, 
-     65,  36,   1,   0, 236, 179, 
-      1,   0, 173,  79,   0,   0, 
-    125,  10,   2,   0, 125, 181, 
-      2,   0, 223,   1,   2,   0, 
-    193,  33,   3,   0,  65, 185, 
-      2,   0,   9, 241,   2,   0, 
-    146, 230,   3,   0, 125, 218, 
-      1,   0, 118,  19,   1,   0, 
-    202, 179,   0,   0, 201, 241, 
+    114, 117,  99, 116, 198,  90, 
+      0,   0, 117, 131,   1,   0, 
+     76, 232,   3,   0, 242,  56, 
+      1,   0,  43, 236,   3,   0, 
+     28,  19,   2,   0,  65,  36, 
+      1,   0, 236, 179,   1,   0, 
+    208, 236,   0,   0, 125,  10, 
+      2,   0, 125, 181,   2,   0, 
+    138, 128,   1,   0, 193,  33, 
+      3,   0,  65, 185,   2,   0, 
+      9, 241,   2,   0, 146, 230, 
+      3,   0, 125, 218,   1,   0, 
+    118,  19,   1,   0, 202, 179, 
+      0,   0, 125, 226,   0,   0, 
+    220, 192,   1,   0, 201, 241, 
       2,   0,  12, 238,   0,   0, 
-    115,  74,   1,   0, 117,  14, 
-      0,   0,  80, 185,   1,   0, 
+    218, 152,   2,   0, 162, 254, 
+      2,   0, 228, 199,   3,   0, 
     110,  77,   0,   0, 144, 132, 
-      1,   0, 232,  35,   2,   0, 
-     16, 206,   3,   0, 226, 163, 
-      0,   0,   0,  16,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+      1,   0, 103, 185,   1,   0, 
+     42, 246,   0,   0, 240, 203, 
+      3,   0,   0,  16,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1799,9 +2017,9 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  47,  47,  32,  32,  32, 
+     47,  47,  47,  47,  47,  47, 
+     47,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -1816,10 +2034,9 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  32,  13,  10, 
-     47,  47,  32,  71,  76,  79, 
-     66,  65,  76,  83,  32,  47, 
-     47,  32,  32,  32,  32,  32, 
+     32,  32,  13,  10,  47,  47, 
+     32,  71,  76,  79,  66,  65, 
+     76,  83,  32,  47,  47,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -1834,10 +2051,10 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  13,  10,  47,  47, 
-     47,  47,  47,  47,  47,  47, 
-     47,  47,  47,  47,  47,  32, 
      32,  32,  32,  32,  32,  32, 
+     13,  10,  47,  47,  47,  47, 
+     47,  47,  47,  47,  47,  47, 
+     47,  47,  47,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -1852,29 +2069,29 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     13,  10,  84, 101, 120, 116, 
-    117, 114, 101,  50,  68,  32, 
-    115, 104,  97, 100, 101, 114, 
+     32,  32,  32,  32,  13,  10, 
      84, 101, 120, 116, 117, 114, 
-    101,  32,  58,  32, 114, 101, 
-    103, 105, 115, 116, 101, 114, 
-     40,  32, 116,  48,  32,  41, 
-     59,  13,  10,  83,  97, 109, 
-    112, 108, 101, 114,  83, 116, 
-     97, 116, 101,  32,  83,  97, 
-    109, 112, 108, 101,  84, 121, 
-    112, 101,  59,  13,  10,  13, 
-     10,  47,  47,  32,  84, 104, 
-    101,  32, 112, 111, 115, 105, 
-    116, 105, 111, 110,  32, 111, 
-    102,  32, 116, 104, 101,  32, 
-    107,  97, 109, 101, 114,  97, 
-     13,  10,  99,  98, 117, 102, 
-    102, 101, 114,  32,  75,  97, 
-    109, 101, 114,  97,  32,  58, 
-     32, 114, 101, 103, 105, 115, 
-    116, 101, 114,  40,  32,  98, 
-     48,  32,  41,  13,  10, 123, 
+    101,  50,  68,  32, 115, 104, 
+     97, 100, 101, 114,  84, 101, 
+    120, 116, 117, 114, 101,  32, 
+     58,  32, 114, 101, 103, 105, 
+    115, 116, 101, 114,  40, 116, 
+     48,  41,  59,  13,  10,  83, 
+     97, 109, 112, 108, 101, 114, 
+     83, 116,  97, 116, 101,  32, 
+     83,  97, 109, 112, 108, 101, 
+     84, 121, 112, 101,  59,  13, 
+     10,  13,  10,  47,  47,  32, 
+     84, 104, 101,  32, 112, 111, 
+    115, 105, 116, 105, 111, 110, 
+     32, 111, 102,  32, 116, 104, 
+    101,  32, 107,  97, 109, 101, 
+    114,  97,  13,  10,  99,  98, 
+    117, 102, 102, 101, 114,  32, 
+     75,  97, 109, 101, 114,  97, 
+     32,  58,  32, 114, 101, 103, 
+    105, 115, 116, 101, 114,  40, 
+     98,  48,  41,  13,  10, 123, 
      13,  10,  32,  32,  32,  32, 
     102, 108, 111,  97, 116,  52, 
      32, 107,  80, 111, 115, 105, 
@@ -1890,37 +2107,40 @@ const BYTE UIPixelShader[] =
     114,  32,  77,  97, 116, 101, 
     114, 105,  97, 108,  32,  58, 
      32, 114, 101, 103, 105, 115, 
-    116, 101, 114,  40,  32,  98, 
-     49,  32,  41,  13,  10, 123, 
+    116, 101, 114,  40,  98,  49, 
+     41,  13,  10, 123,  13,  10, 
+     32,  32,  32,  32, 102, 108, 
+    111,  97, 116,  32,  97, 109, 
+     98, 105, 101, 110, 116,  70, 
+     97,  99, 116, 111, 114,  59, 
      13,  10,  32,  32,  32,  32, 
     102, 108, 111,  97, 116,  32, 
-     97, 109,  98, 105, 101, 110, 
-    116,  70,  97,  99, 116, 111, 
-    114,  59,  13,  10,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  32, 100, 105, 102, 102, 
-    117, 115,  70,  97,  99, 116, 
-    111, 114,  59,  13,  10,  32, 
-     32,  32,  32, 102, 108, 111, 
-     97, 116,  32, 115, 112, 101, 
-     99, 117, 108,  97, 114,  70, 
-     97,  99, 116, 111, 114,  59, 
-     13,  10, 125,  59,  13,  10, 
-     13,  10,  99,  98, 117, 102, 
-    102, 101, 114,  32,  76, 105, 
-    103, 104, 116,  67, 111, 117, 
-    110, 116,  32,  58,  32, 114, 
-    101, 103, 105, 115, 116, 101, 
-    114,  40,  32,  98,  50,  32, 
-     41,  13,  10, 123,  13,  10, 
-     32,  32,  32,  32, 105, 110, 
-    116,  32, 100, 105, 102, 102, 
-    117, 115, 101,  76, 105, 103, 
-    104, 116,  67, 111, 117, 110, 
-    116,  59,  13,  10,  32,  32, 
-     32,  32, 105, 110, 116,  32, 
-    112, 111, 105, 110, 116,  76, 
+    100, 105, 102, 102, 117, 115, 
+     70,  97,  99, 116, 111, 114, 
+     59,  13,  10,  32,  32,  32, 
+     32, 102, 108, 111,  97, 116, 
+     32, 115, 112, 101,  99, 117, 
+    108,  97, 114,  70,  97,  99, 
+    116, 111, 114,  59,  13,  10, 
+    125,  59,  13,  10,  13,  10, 
+     99,  98, 117, 102, 102, 101, 
+    114,  32,  76, 105, 103, 104, 
+    116,  67, 111, 117, 110, 116, 
+     32,  58,  32, 114, 101, 103, 
+    105, 115, 116, 101, 114,  40, 
+     98,  50,  41,  13,  10, 123, 
+     13,  10,  32,  32,  32,  32, 
+    105, 110, 116,  32, 100, 105, 
+    102, 102, 117, 115, 101,  76, 
     105, 103, 104, 116,  67, 111, 
+    117, 110, 116,  59,  13,  10, 
+     32,  32,  32,  32, 105, 110, 
+    116,  32, 112, 111, 105, 110, 
+    116,  76, 105, 103, 104, 116, 
+     67, 111, 117, 110, 116,  59, 
+     13,  10,  32,  32,  32,  32, 
+    105, 110, 116,  32, 101, 102, 
+    102, 101,  99, 116,  67, 111, 
     117, 110, 116,  59,  13,  10, 
     125,  13,  10,  13,  10,  47, 
      47,  32, 108, 105, 103, 104, 
@@ -1951,31 +2171,54 @@ const BYTE UIPixelShader[] =
     108, 111,  97, 116,  32, 114, 
      97, 100, 105, 117, 115,  59, 
      13,  10, 125,  59,  13,  10, 
-     13,  10,  83, 116, 114, 117, 
-     99, 116, 117, 114, 101, 100, 
-     66, 117, 102, 102, 101, 114, 
-     60,  32,  68, 105, 102, 102, 
+     13,  10,  99,  98, 117, 102, 
+    102, 101, 114,  32,  84, 101, 
+    120, 116, 117, 114,  69, 102, 
+    102, 101,  99, 116,  32,  58, 
+     32, 114, 101, 103, 105, 115, 
+    116, 101, 114,  40,  98,  51, 
+     41,  13,  10, 123,  13,  10, 
+     32,  32,  32,  32,  98, 111, 
+    111, 108,  32, 101, 102, 102, 
+    101,  99, 116,  69, 110,  97, 
+     98, 108, 101, 100,  59,  13, 
+     10,  32,  32,  32,  32, 102, 
+    108, 111,  97, 116,  32, 101, 
+    102, 102, 101,  99, 116,  80, 
+    101, 114,  99, 101, 110, 116, 
+     97, 103, 101,  59,  13,  10, 
+    125,  59,  13,  10,  13,  10, 
+     83, 116, 114, 117,  99, 116, 
+    117, 114, 101, 100,  66, 117, 
+    102, 102, 101, 114,  60,  32, 
+     68, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+     32,  62,  32, 100, 105, 102, 
     117, 115, 101,  76, 105, 103, 
-    104, 116,  32,  62,  32, 100, 
-    105, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116, 115,  32, 
-     58,  32, 114, 101, 103, 105, 
-    115, 116, 101, 114,  40,  32, 
-    116,  49,  32,  41,  59,  13, 
-     10,  83, 116, 114, 117,  99, 
-    116, 117, 114, 101, 100,  66, 
-    117, 102, 102, 101, 114,  60, 
-     32,  80, 111, 105, 110, 116, 
-     76, 105, 103, 104, 116,  32, 
-     62,  32, 112, 111, 105, 110, 
-    116,  76, 105, 103, 104, 116, 
-    115,  32,  58,  32, 114, 101, 
-    103, 105, 115, 116, 101, 114, 
-     40,  32, 116,  50,  32,  41, 
-     59,  13,  10,  13,  10,  47, 
-     47,  47,  47,  47,  47,  47, 
+    104, 116, 115,  32,  58,  32, 
+    114, 101, 103, 105, 115, 116, 
+    101, 114,  40, 116,  49,  41, 
+     59,  13,  10,  83, 116, 114, 
+    117,  99, 116, 117, 114, 101, 
+    100,  66, 117, 102, 102, 101, 
+    114,  60,  32,  80, 111, 105, 
+    110, 116,  76, 105, 103, 104, 
+    116,  32,  62,  32, 112, 111, 
+    105, 110, 116,  76, 105, 103, 
+    104, 116, 115,  32,  58,  32, 
+    114, 101, 103, 105, 115, 116, 
+    101, 114,  40, 116,  50,  41, 
+     59,  13,  10,  84, 101, 120, 
+    116, 117, 114, 101,  50,  68, 
+     32,  97, 100, 100, 105, 116, 
+    105, 111, 110,  97, 108,  84, 
+    101, 120, 116, 117, 114, 101, 
+     32,  58,  32, 114, 101, 103, 
+    105, 115, 116, 101, 114,  40, 
+    116,  51,  41,  59,  13,  10, 
+     13,  10,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  32,  32,  32,  32,  32, 
+     47,  47,  47,  47,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -1990,9 +2233,10 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  13,  10,  47,  47,  32, 
-     84,  89,  80,  69,  68,  69, 
-     70,  83,  32,  47,  47,  32, 
+     32,  32,  32,  32,  13,  10, 
+     47,  47,  32,  84,  89,  80, 
+     69,  68,  69,  70,  83,  32, 
+     47,  47,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -2007,10 +2251,10 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  32,  32,  13, 
-     10,  47,  47,  47,  47,  47, 
+     32,  32,  13,  10,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  47,  47,  32,  32,  32, 
+     47,  47,  47,  47,  47,  47, 
+     32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -2025,35 +2269,34 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  13,  10, 115, 
-    116, 114, 117,  99, 116,  32, 
-     80, 105, 120, 101, 108,  73, 
-    110, 112, 117, 116,  84, 121, 
-    112, 101,  13,  10, 123,  13, 
+     13,  10, 115, 116, 114, 117, 
+     99, 116,  32,  80, 105, 120, 
+    101, 108,  73, 110, 112, 117, 
+    116,  84, 121, 112, 101,  13, 
+     10, 123,  13,  10,  32,  32, 
+     32,  32, 102, 108, 111,  97, 
+    116,  52,  32, 119, 111, 114, 
+    108, 100,  80, 111, 115,  32, 
+     58,  32,  80,  79,  83,  73, 
+     84,  73,  79,  78,  59,  13, 
      10,  32,  32,  32,  32, 102, 
     108, 111,  97, 116,  52,  32, 
-    119, 111, 114, 108, 100,  80, 
-    111, 115,  32,  58,  32,  80, 
-     79,  83,  73,  84,  73,  79, 
-     78,  59,  13,  10,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  52,  32, 112, 111, 115, 
-    105, 116, 105, 111, 110,  32, 
-     58,  32,  83,  86,  95,  80, 
-     79,  83,  73,  84,  73,  79, 
-     78,  59,  13,  10,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  50,  32, 116, 101, 120, 
-     32,  58,  32,  84,  69,  88, 
-     67,  79,  79,  82,  68,  48, 
-     59,  13,  10,  32,  32,  32, 
-     32, 102, 108, 111,  97, 116, 
-     51,  32, 110, 111, 114, 109, 
-     97, 108,  32,  58,  32,  84, 
-     69,  88,  67,  79,  79,  82, 
-     68,  49,  59,  13,  10, 125, 
-     59,  13,  10,  13,  10,  47, 
-     47,  47,  47,  47,  47,  47, 
+    112, 111, 115, 105, 116, 105, 
+    111, 110,  32,  58,  32,  83, 
+     86,  95,  80,  79,  83,  73, 
+     84,  73,  79,  78,  59,  13, 
+     10,  32,  32,  32,  32, 102, 
+    108, 111,  97, 116,  50,  32, 
+    116, 101, 120,  32,  58,  32, 
+     84,  69,  88,  67,  79,  79, 
+     82,  68,  48,  59,  13,  10, 
+     32,  32,  32,  32, 102, 108, 
+    111,  97, 116,  51,  32, 110, 
+    111, 114, 109,  97, 108,  32, 
+     58,  32,  84,  69,  88,  67, 
+     79,  79,  82,  68,  49,  59, 
+     13,  10, 125,  59,  13,  10, 
+     13,  10,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
@@ -2066,13 +2309,14 @@ const BYTE UIPixelShader[] =
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  32,  32,  32,  32,  32, 
+     47,  47,  47,  47,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  13,  10,  47,  47,  32, 
-     80, 105, 120, 101, 108,  32, 
-     83, 104,  97, 100, 101, 114, 
+     32,  32,  32,  32,  13,  10, 
+     47,  47,  32,  80, 105, 120, 
+    101, 108,  32,  83, 104,  97, 
+    100, 101, 114,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -2087,8 +2331,8 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  32,  32,  13, 
-     10,  47,  47,  47,  47,  47, 
+     32,  32,  13,  10,  47,  47, 
+     47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
@@ -2101,124 +2345,129 @@ const BYTE UIPixelShader[] =
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  47,  47,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  13,  10, 102, 
-    108, 111,  97, 116,  52,  32, 
-     84, 101, 120, 116, 117, 114, 
-    101,  80, 105, 120, 101, 108, 
-     83, 104,  97, 100, 101, 114, 
-     40,  32,  80, 105, 120, 101, 
-    108,  73, 110, 112, 117, 116, 
-     84, 121, 112, 101,  32, 105, 
-    110, 112, 117, 116,  32,  41, 
-     32,  58,  32,  83,  86,  95, 
-     84,  65,  82,  71,  69,  84, 
-     13,  10, 123,  13,  10,  32, 
-     32,  32,  32, 102, 108, 111, 
-     97, 116,  51,  32, 100, 105, 
-    102, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116,  32,  61, 
-     32, 102, 108, 111,  97, 116, 
-     51,  40,  32,  48,  44,  32, 
-     48,  44,  32,  48,  32,  41, 
-     59,  13,  10,  32,  32,  32, 
-     32, 102, 108, 111,  97, 116, 
-     51,  32, 115, 112, 101,  99, 
-    117, 108,  97, 114,  76, 105, 
-    103, 104, 116,  32,  61,  32, 
-    102, 108, 111,  97, 116,  51, 
-     40,  32,  48,  44,  32,  48, 
-     44,  32,  48,  32,  41,  59, 
-     13,  10,  32,  32,  32,  32, 
-    102, 111, 114,  40,  32, 105, 
-    110, 116,  32, 106,  32,  61, 
-     32,  48,  59,  32, 106,  32, 
-     60,  32, 100, 105, 102, 102, 
-    117, 115, 101,  76, 105, 103, 
-    104, 116,  67, 111, 117, 110, 
-    116,  59,  32, 106,  43,  43, 
-     32,  41,  13,  10,  32,  32, 
-     32,  32, 123,  13,  10,  32, 
      32,  32,  32,  32,  32,  32, 
-     32, 105, 102,  40,  32, 100, 
-    111, 116,  40,  32, 105, 110, 
-    112, 117, 116,  46, 110, 111, 
-    114, 109,  97, 108,  44,  32, 
-     45, 100, 105, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-    115,  91,  32, 106,  32,  93, 
-     46, 100, 105, 114, 101,  99, 
-    116, 105, 111, 110,  32,  41, 
-     32,  60,  32,  48,  32,  41, 
+     13,  10, 102, 108, 111,  97, 
+    116,  52,  32,  84, 101, 120, 
+    116, 117, 114, 101,  80, 105, 
+    120, 101, 108,  83, 104,  97, 
+    100, 101, 114,  40,  32,  80, 
+    105, 120, 101, 108,  73, 110, 
+    112, 117, 116,  84, 121, 112, 
+    101,  32, 105, 110, 112, 117, 
+    116,  32,  41,  32,  58,  32, 
+     83,  86,  95,  84,  65,  82, 
+     71,  69,  84,  13,  10, 123, 
      13,  10,  32,  32,  32,  32, 
+    102, 108, 111,  97, 116,  51, 
+     32, 100, 105, 102, 102, 117, 
+    115, 101,  76, 105, 103, 104, 
+    116,  32,  61,  32, 102, 108, 
+    111,  97, 116,  51,  40,  48, 
+     44,  32,  48,  44,  32,  48, 
+     41,  59,  13,  10,  32,  32, 
+     32,  32, 102, 108, 111,  97, 
+    116,  51,  32, 115, 112, 101, 
+     99, 117, 108,  97, 114,  76, 
+    105, 103, 104, 116,  32,  61, 
+     32, 102, 108, 111,  97, 116, 
+     51,  40,  48,  44,  32,  48, 
+     44,  32,  48,  41,  59,  13, 
+     10,  32,  32,  32,  32, 102, 
+    111, 114,  40,  32, 105, 110, 
+    116,  32, 106,  32,  61,  32, 
+     48,  59,  32, 106,  32,  60, 
+     32, 100, 105, 102, 102, 117, 
+    115, 101,  76, 105, 103, 104, 
+    116,  67, 111, 117, 110, 116, 
+     59,  32, 106,  43,  43,  32, 
+     41,  13,  10,  32,  32,  32, 
+     32, 123,  13,  10,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  99, 111, 110, 116, 
-    105, 110, 117, 101,  59,  13, 
+    105, 102,  40,  32, 100, 111, 
+    116,  40,  32, 105, 110, 112, 
+    117, 116,  46, 110, 111, 114, 
+    109,  97, 108,  44,  32,  45, 
+    100, 105, 102, 117, 115, 101, 
+     76, 105, 103, 104, 116, 115, 
+     91,  32, 106,  32,  93,  46, 
+    100, 105, 114, 101,  99, 116, 
+    105, 111, 110,  32,  41,  32, 
+     60,  32,  48,  32,  41,  13, 
      10,  32,  32,  32,  32,  32, 
-     32,  32,  32, 100, 105, 102, 
+     32,  32,  32,  32,  32,  32, 
+     32,  99, 111, 110, 116, 105, 
+    110, 117, 101,  59,  13,  10, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32, 100, 105, 102, 102, 
+    117, 115, 101,  76, 105, 103, 
+    104, 116,  32,  43,  61,  32, 
+    100, 105, 102, 117, 115, 101, 
+     76, 105, 103, 104, 116, 115, 
+     91,  32, 106,  32,  93,  46, 
+     99, 111, 108, 111, 114,  32, 
+     42,  32, 100, 111, 116,  40, 
+     32, 105, 110, 112, 117, 116, 
+     46, 110, 111, 114, 109,  97, 
+    108,  44,  32,  45, 100, 105, 
     102, 117, 115, 101,  76, 105, 
-    103, 104, 116,  32,  43,  61, 
-     32, 100, 105, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-    115,  91,  32, 106,  32,  93, 
-     46,  99, 111, 108, 111, 114, 
-     32,  42,  32, 100, 111, 116, 
-     40,  32, 105, 110, 112, 117, 
-    116,  46, 110, 111, 114, 109, 
-     97, 108,  44,  32,  45, 100, 
-    105, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116, 115,  91, 
-     32, 106,  32,  93,  46, 100, 
-    105, 114, 101,  99, 116, 105, 
-    111, 110,  32,  41,  59,  13, 
-     10,  32,  32,  32,  32, 125, 
-     13,  10,  32,  32,  32,  32, 
-    102, 111, 114,  40,  32, 105, 
-    110, 116,  32, 105,  32,  61, 
-     32,  48,  59,  32, 105,  32, 
-     60,  32, 112, 111, 105, 110, 
-    116,  76, 105, 103, 104, 116, 
-     67, 111, 117, 110, 116,  59, 
-     32, 105,  43,  43,  32,  41, 
-     13,  10,  32,  32,  32,  32, 
-    123,  13,  10,  32,  32,  32, 
-     32,  32,  32,  32,  32, 102, 
-    108, 111,  97, 116,  51,  32, 
-    108, 105, 103, 104, 116,  68, 
-    105, 114,  32,  61,  32, 112, 
-    111, 105, 110, 116,  76, 105, 
     103, 104, 116, 115,  91,  32, 
-    105,  32,  93,  46, 112, 111, 
-    115, 105, 116, 105, 111, 110, 
-     32,  45,  32, 105, 110, 112, 
-    117, 116,  46, 119, 111, 114, 
-    108, 100,  80, 111, 115,  46, 
-    120, 121, 122,  59,  13,  10, 
-     32,  32,  32,  32,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  32, 102,  97,  99, 116, 
-    111, 114,  59,  13,  10,   9, 
-      9, 105, 102,  32,  40, 108, 
-    101, 110, 103, 116, 104,  40, 
-    108, 105, 103, 104, 116,  68, 
-    105, 114,  41,  32,  60,  32, 
-     49,  41,  13,  10,   9,   9, 
-      9, 102,  97,  99, 116, 111, 
-    114,  32,  61,  32,  49,  59, 
-     13,  10,   9,   9, 101, 108, 
-    115, 101,  13,  10,   9,   9, 
-      9, 102,  97,  99, 116, 111, 
+    106,  32,  93,  46, 100, 105, 
+    114, 101,  99, 116, 105, 111, 
+    110,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32, 125,  13, 
+     10,  32,  32,  32,  32, 102, 
+    111, 114,  40,  32, 105, 110, 
+    116,  32, 105,  32,  61,  32, 
+     48,  59,  32, 105,  32,  60, 
+     32, 112, 111, 105, 110, 116, 
+     76, 105, 103, 104, 116,  67, 
+    111, 117, 110, 116,  59,  32, 
+    105,  43,  43,  32,  41,  13, 
+     10,  32,  32,  32,  32, 123, 
+     13,  10,  32,  32,  32,  32, 
+     32,  32,  32,  32, 102, 108, 
+    111,  97, 116,  51,  32, 108, 
+    105, 103, 104, 116,  68, 105, 
     114,  32,  61,  32, 112, 111, 
     105, 110, 116,  76, 105, 103, 
-    104, 116, 115,  91, 105,  93, 
-     46, 114,  97, 100, 105, 117, 
-    115,  32,  47,  32, 108, 101, 
-    110, 103, 116, 104,  40, 108, 
-    105, 103, 104, 116,  68, 105, 
-    114,  41,  59,  13,  10,  32, 
+    104, 116, 115,  91,  32, 105, 
+     32,  93,  46, 112, 111, 115, 
+    105, 116, 105, 111, 110,  32, 
+     45,  32, 105, 110, 112, 117, 
+    116,  46, 119, 111, 114, 108, 
+    100,  80, 111, 115,  46, 120, 
+    121, 122,  59,  13,  10,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32, 102, 108, 111,  97, 116, 
+     32, 102,  97,  99, 116, 111, 
+    114,  59,  13,  10,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+    105, 102,  40,  32, 108, 101, 
+    110, 103, 116, 104,  40,  32, 
+    108, 105, 103, 104, 116,  68, 
+    105, 114,  32,  41,  32,  60, 
+     32,  49,  32,  41,  13,  10, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+    102,  97,  99, 116, 111, 114, 
+     32,  61,  32,  49,  59,  13, 
+     10,  32,  32,  32,  32,  32, 
+     32,  32,  32, 101, 108, 115, 
+    101,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32,  32, 102,  97,  99, 
+    116, 111, 114,  32,  61,  32, 
+    112, 111, 105, 110, 116,  76, 
+    105, 103, 104, 116, 115,  91, 
+     32, 105,  32,  93,  46, 114, 
+     97, 100, 105, 117, 115,  32, 
+     47,  32, 108, 101, 110, 103, 
+    116, 104,  40,  32, 108, 105, 
+    103, 104, 116,  68, 105, 114, 
+     32,  41,  59,  13,  10,  32, 
      32,  32,  32,  32,  32,  32, 
      32, 102, 108, 111,  97, 116, 
      32, 102,  32,  61,  32, 100, 
@@ -2287,16 +2536,17 @@ const BYTE UIPixelShader[] =
      10,  32,  32,  32,  32,  32, 
      32,  32,  32, 125,  13,  10, 
      32,  32,  32,  32, 125,  13, 
-     10,   9,  47,  47, 105, 102, 
-     32,  40,  33,  40, 100, 105, 
-    102, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116,  46, 120, 
-     32,  62,  61,  32,  48,  32, 
-     38,  38,  32, 100, 105, 102, 
-    102, 117, 115, 101,  76, 105, 
-    103, 104, 116,  46, 120,  32, 
-     60,  61,  32,  49,  41,  41, 
-     13,  10,   9,  47,  47,   9, 
+     10,  32,  32,  32,  32,  47, 
+     47, 105, 102,  32,  40,  33, 
+     40, 100, 105, 102, 102, 117, 
+    115, 101,  76, 105, 103, 104, 
+    116,  46, 120,  32,  62,  61, 
+     32,  48,  32,  38,  38,  32, 
+    100, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+     46, 120,  32,  60,  61,  32, 
+     49,  41,  41,  13,  10,  32, 
+     32,  32,  32,  47,  47,   9, 
     100, 105, 102, 102, 117, 115, 
     101,  76, 105, 103, 104, 116, 
      46, 120,  32,  61,  32,  48, 
@@ -2313,33 +2563,102 @@ const BYTE UIPixelShader[] =
     112, 101,  44,  32, 105, 110, 
     112, 117, 116,  46, 116, 101, 
     120,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32, 105, 102, 
+     40,  32, 101, 102, 102, 101, 
+     99, 116,  69, 110,  97,  98, 
+    108, 101, 100,  32,  41,  13, 
+     10,  32,  32,  32,  32, 123, 
+     13,  10,  32,  32,  32,  32, 
      32,  32,  32,  32, 102, 108, 
-    111,  97, 116,  52,  32, 116, 
-    101, 120, 116, 117, 114, 101, 
-     67, 111, 108, 111, 114,  32, 
-     61,  32, 115,  97, 116, 117, 
-    114,  97, 116, 101,  40,  32, 
-     40, 109,  97, 116, 101, 114, 
+    111,  97, 116,  32, 100, 105, 
+    115, 116,  32,  61,  32, 115, 
+    113, 114, 116,  40,  32,  40, 
+    105, 110, 112, 117, 116,  46, 
+    116, 101, 120,  46, 120,  32, 
+     45,  32,  48,  46,  53, 102, 
+     41,  32,  42,  32,  40, 105, 
+    110, 112, 117, 116,  46, 116, 
+    101, 120,  46, 120,  32,  45, 
+     32,  48,  46,  53, 102,  41, 
+     32,  43,  32,  40, 105, 110, 
+    112, 117, 116,  46, 116, 101, 
+    120,  46, 121,  32,  45,  32, 
+     48,  46,  53, 102,  41,  32, 
+     42,  32,  40, 105, 110, 112, 
+    117, 116,  46, 116, 101, 120, 
+     46, 121,  32,  45,  32,  48, 
+     46,  53, 102,  41,  32,  41, 
+     32,  47,  32, 115, 113, 114, 
+    116,  40,  32,  48,  46,  53, 
+    102,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32, 105, 102,  40,  32, 
+    100, 105, 115, 116,  32,  60, 
+     32, 101, 102, 102, 101,  99, 
+    116,  80, 101, 114,  99, 101, 
+    110, 116,  97, 103, 101,  32, 
+     41,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32, 123, 
+     13,  10,  32,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32, 102, 108, 111,  97, 
+    116,  52,  32, 101, 102, 102, 
+    101,  99, 116,  67, 111, 108, 
+    111, 114,  32,  61,  32,  97, 
+    100, 100, 105, 116, 105, 111, 
+    110,  97, 108,  84, 101, 120, 
+    116, 117, 114, 101,  46,  83, 
+     97, 109, 112, 108, 101,  40, 
+     32,  83,  97, 109, 112, 108, 
+    101,  84, 121, 112, 101,  44, 
+     32, 105, 110, 112, 117, 116, 
+     46, 116, 101, 120,  32,  41, 
+     59,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32,  32, 109,  97, 116, 
+    101, 114, 105,  97, 108,  67, 
+    111, 108, 111, 114,  32,  61, 
+     32, 101, 102, 102, 101,  99, 
+    116,  67, 111, 108, 111, 114, 
+     32,  42,  32, 101, 102, 102, 
+    101,  99, 116,  67, 111, 108, 
+    111, 114,  46,  97,  32,  43, 
+     32, 109,  97, 116, 101, 114, 
     105,  97, 108,  67, 111, 108, 
-    111, 114,  32,  42,  32,  97, 
-    109,  98, 105, 101, 110, 116, 
-     70,  97,  99, 116, 111, 114, 
-     41,  32,  43,  32,  40, 102, 
-    108, 111,  97, 116,  52,  40, 
+    111, 114,  32,  42,  32,  40, 
+     49,  32,  45,  32, 101, 102, 
+    102, 101,  99, 116,  67, 111, 
+    108, 111, 114,  46,  97,  41, 
+     59,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32, 125, 
+     13,  10,  32,  32,  32,  32, 
+    125,  13,  10,  32,  32,  32, 
+     32, 102, 108, 111,  97, 116, 
+     52,  32, 116, 101, 120, 116, 
+    117, 114, 101,  67, 111, 108, 
+    111, 114,  32,  61,  32, 115, 
+     97, 116, 117, 114,  97, 116, 
+    101,  40,  32,  40, 109,  97, 
+    116, 101, 114, 105,  97, 108, 
+     67, 111, 108, 111, 114,  32, 
+     42,  32,  97, 109,  98, 105, 
+    101, 110, 116,  70,  97,  99, 
+    116, 111, 114,  41,  32,  43, 
+     32,  40, 102, 108, 111,  97, 
+    116,  52,  40, 100, 105, 102, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116,  46, 120,  44, 
      32, 100, 105, 102, 102, 117, 
     115, 101,  76, 105, 103, 104, 
-    116,  46, 120,  44,  32, 100, 
+    116,  46, 121,  44,  32, 100, 
     105, 102, 102, 117, 115, 101, 
      76, 105, 103, 104, 116,  46, 
-    121,  44,  32, 100, 105, 102, 
-    102, 117, 115, 101,  76, 105, 
-    103, 104, 116,  46, 122,  44, 
-     32,  48,  32,  41,  32,  42, 
-     32, 100, 105, 102, 102, 117, 
-    115,  70,  97,  99, 116, 111, 
-    114,  41,  32,  43,  32,  40, 
-    102, 108, 111,  97, 116,  52, 
-     40,  32, 115, 112, 101,  99, 
+    122,  44,  32,  48,  41,  32, 
+     42,  32, 100, 105, 102, 102, 
+    117, 115,  70,  97,  99, 116, 
+    111, 114,  41,  32,  43,  32, 
+     40, 102, 108, 111,  97, 116, 
+     52,  40, 115, 112, 101,  99, 
     117, 108,  97, 114,  76, 105, 
     103, 104, 116,  46, 120,  44, 
      32, 115, 112, 101,  99, 117, 
@@ -2348,48 +2667,52 @@ const BYTE UIPixelShader[] =
     115, 112, 101,  99, 117, 108, 
      97, 114,  76, 105, 103, 104, 
     116,  46, 122,  44,  32,  48, 
-     32,  41,  32,  42,  32, 115, 
-    112, 101,  99, 117, 108,  97, 
-    114,  70,  97,  99, 116, 111, 
-    114,  41,  32,  41,  59,  13, 
-     10,  32,  32,  32,  32, 116, 
-    101, 120, 116, 117, 114, 101, 
-     67, 111, 108, 111, 114,  46, 
-     97,  32,  61,  32, 109,  97, 
-    116, 101, 114, 105,  97, 108, 
-     67, 111, 108, 111, 114,  46, 
-     97,  59,  13,  10,   9, 105, 
-    102,  40, 105, 115, 110,  97, 
-    110,  40, 100, 105, 102, 102, 
-    117, 115, 101,  76, 105, 103, 
-    104, 116,  46, 120,  32,  42, 
-     32, 100, 105, 102, 102, 117, 
-    115,  70,  97,  99, 116, 111, 
-    114,  41,  41,  13,  10,   9, 
-      9, 116, 101, 120, 116, 117, 
+     41,  32,  42,  32, 115, 112, 
+    101,  99, 117, 108,  97, 114, 
+     70,  97,  99, 116, 111, 114, 
+     41,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32, 116, 101, 
+    120, 116, 117, 114, 101,  67, 
+    111, 108, 111, 114,  46,  97, 
+     32,  61,  32, 109,  97, 116, 
+    101, 114, 105,  97, 108,  67, 
+    111, 108, 111, 114,  46,  97, 
+     59,  13,  10,  32,  32,  32, 
+     32, 105, 102,  40,  32, 105, 
+    115, 110,  97, 110,  40,  32, 
+    100, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+     46, 120,  32,  42,  32, 100, 
+    105, 102, 102, 117, 115,  70, 
+     97,  99, 116, 111, 114,  32, 
+     41,  32,  41,  13,  10,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32, 116, 101, 120, 116, 117, 
     114, 101,  67, 111, 108, 111, 
     114,  32,  61,  32, 109,  97, 
     116, 101, 114, 105,  97, 108, 
      67, 111, 108, 111, 114,  59, 
-     13,  10,   9, 114, 101, 116, 
-    117, 114, 110,  32, 116, 101, 
-    120, 116, 117, 114, 101,  67, 
-    111, 108, 111, 114,  59,  13, 
-     10,  32,  32,  32,  32,  47, 
-     47, 114, 101, 116, 117, 114, 
-    110,  32, 116, 101, 120, 116, 
-    117, 114, 101,  67, 111, 108, 
-    111, 114,  59,  13,  10,   9, 
+     13,  10,  32,  32,  32,  32, 
+    114, 101, 116, 117, 114, 110, 
+     32, 116, 101, 120, 116, 117, 
+    114, 101,  67, 111, 108, 111, 
+    114,  59,  13,  10,  32,  32, 
+     32,  32,  47,  47, 114, 101, 
+    116, 117, 114, 110,  32, 116, 
+    101, 120, 116, 117, 114, 101, 
+     67, 111, 108, 111, 114,  59, 
+     13,  10,  32,  32,  32,  32, 
      47,  47, 105, 102,  32,  40, 
     100, 105, 102, 102, 117, 115, 
      70,  97,  99, 116, 111, 114, 
      32,  61,  61,  32,  48,  41, 
-     13,  10,   9,  47,  47,   9, 
-    114, 101, 116, 117, 114, 110, 
-     32, 102, 108, 111,  97, 116, 
-     52,  40,  49,  44,  32,  49, 
-     44,  32,  48,  44,  32,  49, 
-     41,  59,  13,  10,   9,  47, 
+     13,  10,  32,  32,  32,  32, 
+     47,  47,   9, 114, 101, 116, 
+    117, 114, 110,  32, 102, 108, 
+    111,  97, 116,  52,  40,  49, 
+     44,  32,  49,  44,  32,  48, 
+     44,  32,  49,  41,  59,  13, 
+     10,  32,  32,  32,  32,  47, 
      42, 105, 102,  32,  40, 105, 
     115, 110,  97, 110,  40, 100, 
     105, 102, 102, 117, 115, 101, 
@@ -2407,31 +2730,34 @@ const BYTE UIPixelShader[] =
      45, 100, 105, 102, 102, 117, 
     115, 101,  76, 105, 103, 104, 
     116,  46, 120,  41,  41,  13, 
-     10,   9,   9, 114, 101, 116, 
+     10,  32,  32,  32,  32,  32, 
+     32,  32,  32, 114, 101, 116, 
+    117, 114, 110,  32, 102, 108, 
+    111,  97, 116,  52,  40,  48, 
+     44,  32,  49,  44,  32,  49, 
+     44,  32,  49,  41,  59,  13, 
+     10,  32,  32,  32,  32, 105, 
+    102,  32,  40, 105, 115, 110, 
+     97, 110,  40, 100, 105, 102, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116,  46, 120,  32, 
+     45,  32, 100, 105, 102, 102, 
+    117, 115, 101,  76, 105, 103, 
+    104, 116,  46, 120,  41,  32, 
+     38,  38,  32, 105, 115, 110, 
+     97, 110,  40, 100, 105, 102, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116,  46, 120,  32, 
+     42,  32, 100, 105, 102, 102, 
+    117, 115,  70,  97,  99, 116, 
+    111, 114,  41,  32,  41,  13, 
+     10,  32,  32,  32,  32,  32, 
+     32,  32,  32, 114, 101, 116, 
     117, 114, 110,  32, 102, 108, 
-    111,  97, 116,  52,  40,  48, 
+    111,  97, 116,  52,  40,  49, 
      44,  32,  49,  44,  32,  49, 
      44,  32,  49,  41,  59,  13, 
-     10,   9, 105, 102,  32,  40, 
-    105, 115, 110,  97, 110,  40, 
-    100, 105, 102, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-     46, 120,  32,  45,  32, 100, 
-    105, 102, 102, 117, 115, 101, 
-     76, 105, 103, 104, 116,  46, 
-    120,  41,  32,  38,  38,  32, 
-    105, 115, 110,  97, 110,  40, 
-    100, 105, 102, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-     46, 120,  32,  42,  32, 100, 
-    105, 102, 102, 117, 115,  70, 
-     97,  99, 116, 111, 114,  41, 
-     32,  41,  13,  10,   9,   9, 
-    114, 101, 116, 117, 114, 110, 
-     32, 102, 108, 111,  97, 116, 
-     52,  40,  49,  44,  32,  49, 
-     44,  32,  49,  44,  32,  49, 
-     41,  59,  13,  10,   9, 105, 
+     10,  32,  32,  32,  32, 105, 
     102,  32,  40,  40, 100, 105, 
     102, 102, 117, 115, 101,  76, 
     105, 103, 104, 116,  46, 120, 
@@ -2445,45 +2771,22 @@ const BYTE UIPixelShader[] =
      32, 100, 105, 102, 102, 117, 
     115,  70,  97,  99, 116, 111, 
     114,  41,  32,  33,  61,  32, 
-     45,  48,  41,  13,  10,   9, 
-      9, 114, 101, 116, 117, 114, 
+     45,  48,  41,  13,  10,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32, 114, 101, 116, 117, 114, 
     110,  32, 102, 108, 111,  97, 
     116,  52,  40,  48,  44,  32, 
      48,  44,  32,  49,  44,  32, 
-     49,  41,  59,  13,  10,   9, 
-    114, 101, 116, 117, 114, 110, 
-     32, 102, 108, 111,  97, 116, 
-     52,  40,  48,  44,  32,  49, 
-     44,  32,  48,  44,  32,  49, 
-     41,  59,  42,  47,  13,  10, 
-    125,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+     49,  41,  59,  13,  10,  32, 
+     32,  32,  32, 114, 101, 116, 
+    117, 114, 110,  32, 102, 108, 
+    111,  97, 116,  52,  40,  48, 
+     44,  32,  49,  44,  32,  48, 
+     44,  32,  49,  41,  59,  42, 
+     47,  13,  10, 125,   0,   0, 
       0,   0,   0,   0,   0,   0, 
     254, 239, 254, 239,   1,   0, 
-      0,   0,  14,  16,   0,   0, 
+      0,   0, 161,  18,   0,   0, 
       0,  67,  58,  92,  85, 115, 
     101, 114, 115,  92, 107, 111, 
     108, 106,  97,  92,  68, 101, 
@@ -2568,8 +2871,8 @@ const BYTE UIPixelShader[] =
      84, 101, 120, 116, 117, 114, 
     101,  50,  68,  32, 115, 104, 
      97, 100,  27, 226,  48,   1, 
-    128,   0,   0,   0,  51,  12, 
-    251, 243, 120, 232, 215,   1, 
+    128,   0,   0,   0, 251,  58, 
+    160, 186,  42, 255, 215,   1, 
       1,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2583,8 +2886,8 @@ const BYTE UIPixelShader[] =
       2,   0,   0,   0,   0,   0, 
       0,   0,  85,   0,   0,   0, 
      40,   0,   0,   0,  27, 226, 
-     48,   1, 185,  53,   6,  95, 
-    101,  15,   0,   0,   1,   0, 
+     48,   1,  46,  81,  28, 120, 
+    248,  17,   0,   0,   1,   0, 
       0,   0,  84,   0,   0,   0, 
      85,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2655,9 +2958,9 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   4,   0, 
       0,   0,  66,   0,  60,  17, 
      16,   1,   0,   0,   0,   1, 
-     10,   0,   1,   0,  15,   0, 
-    171,  63,  10,   0,   1,   0, 
-     15,   0, 171,  63,  77, 105, 
+     10,   0,   1,   0, 173,   2, 
+     97,  74,  10,   0,   1,   0, 
+    173,   2,  97,  74,  77, 105, 
      99, 114, 111, 115, 111, 102, 
     116,  32,  40,  82,  41,  32, 
      72,  76,  83,  76,  32,  83, 
@@ -2677,11 +2980,11 @@ const BYTE UIPixelShader[] =
     120, 101, 108,  83, 104,  97, 
     100, 101, 114,   0,   0,   0, 
      58,   0,  16,  17,   0,   0, 
-      0,   0, 160,   7,   0,   0, 
-      0,   0,   0,   0, 232,  11, 
+      0,   0, 120,   8,   0,   0, 
+      0,   0,   0,   0,  96,  14, 
       0,   0,   0,   0,   0,   0, 
-    232,  11,   0,   0,   7,  16, 
-      0,   0, 176,   0,   0,   0, 
+     96,  14,   0,   0,   7,  16, 
+      0,   0, 208,   0,   0,   0, 
       1,   0, 160,  84, 101, 120, 
     116, 117, 114, 101,  80, 105, 
     120, 101, 108,  83, 104,  97, 
@@ -2696,56 +2999,56 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,   0,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,   0,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,   0,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,   4,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,   4,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,   4,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,   8,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,   8,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,   8,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  12,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  12,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  12,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  16,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  16,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  16,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  20,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  20,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  20,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  24,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  24,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  24,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  28,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  28,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  28,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  32,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  32,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  32,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  36,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  36,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  36,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  40,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  48,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  48,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  44,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  52,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  52,   0,   0,   0, 
      22,   0,  80,  17,   1,   0, 
       5,   0,  48,   0,   4,   0, 
-    176,   0,   0,   0,   1,   0, 
-    232,  11,  56,   0,   0,   0, 
+    208,   0,   0,   0,   1,   0, 
+     96,  14,  56,   0,   0,   0, 
      74,   0,  62,  17,   6,  16, 
       0,   0, 136,   0,  60,  84, 
     101, 120, 116, 117, 114, 101, 
@@ -2760,20 +3063,20 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  22,   0, 
      80,  17,   2,   0,   5,   0, 
-      0,   0,   4,   0, 176,   0, 
-      0,   0,   1,   0, 232,  11, 
+      0,   0,   4,   0, 208,   0, 
+      0,   0,   1,   0,  96,  14, 
       0,   0,   0,   0,  22,   0, 
      80,  17,   2,   0,   5,   0, 
-      4,   0,   4,   0, 176,   0, 
-      0,   0,   1,   0, 232,  11, 
+      4,   0,   4,   0, 208,   0, 
+      0,   0,   1,   0,  96,  14, 
       4,   0,   0,   0,  22,   0, 
      80,  17,   2,   0,   5,   0, 
-      8,   0,   4,   0, 176,   0, 
-      0,   0,   1,   0, 232,  11, 
+      8,   0,   4,   0, 208,   0, 
+      0,   0,   1,   0,  96,  14, 
       8,   0,   0,   0,  22,   0, 
      80,  17,   2,   0,   5,   0, 
-     12,   0,   4,   0, 176,   0, 
-      0,   0,   1,   0, 232,  11, 
+     12,   0,   4,   0, 208,   0, 
+      0,   0,   1,   0,  96,  14, 
      12,   0,   0,   0,  50,   0, 
      62,  17,   2,  16,   0,   0, 
       8,   0, 100, 105, 102, 102, 
@@ -2785,40 +3088,40 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   0,   0, 
-      4,   0, 208,   0,   0,   0, 
+      4,   0, 240,   0,   0,   0, 
       1,   0,  72,   0,   0,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   4,   0, 
-      4,   0, 208,   0,   0,   0, 
+      4,   0, 240,   0,   0,   0, 
       1,   0,  72,   0,   4,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   8,   0, 
-      4,   0, 208,   0,   0,   0, 
+      4,   0, 240,   0,   0,   0, 
       1,   0,  72,   0,   8,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   0,   0, 
-      4,   0,  24,   1,   0,   0, 
+      4,   0,  56,   1,   0,   0, 
       1,   0,  64,   3,  32,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   4,   0, 
-      4,   0,  24,   1,   0,   0, 
+      4,   0,  56,   1,   0,   0, 
       1,   0,  44,   3,  36,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   8,   0, 
-      4,   0,  24,   1,   0,   0, 
+      4,   0,  56,   1,   0,   0, 
       1,   0,  44,   3,  40,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   4,   0, 
-      4,   0,  68,   4,   0,   0, 
-      1,   0,  12,   7,  52,   0, 
+      4,   0, 100,   4,   0,   0, 
+      1,   0, 132,   9,  52,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   8,   0, 
-      4,   0,  68,   4,   0,   0, 
-      1,   0,  12,   7,  56,   0, 
+      4,   0, 100,   4,   0,   0, 
+      1,   0, 132,   9,  56,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   0,   0, 
-      4,   0,  88,   4,   0,   0, 
-      1,   0,  64,   8,  48,   0, 
+      4,   0, 120,   4,   0,   0, 
+      1,   0, 184,  10,  48,   0, 
       0,   0,  54,   0,  62,  17, 
       2,  16,   0,   0,   8,   0, 
     115, 112, 101,  99, 117, 108, 
@@ -2830,28 +3133,28 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  22,   0, 
      80,  17,   0,   0,   5,   0, 
-      0,   0,   4,   0, 240,   0, 
+      0,   0,   4,   0,  16,   1, 
       0,   0,   1,   0,  64,   3, 
      16,   0,   0,   0,  22,   0, 
      80,  17,   0,   0,   5,   0, 
-      4,   0,   4,   0, 240,   0, 
+      4,   0,   4,   0,  16,   1, 
       0,   0,   1,   0,  64,   3, 
      20,   0,   0,   0,  22,   0, 
      80,  17,   0,   0,   5,   0, 
-      8,   0,   4,   0, 240,   0, 
+      8,   0,   4,   0,  16,   1, 
       0,   0,   1,   0,  64,   3, 
      24,   0,   0,   0,  22,   0, 
      80,  17,   0,   0,   5,   0, 
-      0,   0,   4,   0,  48,   4, 
-      0,   0,   1,   0,  92,   7, 
+      0,   0,   4,   0,  80,   4, 
+      0,   0,   1,   0, 212,   9, 
       4,   0,   0,   0,  22,   0, 
      80,  17,   0,   0,   5,   0, 
-      4,   0,   4,   0,  48,   4, 
-      0,   0,   1,   0,  92,   7, 
+      4,   0,   4,   0,  80,   4, 
+      0,   0,   1,   0, 212,   9, 
       8,   0,   0,   0,  22,   0, 
      80,  17,   0,   0,   5,   0, 
-      8,   0,   4,   0,  48,   4, 
-      0,   0,   1,   0, 252,   7, 
+      8,   0,   4,   0,  80,   4, 
+      0,   0,   1,   0, 116,  10, 
      12,   0,   0,   0,  42,   0, 
      62,  17, 116,   0,   0,   0, 
       0,   0, 106,   0,   0,   0, 
@@ -2862,11 +3165,11 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
      22,   0,  80,  17,   0,   0, 
       1,   0,   0,   0,   4,   0, 
-      4,   1,   0,   0,   1,   0, 
+     36,   1,   0,   0,   1,   0, 
      40,   0,  12,   0,   0,   0, 
      22,   0,  80,  17,   0,   0, 
       1,   0,   0,   0,   4,   0, 
-     44,   1,   0,   0,   1,   0, 
+     76,   1,   0,   0,   1,   0, 
      64,   3,  28,   0,   0,   0, 
      42,   0,  62,  17, 116,   0, 
       0,   0,   0,   0, 105,   0, 
@@ -2877,11 +3180,11 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   1,   0,   0,   0, 
-      4,   0,  28,   4,   0,   0, 
+      4,   0,  60,   4,   0,   0, 
       1,   0,  80,   0,   0,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   1,   0,   0,   0, 
-      4,   0, 108,   4,   0,   0, 
+      4,   0, 140,   4,   0,   0, 
       1,   0, 164,   6,  28,   0, 
       0,   0,  46,   0,  62,  17, 
       2,  16,   0,   0,   8,   0, 
@@ -2893,15 +3196,15 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   0,   0, 
-      4,   0,  84,   5,   0,   0, 
+      4,   0, 116,   5,   0,   0, 
       1,   0, 148,   2,  64,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   4,   0, 
-      4,   0,  84,   5,   0,   0, 
+      4,   0, 116,   5,   0,   0, 
       1,   0, 148,   2,  68,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   8,   0, 
-      4,   0,  84,   5,   0,   0, 
+      4,   0, 116,   5,   0,   0, 
       1,   0, 148,   2,  72,   0, 
       0,   0,  46,   0,  62,  17, 
      64,   0,   0,   0,   0,   0, 
@@ -2913,7 +3216,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,  26,   0,  80,  17, 
       0,   0,   1,   0,   0,   0, 
-      4,   0, 212,   5,   0,   0, 
+      4,   0, 244,   5,   0,   0, 
       1,   0,  16,   5,   4,   0, 
     120,   0,  44,   0,   0,   0, 
      42,   0,  62,  17,  64,   0, 
@@ -2925,7 +3228,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,  26,   0,  80,  17, 
       0,   0,   1,   0,   0,   0, 
-      4,   0, 188,   6,   0,   0, 
+      4,   0, 220,   6,   0,   0, 
       1,   0,  40,   4,  72,   1, 
     164,   1,  60,   0,   0,   0, 
      54,   0,  62,  17,   0,  16, 
@@ -2939,20 +3242,56 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   0,   0, 
-      4,   0,  16,  11,   0,   0, 
-      1,   0, 136,   1,  16,   0, 
+      4,   0,  48,  11,   0,   0, 
+      1,   0,   0,   4,  16,   0, 
+      0,   0,  22,   0,  80,  17, 
+      0,   0,   5,   0,   4,   0, 
+      4,   0,  48,  11,   0,   0, 
+      1,   0,   0,   4,  20,   0, 
+      0,   0,  22,   0,  80,  17, 
+      0,   0,   5,   0,   8,   0, 
+      4,   0,  48,  11,   0,   0, 
+      1,   0,   0,   4,  24,   0, 
+      0,   0,  22,   0,  80,  17, 
+      0,   0,   5,   0,  12,   0, 
+      4,   0,  48,  11,   0,   0, 
+      1,   0,   0,   4,  28,   0, 
+      0,   0,  42,   0,  62,  17, 
+     64,   0,   0,   0,   0,   0, 
+    100, 105, 115, 116,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,  22,   0, 
+     80,  17,   0,   0,   1,   0, 
+      0,   0,   4,   0, 172,  12, 
+      0,   0,   1,   0,  32,   0, 
+      0,   0,   0,   0,  50,   0, 
+     62,  17,   0,  16,   0,   0, 
+      8,   0, 101, 102, 102, 101, 
+     99, 116,  67, 111, 108, 111, 
+    114,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,  22,   0,  80,  17, 
+      0,   0,   5,   0,   0,   0, 
+      4,   0,   4,  13,   0,   0, 
+      1,   0,  72,   0,  32,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   4,   0, 
-      4,   0,  16,  11,   0,   0, 
-      1,   0, 136,   1,  20,   0, 
+      4,   0,   4,  13,   0,   0, 
+      1,   0, 128,   0,  36,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,   8,   0, 
-      4,   0,  16,  11,   0,   0, 
-      1,   0, 136,   1,  24,   0, 
+      4,   0,   4,  13,   0,   0, 
+      1,   0, 128,   0,  40,   0, 
       0,   0,  22,   0,  80,  17, 
       0,   0,   5,   0,  12,   0, 
-      4,   0,  16,  11,   0,   0, 
-      1,   0, 136,   1,  28,   0, 
+      4,   0,   4,  13,   0,   0, 
+      1,   0, 128,   0,  44,   0, 
       0,   0,  50,   0,  62,  17, 
       0,  16,   0,   0,   8,   0, 
     116, 101, 120, 116, 117, 114, 
@@ -2964,502 +3303,606 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
      22,   0,  80,  17,   0,   0, 
       5,   0,   0,   0,   4,   0, 
-    248,  11,   0,   0,   1,   0, 
+    144,  14,   0,   0,   1,   0, 
     160,   0,   0,   0,   0,   0, 
      22,   0,  80,  17,   0,   0, 
       5,   0,   4,   0,   4,   0, 
-    248,  11,   0,   0,   1,   0, 
+    144,  14,   0,   0,   1,   0, 
     160,   0,   4,   0,   0,   0, 
      22,   0,  80,  17,   0,   0, 
       5,   0,   8,   0,   4,   0, 
-    248,  11,   0,   0,   1,   0, 
+    144,  14,   0,   0,   1,   0, 
     160,   0,   8,   0,   0,   0, 
      22,   0,  80,  17,   0,   0, 
       5,   0,  12,   0,   4,   0, 
-     12,  12,   0,   0,   1,   0, 
+    164,  14,   0,   0,   1,   0, 
     140,   0,  28,   0,   0,   0, 
       2,   0,   6,   0, 244,   0, 
       0,   0,  24,   0,   0,   0, 
       1,   0,   0,   0,  16,   1, 
-    175, 167, 251,  63, 191, 189, 
-     30, 229,  93,  35, 123, 240, 
-    127,  36, 198, 195,   0,   0, 
-    242,   0,   0,   0,  16,  11, 
+      6, 233,  84, 153, 232, 173, 
+    130, 247,   8, 240, 107, 181, 
+    180,  47, 196, 114,   0,   0, 
+    242,   0,   0,   0, 128,  13, 
       0,   0,   0,   0,   0,   0, 
-      1,   0,   1,   0, 152,  12, 
+      1,   0,   1,   0,  48,  15, 
       0,   0,   0,   0,   0,   0, 
-    234,   0,   0,   0,   4,  11, 
-      0,   0, 176,   0,   0,   0, 
-     60,   0,   0, 128, 176,   0, 
-      0,   0,  60,   0,   0,   0, 
-    208,   0,   0,   0,  61,   0, 
-      0, 128, 208,   0,   0,   0, 
-     61,   0,   0,   0, 240,   0, 
-      0,   0,  62,   0,   0, 128, 
-    240,   0,   0,   0,  62,   0, 
-      0,   0,   4,   1,   0,   0, 
-     62,   0,   0, 128,   4,   1, 
-      0,   0,  62,   0,   0,   0, 
-     24,   1,   0,   0,  62,   0, 
-      0, 128,  24,   1,   0,   0, 
-     62,   0,   0,   0,  44,   1, 
-      0,   0,  62,   0,   0, 128, 
-     44,   1,   0,   0,  62,   0, 
-      0,   0,  48,   1,   0,   0, 
-     62,   0,   0, 128,  48,   1, 
-      0,   0,  62,   0,   0,   0, 
-     80,   1,   0,   0,  62,   0, 
-      0, 128,  80,   1,   0,   0, 
-     62,   0,   0,   0,  92,   1, 
-      0,   0,  64,   0,   0, 128, 
-     92,   1,   0,   0,  64,   0, 
-      0,   0, 136,   1,   0,   0, 
-     64,   0,   0, 128, 136,   1, 
-      0,   0,  64,   0,   0,   0, 
-    180,   1,   0,   0,  64,   0, 
-      0, 128, 180,   1,   0,   0, 
-     64,   0,   0,   0, 224,   1, 
-      0,   0,  64,   0,   0, 128, 
-    224,   1,   0,   0,  64,   0, 
-      0,   0, 248,   1,   0,   0, 
-     64,   0,   0, 128, 248,   1, 
-      0,   0,  64,   0,   0,   0, 
-     20,   2,   0,   0,  64,   0, 
-      0, 128,  20,   2,   0,   0, 
-     64,   0,   0,   0,  40,   2, 
-      0,   0,  64,   0,   0, 128, 
-     40,   2,   0,   0,  64,   0, 
-      0,   0,  68,   2,   0,   0, 
-     64,   0,   0, 128,  68,   2, 
-      0,   0,  64,   0,   0,   0, 
-     80,   2,   0,   0,  65,   0, 
-      0, 128,  80,   2,   0,   0, 
-     62,   0,   0,   0, 108,   2, 
-      0,   0,  65,   0,   0, 128, 
-    108,   2,   0,   0,  65,   0, 
-      0,   0, 112,   2,   0,   0, 
-     65,   0,   0, 128, 112,   2, 
-      0,   0,  65,   0,   0,   0, 
-    116,   2,   0,   0,  66,   0, 
-      0, 128, 116,   2,   0,   0, 
-     66,   0,   0,   0, 160,   2, 
-      0,   0,  66,   0,   0, 128, 
-    160,   2,   0,   0,  66,   0, 
-      0,   0, 204,   2,   0,   0, 
-     66,   0,   0, 128, 204,   2, 
-      0,   0,  66,   0,   0,   0, 
-    248,   2,   0,   0,  66,   0, 
-      0, 128, 248,   2,   0,   0, 
-     66,   0,   0,   0,  36,   3, 
-      0,   0,  66,   0,   0, 128, 
-     36,   3,   0,   0,  66,   0, 
-      0,   0,  80,   3,   0,   0, 
-     66,   0,   0, 128,  80,   3, 
-      0,   0,  66,   0,   0,   0, 
-    124,   3,   0,   0,  66,   0, 
-      0, 128, 124,   3,   0,   0, 
-     66,   0,   0,   0, 148,   3, 
-      0,   0,  66,   0,   0, 128, 
-    148,   3,   0,   0,  66,   0, 
-      0,   0, 176,   3,   0,   0, 
-     66,   0,   0, 128, 176,   3, 
-      0,   0,  66,   0,   0,   0, 
-    204,   3,   0,   0,  66,   0, 
-      0, 128, 204,   3,   0,   0, 
-     66,   0,   0,   0, 232,   3, 
-      0,   0,  62,   0,   0, 128, 
-    232,   3,   0,   0,  62,   0, 
-      0,   0,   4,   4,   0,   0, 
-     67,   0,   0, 128,   4,   4, 
-      0,   0,  67,   0,   0,   0, 
-      8,   4,   0,   0,  68,   0, 
-      0, 128,   8,   4,   0,   0, 
-     68,   0,   0,   0,  28,   4, 
-      0,   0,  68,   0,   0, 128, 
-     28,   4,   0,   0,  68,   0, 
-      0,   0,  48,   4,   0,   0, 
-     68,   0,   0, 128,  48,   4, 
+     30,   1,   0,   0, 116,  13, 
+      0,   0, 208,   0,   0,   0, 
+     68,   0,   0, 128, 208,   0, 
       0,   0,  68,   0,   0,   0, 
-     68,   4,   0,   0,  68,   0, 
-      0, 128,  68,   4,   0,   0, 
-     68,   0,   0,   0,  88,   4, 
-      0,   0,  68,   0,   0, 128, 
-     88,   4,   0,   0,  68,   0, 
-      0,   0, 108,   4,   0,   0, 
-     68,   0,   0, 128, 108,   4, 
-      0,   0,  68,   0,   0,   0, 
-    112,   4,   0,   0,  68,   0, 
-      0, 128, 112,   4,   0,   0, 
-     68,   0,   0,   0, 144,   4, 
-      0,   0,  68,   0,   0, 128, 
-    144,   4,   0,   0,  68,   0, 
-      0,   0, 156,   4,   0,   0, 
-     70,   0,   0, 128, 156,   4, 
+    240,   0,   0,   0,  69,   0, 
+      0, 128, 240,   0,   0,   0, 
+     69,   0,   0,   0,  16,   1, 
+      0,   0,  70,   0,   0, 128, 
+     16,   1,   0,   0,  70,   0, 
+      0,   0,  36,   1,   0,   0, 
+     70,   0,   0, 128,  36,   1, 
       0,   0,  70,   0,   0,   0, 
-    200,   4,   0,   0,  70,   0, 
-      0, 128, 200,   4,   0,   0, 
-     70,   0,   0,   0, 244,   4, 
+     56,   1,   0,   0,  70,   0, 
+      0, 128,  56,   1,   0,   0, 
+     70,   0,   0,   0,  76,   1, 
       0,   0,  70,   0,   0, 128, 
-    244,   4,   0,   0,  70,   0, 
-      0,   0,  32,   5,   0,   0, 
-     70,   0,   0, 128,  32,   5, 
+     76,   1,   0,   0,  70,   0, 
+      0,   0,  80,   1,   0,   0, 
+     70,   0,   0, 128,  80,   1, 
       0,   0,  70,   0,   0,   0, 
-     56,   5,   0,   0,  70,   0, 
-      0, 128,  56,   5,   0,   0, 
-     70,   0,   0,   0,  84,   5, 
+    112,   1,   0,   0,  70,   0, 
+      0, 128, 112,   1,   0,   0, 
+     70,   0,   0,   0, 124,   1, 
+      0,   0,  72,   0,   0, 128, 
+    124,   1,   0,   0,  72,   0, 
+      0,   0, 168,   1,   0,   0, 
+     72,   0,   0, 128, 168,   1, 
+      0,   0,  72,   0,   0,   0, 
+    212,   1,   0,   0,  72,   0, 
+      0, 128, 212,   1,   0,   0, 
+     72,   0,   0,   0,   0,   2, 
       0,   0,  72,   0,   0, 128, 
-     84,   5,   0,   0,  72,   0, 
-      0,   0, 112,   5,   0,   0, 
-     72,   0,   0, 128, 112,   5, 
+      0,   2,   0,   0,  72,   0, 
+      0,   0,  24,   2,   0,   0, 
+     72,   0,   0, 128,  24,   2, 
       0,   0,  72,   0,   0,   0, 
-    132,   5,   0,   0,  72,   0, 
-      0, 128, 132,   5,   0,   0, 
-     72,   0,   0,   0, 152,   5, 
+     52,   2,   0,   0,  72,   0, 
+      0, 128,  52,   2,   0,   0, 
+     72,   0,   0,   0,  72,   2, 
       0,   0,  72,   0,   0, 128, 
-    152,   5,   0,   0,  72,   0, 
-      0,   0, 180,   5,   0,   0, 
-     72,   0,   0, 128, 180,   5, 
+     72,   2,   0,   0,  72,   0, 
+      0,   0, 100,   2,   0,   0, 
+     72,   0,   0, 128, 100,   2, 
       0,   0,  72,   0,   0,   0, 
-    192,   5,   0,   0,  73,   0, 
-      0, 128, 192,   5,   0,   0, 
-     73,   0,   0,   0, 212,   5, 
+    112,   2,   0,   0,  73,   0, 
+      0, 128, 112,   2,   0,   0, 
+     70,   0,   0,   0, 140,   2, 
       0,   0,  73,   0,   0, 128, 
-    212,   5,   0,   0,  73,   0, 
-      0,   0, 216,   5,   0,   0, 
-     75,   0,   0, 128, 216,   5, 
-      0,   0,  75,   0,   0,   0, 
-      4,   6,   0,   0,  75,   0, 
-      0, 128,   4,   6,   0,   0, 
-     75,   0,   0,   0,  32,   6, 
-      0,   0,  75,   0,   0, 128, 
-     32,   6,   0,   0,  75,   0, 
-      0,   0,  52,   6,   0,   0, 
-     75,   0,   0, 128,  52,   6, 
+    140,   2,   0,   0,  73,   0, 
+      0,   0, 144,   2,   0,   0, 
+     73,   0,   0, 128, 144,   2, 
+      0,   0,  73,   0,   0,   0, 
+    148,   2,   0,   0,  74,   0, 
+      0, 128, 148,   2,   0,   0, 
+     74,   0,   0,   0, 192,   2, 
+      0,   0,  74,   0,   0, 128, 
+    192,   2,   0,   0,  74,   0, 
+      0,   0, 236,   2,   0,   0, 
+     74,   0,   0, 128, 236,   2, 
+      0,   0,  74,   0,   0,   0, 
+     24,   3,   0,   0,  74,   0, 
+      0, 128,  24,   3,   0,   0, 
+     74,   0,   0,   0,  68,   3, 
+      0,   0,  74,   0,   0, 128, 
+     68,   3,   0,   0,  74,   0, 
+      0,   0, 112,   3,   0,   0, 
+     74,   0,   0, 128, 112,   3, 
+      0,   0,  74,   0,   0,   0, 
+    156,   3,   0,   0,  74,   0, 
+      0, 128, 156,   3,   0,   0, 
+     74,   0,   0,   0, 180,   3, 
+      0,   0,  74,   0,   0, 128, 
+    180,   3,   0,   0,  74,   0, 
+      0,   0, 208,   3,   0,   0, 
+     74,   0,   0, 128, 208,   3, 
+      0,   0,  74,   0,   0,   0, 
+    236,   3,   0,   0,  74,   0, 
+      0, 128, 236,   3,   0,   0, 
+     74,   0,   0,   0,   8,   4, 
+      0,   0,  70,   0,   0, 128, 
+      8,   4,   0,   0,  70,   0, 
+      0,   0,  36,   4,   0,   0, 
+     75,   0,   0, 128,  36,   4, 
       0,   0,  75,   0,   0,   0, 
-     80,   6,   0,   0,  75,   0, 
-      0, 128,  80,   6,   0,   0, 
-     75,   0,   0,   0,  84,   6, 
+     40,   4,   0,   0,  76,   0, 
+      0, 128,  40,   4,   0,   0, 
+     76,   0,   0,   0,  60,   4, 
       0,   0,  76,   0,   0, 128, 
-     84,   6,   0,   0,  76,   0, 
-      0,   0, 112,   6,   0,   0, 
-     76,   0,   0, 128, 112,   6, 
+     60,   4,   0,   0,  76,   0, 
+      0,   0,  80,   4,   0,   0, 
+     76,   0,   0, 128,  80,   4, 
       0,   0,  76,   0,   0,   0, 
-    132,   6,   0,   0,  76,   0, 
-      0, 128, 132,   6,   0,   0, 
-     76,   0,   0,   0, 160,   6, 
+    100,   4,   0,   0,  76,   0, 
+      0, 128, 100,   4,   0,   0, 
+     76,   0,   0,   0, 120,   4, 
       0,   0,  76,   0,   0, 128, 
-    160,   6,   0,   0,  76,   0, 
-      0,   0, 188,   6,   0,   0, 
-     77,   0,   0, 128, 188,   6, 
-      0,   0,  77,   0,   0,   0, 
-    208,   6,   0,   0,  77,   0, 
-      0, 128, 208,   6,   0,   0, 
-     77,   0,   0,   0, 236,   6, 
-      0,   0,  77,   0,   0, 128, 
-    236,   6,   0,   0,  77,   0, 
-      0,   0, 248,   6,   0,   0, 
-     79,   0,   0, 128, 248,   6, 
-      0,   0,  79,   0,   0,   0, 
-     36,   7,   0,   0,  79,   0, 
-      0, 128,  36,   7,   0,   0, 
-     79,   0,   0,   0,  80,   7, 
-      0,   0,  79,   0,   0, 128, 
-     80,   7,   0,   0,  79,   0, 
-      0,   0, 124,   7,   0,   0, 
-     79,   0,   0, 128, 124,   7, 
-      0,   0,  79,   0,   0,   0, 
-    152,   7,   0,   0,  79,   0, 
-      0, 128, 152,   7,   0,   0, 
-     79,   0,   0,   0, 180,   7, 
-      0,   0,  79,   0,   0, 128, 
-    180,   7,   0,   0,  79,   0, 
-      0,   0, 208,   7,   0,   0, 
-     80,   0,   0, 128, 208,   7, 
-      0,   0,  80,   0,   0,   0, 
-    232,   7,   0,   0,  80,   0, 
-      0, 128, 232,   7,   0,   0, 
-     80,   0,   0,   0,   4,   8, 
-      0,   0,  80,   0,   0, 128, 
-      4,   8,   0,   0,  80,   0, 
-      0,   0,  24,   8,   0,   0, 
-     80,   0,   0, 128,  24,   8, 
-      0,   0,  80,   0,   0,   0, 
-     52,   8,   0,   0,  80,   0, 
-      0, 128,  52,   8,   0,   0, 
-     80,   0,   0,   0,  80,   8, 
-      0,   0,  80,   0,   0, 128, 
-     80,   8,   0,   0,  80,   0, 
-      0,   0, 108,   8,   0,   0, 
-     80,   0,   0, 128, 108,   8, 
-      0,   0,  80,   0,   0,   0, 
-    132,   8,   0,   0,  80,   0, 
-      0, 128, 132,   8,   0,   0, 
-     80,   0,   0,   0, 160,   8, 
-      0,   0,  80,   0,   0, 128, 
-    160,   8,   0,   0,  80,   0, 
-      0,   0, 188,   8,   0,   0, 
-     80,   0,   0, 128, 188,   8, 
-      0,   0,  80,   0,   0,   0, 
-    216,   8,   0,   0,  80,   0, 
-      0, 128, 216,   8,   0,   0, 
-     80,   0,   0,   0, 236,   8, 
+    120,   4,   0,   0,  76,   0, 
+      0,   0, 140,   4,   0,   0, 
+     76,   0,   0, 128, 140,   4, 
+      0,   0,  76,   0,   0,   0, 
+    144,   4,   0,   0,  76,   0, 
+      0, 128, 144,   4,   0,   0, 
+     76,   0,   0,   0, 176,   4, 
+      0,   0,  76,   0,   0, 128, 
+    176,   4,   0,   0,  76,   0, 
+      0,   0, 188,   4,   0,   0, 
+     78,   0,   0, 128, 188,   4, 
+      0,   0,  78,   0,   0,   0, 
+    232,   4,   0,   0,  78,   0, 
+      0, 128, 232,   4,   0,   0, 
+     78,   0,   0,   0,  20,   5, 
+      0,   0,  78,   0,   0, 128, 
+     20,   5,   0,   0,  78,   0, 
+      0,   0,  64,   5,   0,   0, 
+     78,   0,   0, 128,  64,   5, 
+      0,   0,  78,   0,   0,   0, 
+     88,   5,   0,   0,  78,   0, 
+      0, 128,  88,   5,   0,   0, 
+     78,   0,   0,   0, 116,   5, 
       0,   0,  80,   0,   0, 128, 
-    236,   8,   0,   0,  80,   0, 
-      0,   0,   8,   9,   0,   0, 
-     80,   0,   0, 128,   8,   9, 
+    116,   5,   0,   0,  80,   0, 
+      0,   0, 144,   5,   0,   0, 
+     80,   0,   0, 128, 144,   5, 
       0,   0,  80,   0,   0,   0, 
-     32,   9,   0,   0,  80,   0, 
-      0, 128,  32,   9,   0,   0, 
-     80,   0,   0,   0,  64,   9, 
+    164,   5,   0,   0,  80,   0, 
+      0, 128, 164,   5,   0,   0, 
+     80,   0,   0,   0, 184,   5, 
       0,   0,  80,   0,   0, 128, 
-     64,   9,   0,   0,  80,   0, 
-      0,   0,  92,   9,   0,   0, 
-     80,   0,   0, 128,  92,   9, 
+    184,   5,   0,   0,  80,   0, 
+      0,   0, 212,   5,   0,   0, 
+     80,   0,   0, 128, 212,   5, 
       0,   0,  80,   0,   0,   0, 
-    112,   9,   0,   0,  80,   0, 
-      0, 128, 112,   9,   0,   0, 
-     80,   0,   0,   0, 140,   9, 
-      0,   0,  80,   0,   0, 128, 
-    140,   9,   0,   0,  80,   0, 
-      0,   0, 168,   9,   0,   0, 
-     81,   0,   0, 128, 168,   9, 
-      0,   0,  81,   0,   0,   0, 
-    188,   9,   0,   0,  81,   0, 
-      0, 128, 188,   9,   0,   0, 
-     81,   0,   0,   0, 216,   9, 
+    224,   5,   0,   0,  81,   0, 
+      0, 128, 224,   5,   0,   0, 
+     81,   0,   0,   0, 244,   5, 
       0,   0,  81,   0,   0, 128, 
-    216,   9,   0,   0,  81,   0, 
-      0,   0, 228,   9,   0,   0, 
-     82,   0,   0, 128, 228,   9, 
-      0,   0,  82,   0,   0,   0, 
-     16,  10,   0,   0,  82,   0, 
-      0, 128,  16,  10,   0,   0, 
-     82,   0,   0,   0,  60,  10, 
-      0,   0,  82,   0,   0, 128, 
-     60,  10,   0,   0,  82,   0, 
-      0,   0, 104,  10,   0,   0, 
-     82,   0,   0, 128, 104,  10, 
-      0,   0,  82,   0,   0,   0, 
-    132,  10,   0,   0,  82,   0, 
-      0, 128, 132,  10,   0,   0, 
-     82,   0,   0,   0, 160,  10, 
-      0,   0,  82,   0,   0, 128, 
-    160,  10,   0,   0,  82,   0, 
-      0,   0, 188,  10,   0,   0, 
-     82,   0,   0, 128, 188,  10, 
-      0,   0,  82,   0,   0,   0, 
-    192,  10,   0,   0,  83,   0, 
-      0, 128, 192,  10,   0,   0, 
-     83,   0,   0,   0, 196,  10, 
+    244,   5,   0,   0,  81,   0, 
+      0,   0, 248,   5,   0,   0, 
+     83,   0,   0, 128, 248,   5, 
+      0,   0,  83,   0,   0,   0, 
+     36,   6,   0,   0,  83,   0, 
+      0, 128,  36,   6,   0,   0, 
+     83,   0,   0,   0,  64,   6, 
+      0,   0,  83,   0,   0, 128, 
+     64,   6,   0,   0,  83,   0, 
+      0,   0,  84,   6,   0,   0, 
+     83,   0,   0, 128,  84,   6, 
+      0,   0,  83,   0,   0,   0, 
+    112,   6,   0,   0,  83,   0, 
+      0, 128, 112,   6,   0,   0, 
+     83,   0,   0,   0, 116,   6, 
       0,   0,  84,   0,   0, 128, 
-    196,  10,   0,   0,  68,   0, 
-      0,   0, 224,  10,   0,   0, 
-     84,   0,   0, 128, 224,  10, 
+    116,   6,   0,   0,  84,   0, 
+      0,   0, 144,   6,   0,   0, 
+     84,   0,   0, 128, 144,   6, 
       0,   0,  84,   0,   0,   0, 
-    228,  10,   0,   0,  87,   0, 
-      0, 128, 228,  10,   0,   0, 
-     87,   0,   0,   0,  16,  11, 
+    164,   6,   0,   0,  84,   0, 
+      0, 128, 164,   6,   0,   0, 
+     84,   0,   0,   0, 192,   6, 
+      0,   0,  84,   0,   0, 128, 
+    192,   6,   0,   0,  84,   0, 
+      0,   0, 220,   6,   0,   0, 
+     85,   0,   0, 128, 220,   6, 
+      0,   0,  85,   0,   0,   0, 
+    240,   6,   0,   0,  85,   0, 
+      0, 128, 240,   6,   0,   0, 
+     85,   0,   0,   0,  12,   7, 
+      0,   0,  85,   0,   0, 128, 
+     12,   7,   0,   0,  85,   0, 
+      0,   0,  24,   7,   0,   0, 
+     87,   0,   0, 128,  24,   7, 
+      0,   0,  87,   0,   0,   0, 
+     68,   7,   0,   0,  87,   0, 
+      0, 128,  68,   7,   0,   0, 
+     87,   0,   0,   0, 112,   7, 
+      0,   0,  87,   0,   0, 128, 
+    112,   7,   0,   0,  87,   0, 
+      0,   0, 156,   7,   0,   0, 
+     87,   0,   0, 128, 156,   7, 
+      0,   0,  87,   0,   0,   0, 
+    184,   7,   0,   0,  87,   0, 
+      0, 128, 184,   7,   0,   0, 
+     87,   0,   0,   0, 212,   7, 
+      0,   0,  87,   0,   0, 128, 
+    212,   7,   0,   0,  87,   0, 
+      0,   0, 240,   7,   0,   0, 
+     88,   0,   0, 128, 240,   7, 
+      0,   0,  88,   0,   0,   0, 
+      8,   8,   0,   0,  88,   0, 
+      0, 128,   8,   8,   0,   0, 
+     88,   0,   0,   0,  36,   8, 
+      0,   0,  88,   0,   0, 128, 
+     36,   8,   0,   0,  88,   0, 
+      0,   0,  56,   8,   0,   0, 
+     88,   0,   0, 128,  56,   8, 
+      0,   0,  88,   0,   0,   0, 
+     84,   8,   0,   0,  88,   0, 
+      0, 128,  84,   8,   0,   0, 
+     88,   0,   0,   0, 112,   8, 
+      0,   0,  88,   0,   0, 128, 
+    112,   8,   0,   0,  88,   0, 
+      0,   0, 140,   8,   0,   0, 
+     88,   0,   0, 128, 140,   8, 
+      0,   0,  88,   0,   0,   0, 
+    164,   8,   0,   0,  88,   0, 
+      0, 128, 164,   8,   0,   0, 
+     88,   0,   0,   0, 192,   8, 
+      0,   0,  88,   0,   0, 128, 
+    192,   8,   0,   0,  88,   0, 
+      0,   0, 220,   8,   0,   0, 
+     88,   0,   0, 128, 220,   8, 
+      0,   0,  88,   0,   0,   0, 
+    248,   8,   0,   0,  88,   0, 
+      0, 128, 248,   8,   0,   0, 
+     88,   0,   0,   0,  12,   9, 
       0,   0,  88,   0,   0, 128, 
-     16,  11,   0,   0,  88,   0, 
-      0,   0,  48,  11,   0,   0, 
-     88,   0,   0, 128,  48,  11, 
+     12,   9,   0,   0,  88,   0, 
+      0,   0,  40,   9,   0,   0, 
+     88,   0,   0, 128,  40,   9, 
       0,   0,  88,   0,   0,   0, 
-     80,  11,   0,   0,  88,   0, 
-      0, 128,  80,  11,   0,   0, 
-     88,   0,   0,   0, 108,  11, 
+     64,   9,   0,   0,  88,   0, 
+      0, 128,  64,   9,   0,   0, 
+     88,   0,   0,   0,  96,   9, 
       0,   0,  88,   0,   0, 128, 
-    108,  11,   0,   0,  88,   0, 
-      0,   0, 140,  11,   0,   0, 
-     88,   0,   0, 128, 140,  11, 
+     96,   9,   0,   0,  88,   0, 
+      0,   0, 124,   9,   0,   0, 
+     88,   0,   0, 128, 124,   9, 
       0,   0,  88,   0,   0,   0, 
-    168,  11,   0,   0,  88,   0, 
-      0, 128, 168,  11,   0,   0, 
-     88,   0,   0,   0, 208,  11, 
+    144,   9,   0,   0,  88,   0, 
+      0, 128, 144,   9,   0,   0, 
+     88,   0,   0,   0, 172,   9, 
       0,   0,  88,   0,   0, 128, 
-    208,  11,   0,   0,  88,   0, 
-      0,   0, 248,  11,   0,   0, 
-     89,   0,   0, 128, 248,  11, 
+    172,   9,   0,   0,  88,   0, 
+      0,   0, 200,   9,   0,   0, 
+     89,   0,   0, 128, 200,   9, 
       0,   0,  89,   0,   0,   0, 
-     12,  12,   0,   0,  90,   0, 
-      0, 128,  12,  12,   0,   0, 
-     90,   0,   0,   0,  44,  12, 
+    220,   9,   0,   0,  89,   0, 
+      0, 128, 220,   9,   0,   0, 
+     89,   0,   0,   0, 248,   9, 
+      0,   0,  89,   0,   0, 128, 
+    248,   9,   0,   0,  89,   0, 
+      0,   0,   4,  10,   0,   0, 
+     90,   0,   0, 128,   4,  10, 
+      0,   0,  90,   0,   0,   0, 
+     48,  10,   0,   0,  90,   0, 
+      0, 128,  48,  10,   0,   0, 
+     90,   0,   0,   0,  92,  10, 
       0,   0,  90,   0,   0, 128, 
-     44,  12,   0,   0,  90,   0, 
-      0,   0,  72,  12,   0,   0, 
-     90,   0,   0, 128,  72,  12, 
+     92,  10,   0,   0,  90,   0, 
+      0,   0, 136,  10,   0,   0, 
+     90,   0,   0, 128, 136,  10, 
       0,   0,  90,   0,   0,   0, 
-     84,  12,   0,   0,  91,   0, 
-      0, 128,  84,  12,   0,   0, 
-     91,   0,   0,   0, 104,  12, 
-      0,   0,  91,   0,   0, 128, 
-    104,  12,   0,   0,  91,   0, 
-      0,   0, 108,  12,   0,   0, 
-     92,   0,   0, 128, 108,  12, 
-      0,   0,  92,   0,   0,   0, 
-    128,  12,   0,   0,  92,   0, 
-      0, 128, 128,  12,   0,   0, 
-     92,   0,   0,   0, 148,  12, 
+    164,  10,   0,   0,  90,   0, 
+      0, 128, 164,  10,   0,   0, 
+     90,   0,   0,   0, 192,  10, 
+      0,   0,  90,   0,   0, 128, 
+    192,  10,   0,   0,  90,   0, 
+      0,   0, 220,  10,   0,   0, 
+     90,   0,   0, 128, 220,  10, 
+      0,   0,  90,   0,   0,   0, 
+    224,  10,   0,   0,  91,   0, 
+      0, 128, 224,  10,   0,   0, 
+     91,   0,   0,   0, 228,  10, 
       0,   0,  92,   0,   0, 128, 
-    148,  12,   0,   0,  92,   0, 
-      0,   0,   5,   0,  44,   0, 
-     27,   0,  43,   0,   5,   0, 
-     45,   0,  28,   0,  44,   0, 
-      5,   0,  48,   0,  14,   0, 
-     18,   0,   5,   0,  48,   0, 
-      5,   0,  48,   0,   5,   0, 
+    228,  10,   0,   0,  76,   0, 
+      0,   0,   0,  11,   0,   0, 
+     92,   0,   0, 128,   0,  11, 
+      0,   0,  92,   0,   0,   0, 
+      4,  11,   0,   0,  95,   0, 
+      0, 128,   4,  11,   0,   0, 
+     95,   0,   0,   0,  48,  11, 
+      0,   0,  96,   0,   0, 128, 
+     48,  11,   0,   0,  96,   0, 
+      0,   0,  92,  11,   0,   0, 
+     96,   0,   0, 128,  92,  11, 
+      0,   0,  96,   0,   0,   0, 
+    104,  11,   0,   0,  98,   0, 
+      0, 128, 104,  11,   0,   0, 
+     98,   0,   0,   0, 124,  11, 
+      0,   0,  98,   0,   0, 128, 
+    124,  11,   0,   0,  98,   0, 
+      0,   0, 152,  11,   0,   0, 
+     98,   0,   0, 128, 152,  11, 
+      0,   0,  98,   0,   0,   0, 
+    172,  11,   0,   0,  98,   0, 
+      0, 128, 172,  11,   0,   0, 
+     98,   0,   0,   0, 200,  11, 
+      0,   0,  98,   0,   0, 128, 
+    200,  11,   0,   0,  98,   0, 
+      0,   0, 228,  11,   0,   0, 
+     98,   0,   0, 128, 228,  11, 
+      0,   0,  98,   0,   0,   0, 
+    248,  11,   0,   0,  98,   0, 
+      0, 128, 248,  11,   0,   0, 
+     98,   0,   0,   0,  20,  12, 
+      0,   0,  98,   0,   0, 128, 
+     20,  12,   0,   0,  98,   0, 
+      0,   0,  40,  12,   0,   0, 
+     98,   0,   0, 128,  40,  12, 
+      0,   0,  98,   0,   0,   0, 
+     68,  12,   0,   0,  98,   0, 
+      0, 128,  68,  12,   0,   0, 
+     98,   0,   0,   0,  96,  12, 
+      0,   0,  98,   0,   0, 128, 
+     96,  12,   0,   0,  98,   0, 
+      0,   0, 124,  12,   0,   0, 
+     98,   0,   0, 128, 124,  12, 
+      0,   0,  98,   0,   0,   0, 
+    144,  12,   0,   0,  98,   0, 
+      0, 128, 144,  12,   0,   0, 
+     98,   0,   0,   0, 172,  12, 
+      0,   0,  99,   0,   0, 128, 
+    172,  12,   0,   0,  99,   0, 
+      0,   0, 204,  12,   0,   0, 
+     99,   0,   0, 128, 204,  12, 
+      0,   0,  99,   0,   0,   0, 
+    216,  12,   0,   0, 101,   0, 
+      0, 128, 216,  12,   0,   0, 
+    101,   0,   0,   0,   4,  13, 
+      0,   0, 102,   0,   0, 128, 
+      4,  13,   0,   0, 102,   0, 
+      0,   0,  32,  13,   0,   0, 
+    102,   0,   0, 128,  32,  13, 
+      0,   0, 102,   0,   0,   0, 
+     52,  13,   0,   0, 102,   0, 
+      0, 128,  52,  13,   0,   0, 
+    102,   0,   0,   0,  76,  13, 
+      0,   0, 102,   0,   0, 128, 
+     76,  13,   0,   0, 102,   0, 
+      0,   0, 104,  13,   0,   0, 
+    102,   0,   0, 128, 104,  13, 
+      0,   0, 102,   0,   0,   0, 
+    132,  13,   0,   0, 102,   0, 
+      0, 128, 132,  13,   0,   0, 
+    102,   0,   0,   0, 160,  13, 
+      0,   0, 103,   0,   0, 128, 
+    160,  13,   0,   0, 103,   0, 
+      0,   0, 164,  13,   0,   0, 
+    104,   0,   0, 128, 164,  13, 
+      0,   0, 104,   0,   0,   0, 
+    168,  13,   0,   0, 105,   0, 
+      0, 128, 168,  13,   0,   0, 
+    105,   0,   0,   0, 200,  13, 
+      0,   0, 105,   0,   0, 128, 
+    200,  13,   0,   0, 105,   0, 
+      0,   0, 232,  13,   0,   0, 
+    105,   0,   0, 128, 232,  13, 
+      0,   0, 105,   0,   0,   0, 
+      4,  14,   0,   0, 105,   0, 
+      0, 128,   4,  14,   0,   0, 
+    105,   0,   0,   0,  36,  14, 
+      0,   0, 105,   0,   0, 128, 
+     36,  14,   0,   0, 105,   0, 
+      0,   0,  64,  14,   0,   0, 
+    105,   0,   0, 128,  64,  14, 
+      0,   0, 105,   0,   0,   0, 
+    104,  14,   0,   0, 105,   0, 
+      0, 128, 104,  14,   0,   0, 
+    105,   0,   0,   0, 144,  14, 
+      0,   0, 106,   0,   0, 128, 
+    144,  14,   0,   0, 106,   0, 
+      0,   0, 164,  14,   0,   0, 
+    107,   0,   0, 128, 164,  14, 
+      0,   0, 107,   0,   0,   0, 
+    196,  14,   0,   0, 107,   0, 
+      0, 128, 196,  14,   0,   0, 
+    107,   0,   0,   0, 224,  14, 
+      0,   0, 107,   0,   0, 128, 
+    224,  14,   0,   0, 107,   0, 
+      0,   0, 236,  14,   0,   0, 
+    108,   0,   0, 128, 236,  14, 
+      0,   0, 108,   0,   0,   0, 
+      0,  15,   0,   0, 108,   0, 
+      0, 128,   0,  15,   0,   0, 
+    108,   0,   0,   0,   4,  15, 
+      0,   0, 109,   0,   0, 128, 
+      4,  15,   0,   0, 109,   0, 
+      0,   0,  24,  15,   0,   0, 
+    109,   0,   0, 128,  24,  15, 
+      0,   0, 109,   0,   0,   0, 
+     44,  15,   0,   0, 109,   0, 
+      0, 128,  44,  15,   0,   0, 
+    109,   0,   0,   0,   5,   0, 
+     42,   0,  27,   0,  41,   0, 
+      5,   0,  43,   0,  28,   0, 
+     42,   0,   5,   0,  48,   0, 
+     14,   0,  18,   0,   5,   0, 
      48,   0,   5,   0,  48,   0, 
       5,   0,  48,   0,   5,   0, 
      48,   0,   5,   0,  48,   0, 
-     21,   0,  41,   0,   5,   0, 
+      5,   0,  48,   0,   5,   0, 
      48,   0,  21,   0,  41,   0, 
-      9,   0,  67,   0,  33,   0, 
-     49,   0,   9,   0,  67,   0, 
+      5,   0,  48,   0,  21,   0, 
+     41,   0,   9,   0,  67,   0, 
      33,   0,  49,   0,   9,   0, 
      67,   0,  33,   0,  49,   0, 
-      9,   0,  67,   0,  32,   0, 
-     59,   0,   9,   0,  67,   0, 
-     13,   0,  61,   0,   9,   0, 
-     67,   0,  13,   0,  65,   0, 
+      9,   0,  67,   0,  33,   0, 
+     49,   0,   9,   0,  67,   0, 
+     32,   0,  59,   0,   9,   0, 
+     67,   0,  13,   0,  61,   0, 
       9,   0,  67,   0,  13,   0, 
      65,   0,   9,   0,  67,   0, 
-      9,   0,  67,   0,  13,   0, 
-     21,   0,  44,   0,  46,   0, 
-     13,   0,  21,   0,  13,   0, 
+     13,   0,  65,   0,   9,   0, 
+     67,   0,   9,   0,  67,   0, 
+     13,   0,  21,   0,  44,   0, 
+     46,   0,  13,   0,  21,   0, 
+     13,   0,  21,   0,  21,   0, 
      21,   0,  21,   0,  21,   0, 
-     21,   0,  21,   0,   9,   0, 
-    100,   0,  25,   0,  41,   0, 
       9,   0, 100,   0,  25,   0, 
      41,   0,   9,   0, 100,   0, 
      25,   0,  41,   0,   9,   0, 
-    100,   0,  71,   0,  87,   0, 
+    100,   0,  25,   0,  41,   0, 
       9,   0, 100,   0,  71,   0, 
      87,   0,   9,   0, 100,   0, 
      71,   0,  87,   0,   9,   0, 
-    100,   0,  70,   0,  97,   0, 
-      9,   0, 100,   0,  51,   0, 
-     99,   0,   9,   0, 100,   0, 
-     25,   0,  99,   0,   9,   0, 
-    100,   0,   9,   0,  99,   0, 
-     44,   0,  46,   0,  44,   0, 
-     46,   0,   5,   0,   5,   0, 
+    100,   0,  71,   0,  87,   0, 
+      9,   0, 100,   0,  70,   0, 
+     97,   0,   9,   0, 100,   0, 
+     51,   0,  99,   0,   9,   0, 
+    100,   0,  25,   0,  99,   0, 
+      9,   0, 100,   0,   9,   0, 
+     99,   0,  44,   0,  46,   0, 
+     44,   0,  46,   0,   5,   0, 
       5,   0,   5,   0,   5,   0, 
-     46,   0,  14,   0,  18,   0, 
+      5,   0,  46,   0,  14,   0, 
+     18,   0,   5,   0,  46,   0, 
       5,   0,  46,   0,   5,   0, 
      46,   0,   5,   0,  46,   0, 
       5,   0,  46,   0,   5,   0, 
      46,   0,   5,   0,  46,   0, 
       5,   0,  46,   0,   5,   0, 
      46,   0,   5,   0,  46,   0, 
-      5,   0,  46,   0,   5,   0, 
-     46,   0,  21,   0,  39,   0, 
       5,   0,  46,   0,  21,   0, 
-     39,   0,   9,   0,  73,   0, 
-     27,   0,  42,   0,   9,   0, 
+     39,   0,   5,   0,  46,   0, 
+     21,   0,  39,   0,   9,   0, 
      73,   0,  27,   0,  42,   0, 
       9,   0,  73,   0,  27,   0, 
      42,   0,   9,   0,  73,   0, 
-     27,   0,  72,   0,   9,   0, 
+     27,   0,  42,   0,   9,   0, 
      73,   0,  27,   0,  72,   0, 
-      3,   0,  27,   0,   7,   0, 
-     22,   0,   3,   0,  27,   0, 
-      7,   0,  22,   0,   3,   0, 
-     27,   0,   7,   0,  26,   0, 
-      3,   0,  27,   0,   7,   0, 
-     26,   0,   3,   0,  27,   0, 
-      3,   0,  27,   0,   4,   0, 
-     14,   0,   4,   0,  13,   0, 
-     14,   0,  14,   0,  14,   0, 
-     14,   0,   4,   0,  53,   0, 
-     13,   0,  26,   0,   4,   0, 
-     53,   0,  37,   0,  52,   0, 
-      4,   0,  53,   0,  37,   0, 
-     52,   0,   4,   0,  53,   0, 
-     13,   0,  52,   0,  53,   0, 
-     53,   0,  53,   0,  53,   0, 
-      9,   0,  61,   0,  38,   0, 
-     58,   0,   9,   0,  61,   0, 
+      9,   0,  73,   0,  27,   0, 
+     72,   0,   9,   0,  36,   0, 
+     13,   0,  30,   0,   9,   0, 
+     36,   0,  13,   0,  30,   0, 
+      9,   0,  36,   0,  13,   0, 
+     34,   0,   9,   0,  36,   0, 
+     13,   0,  34,   0,   9,   0, 
+     36,   0,   9,   0,  36,   0, 
+     13,   0,  23,   0,  13,   0, 
+     22,   0,  23,   0,  23,   0, 
+     23,   0,  23,   0,  13,   0, 
+     66,   0,  22,   0,  37,   0, 
+     13,   0,  66,   0,  48,   0, 
+     65,   0,  13,   0,  66,   0, 
+     48,   0,  65,   0,  13,   0, 
+     66,   0,  22,   0,  65,   0, 
+     66,   0,  66,   0,  66,   0, 
+     66,   0,   9,   0,  61,   0, 
      38,   0,  58,   0,   9,   0, 
      61,   0,  38,   0,  58,   0, 
-      9,   0,  61,   0,  19,   0, 
-     60,   0,   9,   0,  19,   0, 
-     13,   0,  17,   0,   9,   0, 
+      9,   0,  61,   0,  38,   0, 
+     58,   0,   9,   0,  61,   0, 
+     19,   0,  60,   0,   9,   0, 
      19,   0,  13,   0,  17,   0, 
-      9,   0,  19,   0,   9,   0, 
-     19,   0,  13,   0,  64,   0, 
-     29,   0,  44,   0,  13,   0, 
+      9,   0,  19,   0,  13,   0, 
+     17,   0,   9,   0,  19,   0, 
+      9,   0,  19,   0,  13,   0, 
      64,   0,  29,   0,  44,   0, 
      13,   0,  64,   0,  29,   0, 
      44,   0,  13,   0,  64,   0, 
-     29,   0,  54,   0,  13,   0, 
-     64,   0,  29,   0,  63,   0, 
-     13,   0,  64,   0,  13,   0, 
-     63,   0,  13,   0, 133,   0, 
-     53,   0,  61,   0,  13,   0, 
-    133,   0,  42,   0,  63,   0, 
+     29,   0,  44,   0,  13,   0, 
+     64,   0,  29,   0,  54,   0, 
+     13,   0,  64,   0,  29,   0, 
+     63,   0,  13,   0,  64,   0, 
+     13,   0,  63,   0,  13,   0, 
+    133,   0,  53,   0,  61,   0, 
      13,   0, 133,   0,  42,   0, 
      63,   0,  13,   0, 133,   0, 
      42,   0,  63,   0,  13,   0, 
-    133,   0,  33,   0,  79,   0, 
+    133,   0,  42,   0,  63,   0, 
      13,   0, 133,   0,  33,   0, 
      79,   0,  13,   0, 133,   0, 
      33,   0,  79,   0,  13,   0, 
     133,   0,  33,   0,  79,   0, 
      13,   0, 133,   0,  33,   0, 
      79,   0,  13,   0, 133,   0, 
-     22,   0,  81,   0,  13,   0, 
+     33,   0,  79,   0,  13,   0, 
     133,   0,  22,   0,  81,   0, 
      13,   0, 133,   0,  22,   0, 
      81,   0,  13,   0, 133,   0, 
-     95,   0, 128,   0,  13,   0, 
+     22,   0,  81,   0,  13,   0, 
     133,   0,  95,   0, 128,   0, 
-     13,   0, 133,   0,  84,   0, 
-    130,   0,  13,   0, 133,   0, 
+     13,   0, 133,   0,  95,   0, 
+    128,   0,  13,   0, 133,   0, 
      84,   0, 130,   0,  13,   0, 
     133,   0,  84,   0, 130,   0, 
-     13,   0, 133,   0,  17,   0, 
-    132,   0,  13,   0,  23,   0, 
-     17,   0,  21,   0,  13,   0, 
+     13,   0, 133,   0,  84,   0, 
+    130,   0,  13,   0, 133,   0, 
+     17,   0, 132,   0,  13,   0, 
      23,   0,  17,   0,  21,   0, 
-     13,   0,  23,   0,  13,   0, 
-     23,   0,  17,   0,  69,   0, 
-     34,   0,  49,   0,  17,   0, 
+     13,   0,  23,   0,  17,   0, 
+     21,   0,  13,   0,  23,   0, 
+     13,   0,  23,   0,  17,   0, 
      69,   0,  34,   0,  49,   0, 
      17,   0,  69,   0,  34,   0, 
      49,   0,  17,   0,  69,   0, 
-     34,   0,  59,   0,  17,   0, 
-     69,   0,  34,   0,  68,   0, 
-     17,   0,  69,   0,  17,   0, 
-     68,   0,  69,   0,  69,   0, 
-     69,   0,  69,   0,   9,   0, 
+     34,   0,  49,   0,  17,   0, 
+     69,   0,  34,   0,  59,   0, 
+     17,   0,  69,   0,  34,   0, 
+     68,   0,  17,   0,  69,   0, 
+     17,   0,  68,   0,  69,   0, 
+     69,   0,  69,   0,  69,   0, 
       9,   0,   9,   0,   9,   0, 
-      5,   0,   5,   0,  42,   0, 
-     44,   0,   5,   0,   5,   0, 
+      9,   0,   5,   0,   5,   0, 
+     42,   0,  44,   0,   5,   0, 
+      5,   0,   5,   0,   5,   0, 
+      5,   0,  73,   0,  28,   0, 
+     72,   0,   5,   0,  23,   0, 
+      9,   0,  21,   0,   5,   0, 
+     23,   0,   5,   0,  23,   0, 
+      9,   0, 134,   0,  29,   0, 
+     46,   0,   9,   0, 134,   0, 
+     29,   0,  46,   0,   9,   0, 
+    134,   0,  52,   0,  69,   0, 
+      9,   0, 134,   0,  52,   0, 
+     69,   0,   9,   0, 134,   0, 
+     28,   0,  70,   0,   9,   0, 
+    134,   0,  75,   0,  92,   0, 
+      9,   0, 134,   0,  75,   0, 
+     92,   0,   9,   0, 134,   0, 
+     98,   0, 115,   0,   9,   0, 
+    134,   0,  98,   0, 115,   0, 
+      9,   0, 134,   0,  74,   0, 
+    116,   0,   9,   0, 134,   0, 
+     28,   0, 116,   0,   9,   0, 
+    134,   0,  22,   0, 118,   0, 
+      9,   0, 134,   0,  22,   0, 
+    133,   0,   9,   0,  37,   0, 
+     13,   0,  35,   0,   9,   0, 
+     37,   0,   9,   0,  37,   0, 
+     13,   0,  83,   0,  34,   0, 
+     82,   0,  13,   0,  94,   0, 
+     29,   0,  55,   0,  13,   0, 
+     94,   0,  76,   0,  92,   0, 
+     13,   0,  94,   0,  76,   0, 
+     92,   0,  13,   0,  94,   0, 
+     76,   0,  92,   0,  13,   0, 
+     94,   0,  59,   0,  93,   0, 
+     13,   0,  94,   0,  29,   0, 
+     93,   0,   9,   0,   9,   0, 
+      9,   0,   9,   0,   5,   0, 
       5,   0,   5,   0,   5,   0, 
-     73,   0,  28,   0,  72,   0, 
-      5,   0, 233,   0,  38,   0, 
-     66,   0,   5,   0, 233,   0, 
-     72,   0, 145,   0,   5,   0, 
-    233,   0,  37,   0, 146,   0, 
-      5,   0, 233,   0, 151,   0, 
-    229,   0,   5,   0, 233,   0, 
-     37,   0, 230,   0,   5,   0, 
-    233,   0,  27,   0, 232,   0, 
-      5,   0, 233,   0,  27,   0, 
-    232,   0,   5,   0,  37,   0, 
-      5,   0,  36,   0,   2,   0, 
-     41,   0,  11,   0,  39,   0, 
-      2,   0,  41,   0,   5,   0, 
-     40,   0,   2,   0,  41,   0, 
-      2,   0,  41,   0,   3,   0, 
-     31,   0,   3,   0,  30,   0, 
-     31,   0,  31,   0,  31,   0, 
-     31,   0,   2,   0,  21,   0, 
-      2,   0,  21,   0,   2,   0, 
-     21,   0,   2,   0,  21,   0, 
-      2,   0,  21,   0,   2,   0, 
-     21,   0, 246,   0,   0,   0, 
+      5,   0, 229,   0,  38,   0, 
+     66,   0,   5,   0, 229,   0, 
+     72,   0, 143,   0,   5,   0, 
+    229,   0,  37,   0, 144,   0, 
+      5,   0, 229,   0, 149,   0, 
+    225,   0,   5,   0, 229,   0, 
+     37,   0, 226,   0,   5,   0, 
+    229,   0,  27,   0, 228,   0, 
+      5,   0, 229,   0,  27,   0, 
+    228,   0,   5,   0,  37,   0, 
+      5,   0,  36,   0,   5,   0, 
+     48,   0,  16,   0,  44,   0, 
+      5,   0,  48,   0,   9,   0, 
+     46,   0,   5,   0,  48,   0, 
+      5,   0,  48,   0,   9,   0, 
+     37,   0,   9,   0,  36,   0, 
+     37,   0,  37,   0,  37,   0, 
+     37,   0,   5,   0,  24,   0, 
+      5,   0,  24,   0,   5,   0, 
+     24,   0,   5,   0,  24,   0, 
+      5,   0,  24,   0,   5,   0, 
+     24,   0, 246,   0,   0,   0, 
       4,   0,   0,   0,   0,   0, 
-      0,   0,  44,   0,   0,   0, 
+      0,   0,  56,   0,   0,   0, 
       0,   0,   0,   0,  36,   0, 
       0,   0,  72,   0,   0,   0, 
     104,   0,   0,   0, 136,   0, 
@@ -3467,6 +3910,8 @@ const BYTE UIPixelShader[] =
     208,   0,   0,   0, 244,   0, 
       0,   0,  28,   1,   0,   0, 
      64,   1,   0,   0, 100,   1, 
+      0,   0, 140,   1,   0,   0, 
+    176,   1,   0,   0, 208,   1, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3506,34 +3951,67 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-     26,   2,   0,   0,   0,   0, 
-    242, 241,  10,   0,  24,  21, 
-     21,  16,   0,   0,   1,   0, 
-      1,   0,  10,   0,  24,  21, 
-     22,  16,   0,   0,   1,   0, 
-      0,   2,  58,   0,   3,  18, 
-     13,  21,   3,   0,   2,  16, 
-      0,   0,   0,   0, 112, 111, 
-    115, 105, 116, 105, 111, 110, 
-      0, 241,  13,  21,   3,   0, 
-      2,  16,   0,   0,  16,   0, 
-     99, 111, 108, 111, 114,   0, 
-     13,  21,   3,   0,  64,   0, 
-      0,   0,  28,   0, 114,  97, 
-    100, 105, 117, 115,   0, 243, 
-    242, 241,  34,   0,   5,  21, 
-      3,   0,   0,   0,  24,  16, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,  32,   0, 
-     80, 111, 105, 110, 116,  76, 
-    105, 103, 104, 116,   0, 243, 
-    242, 241,  14,   0,  23,  21, 
-     25,  16,   0,   0,  26,   2, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,  28,   0, 
+     68, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+      0, 241,  14,   0,  23,  21, 
+     22,  16,   0,   0,  26,   2, 
       0,   0,   0,   0, 242, 241, 
-     10,   0,  24,  21,  26,  16, 
+     10,   0,  24,  21,  23,  16, 
       0,   0,   1,   0,   1,   0, 
-     10,   0,  24,  21,  27,  16, 
+     10,   0,  24,  21,  24,  16, 
       0,   0,   1,   0,   0,   2, 
+     58,   0,   3,  18,  13,  21, 
+      3,   0,   2,  16,   0,   0, 
+      0,   0, 112, 111, 115, 105, 
+    116, 105, 111, 110,   0, 241, 
+     13,  21,   3,   0,   2,  16, 
+      0,   0,  16,   0,  99, 111, 
+    108, 111, 114,   0,  13,  21, 
+      3,   0,  64,   0,   0,   0, 
+     28,   0, 114,  97, 100, 105, 
+    117, 115,   0, 243, 242, 241, 
+     34,   0,   5,  21,   3,   0, 
+      0,   0,  26,  16,   0,   0, 
+      0,   0,   0,   0,   0,   0, 
+      0,   0,  32,   0,  80, 111, 
+    105, 110, 116,  76, 105, 103, 
+    104, 116,   0, 243, 242, 241, 
+     14,   0,  23,  21,  27,  16, 
+      0,   0,  26,   2,   0,   0, 
+      0,   0, 242, 241,  10,   0, 
+     24,  21,  28,  16,   0,   0, 
+      1,   0,   1,   0,  10,   0, 
+     24,  21,  29,  16,   0,   0, 
+      1,   0,   0,   2,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3587,102 +4065,97 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+     11, 202,  49,   1,  56,   0, 
+      0,   0,   0,  16,   0,   0, 
+     31,  16,   0,   0, 136,   2, 
+      0,   0,  10,   0, 255, 255, 
+      4,   0,   0,   0, 255, 255, 
+      3,   0,   0,   0,   0,   0, 
+    124,   0,   0,   0, 124,   0, 
+      0,   0,   8,   0,   0,   0, 
+    132,   0,   0,   0,   0,   0, 
+      0,   0,  22,   0,  27,  21, 
+     64,   0,   0,   0,   4,   0, 
+      0,   0,  16,   0, 102, 108, 
+    111,  97, 116,  52,   0, 243, 
+    242, 241,  22,   0,  27,  21, 
+     64,   0,   0,   0,   2,   0, 
+      0,   0,   8,   0, 102, 108, 
+    111,  97, 116,  50,   0, 243, 
+    242, 241,  22,   0,  27,  21, 
+     64,   0,   0,   0,   3,   0, 
+      0,   0,  12,   0, 102, 108, 
+    111,  97, 116,  51,   0, 243, 
+    242, 241,  78,   0,   3,  18, 
+     13,  21,   3,   0,   0,  16, 
+      0,   0,   0,   0, 119, 111, 
+    114, 108, 100,  80, 111, 115, 
+      0, 241,  13,  21,   3,   0, 
+      0,  16,   0,   0,  16,   0, 
+    112, 111, 115, 105, 116, 105, 
+    111, 110,   0, 241,  13,  21, 
+      3,   0,   1,  16,   0,   0, 
+     32,   0, 116, 101, 120,   0, 
+    242, 241,  13,  21,   3,   0, 
+      2,  16,   0,   0,  40,   0, 
+    110, 111, 114, 109,  97, 108, 
+      0, 243, 242, 241,  38,   0, 
+      5,  21,   4,   0,   0,   0, 
+      3,  16,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+     52,   0,  80, 105, 120, 101, 
+    108,  73, 110, 112, 117, 116, 
+     84, 121, 112, 101,   0, 243, 
+    242, 241,  10,   0,   1,  18, 
+      1,   0,   0,   0,   4,  16, 
+      0,   0,  10,   0,  24,  21, 
+      0,  16,   0,   0,   1,   0, 
+      1,   0,  14,   0,   8,  16, 
+      6,  16,   0,   0,  23,   0, 
+      1,   0,   5,  16,   0,   0, 
+     14,   0,  23,  21,   0,  16, 
+      0,   0,   3,   2, 192,  74, 
+      0,   0, 242, 241,  10,   0, 
+     24,  21,   8,  16,   0,   0, 
+      1,   0,   1,   0,  10,   0, 
+     24,  21,   9,  16,   0,   0, 
+      1,   0,   0,   2,  14,   0, 
+     23,  21,   0,   0,   0,   0, 
+     10,   2, 192,  74,   0,   0, 
+    242, 241,  10,   0,  24,  21, 
+     11,  16,   0,   0,   1,   0, 
+      1,   0,  10,   0,  24,  21, 
+     12,  16,   0,   0,   1,   0, 
+      0,   2,  10,   0,  24,  21, 
+      6,  16,   0,   0,   1,   0, 
+      0,   2,  10,   0,  24,  21, 
+     64,   0,   0,   0,   1,   0, 
+      1,   0,  10,   0,  24,  21, 
+     15,  16,   0,   0,   1,   0, 
+      0,   2,  10,   0,  24,  21, 
+    116,   0,   0,   0,   1,   0, 
+      1,   0,  10,   0,  24,  21, 
+     17,  16,   0,   0,   1,   0, 
+      0,   2,  10,   0,  24,  21, 
+     98,   0,   0,   0,   1,   0, 
+      1,   0,  10,   0,  24,  21, 
+     19,  16,   0,   0,   1,   0, 
+      0,   2,  38,   0,   3,  18, 
+     13,  21,   3,   0,   2,  16, 
+      0,   0,   0,   0, 100, 105, 
+    114, 101,  99, 116, 105, 111, 
+    110,   0,  13,  21,   3,   0, 
+      2,  16,   0,   0,  16,   0, 
+     99, 111, 108, 111, 114,   0, 
+     34,   0,   5,  21,   2,   0, 
+      0,   0,  21,  16,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,  11, 202,  49,   1, 
      56,   0,   0,   0,   0,  16, 
-      0,   0,  29,  16,   0,   0, 
-    112,   2,   0,   0,  10,   0, 
+      0,   0,   0,  16,   0,   0, 
+      0,   0,   0,   0,  11,   0, 
     255, 255,   4,   0,   0,   0, 
     255, 255,   3,   0,   0,   0, 
-      0,   0, 116,   0,   0,   0, 
-    116,   0,   0,   0,   8,   0, 
-      0,   0, 124,   0,   0,   0, 
-      0,   0,   0,   0,  22,   0, 
-     27,  21,  64,   0,   0,   0, 
-      4,   0,   0,   0,  16,   0, 
-    102, 108, 111,  97, 116,  52, 
-      0, 243, 242, 241,  22,   0, 
-     27,  21,  64,   0,   0,   0, 
-      2,   0,   0,   0,   8,   0, 
-    102, 108, 111,  97, 116,  50, 
-      0, 243, 242, 241,  22,   0, 
-     27,  21,  64,   0,   0,   0, 
-      3,   0,   0,   0,  12,   0, 
-    102, 108, 111,  97, 116,  51, 
-      0, 243, 242, 241,  78,   0, 
-      3,  18,  13,  21,   3,   0, 
-      0,  16,   0,   0,   0,   0, 
-    119, 111, 114, 108, 100,  80, 
-    111, 115,   0, 241,  13,  21, 
-      3,   0,   0,  16,   0,   0, 
-     16,   0, 112, 111, 115, 105, 
-    116, 105, 111, 110,   0, 241, 
-     13,  21,   3,   0,   1,  16, 
-      0,   0,  32,   0, 116, 101, 
-    120,   0, 242, 241,  13,  21, 
-      3,   0,   2,  16,   0,   0, 
-     40,   0, 110, 111, 114, 109, 
-     97, 108,   0, 243, 242, 241, 
-     38,   0,   5,  21,   4,   0, 
-      0,   0,   3,  16,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,  52,   0,  80, 105, 
-    120, 101, 108,  73, 110, 112, 
-    117, 116,  84, 121, 112, 101, 
-      0, 243, 242, 241,  10,   0, 
-      1,  18,   1,   0,   0,   0, 
-      4,  16,   0,   0,  10,   0, 
-     24,  21,   0,  16,   0,   0, 
-      1,   0,   1,   0,  14,   0, 
-      8,  16,   6,  16,   0,   0, 
-     23,   0,   1,   0,   5,  16, 
-      0,   0,  14,   0,  23,  21, 
-      0,  16,   0,   0,   3,   2, 
-    160,  90,   0,   0, 242, 241, 
-     10,   0,  24,  21,   8,  16, 
-      0,   0,   1,   0,   1,   0, 
-     10,   0,  24,  21,   9,  16, 
-      0,   0,   1,   0,   0,   2, 
-     14,   0,  23,  21,   0,   0, 
-      0,   0,  10,   2, 160,  90, 
-      0,   0, 242, 241,  10,   0, 
-     24,  21,  11,  16,   0,   0, 
-      1,   0,   1,   0,  10,   0, 
-     24,  21,  12,  16,   0,   0, 
-      1,   0,   0,   2,  10,   0, 
-     24,  21,   6,  16,   0,   0, 
-      1,   0,   0,   2,  10,   0, 
-     24,  21,  64,   0,   0,   0, 
-      1,   0,   1,   0,  10,   0, 
-     24,  21,  15,  16,   0,   0, 
-      1,   0,   0,   2,  10,   0, 
-     24,  21, 116,   0,   0,   0, 
-      1,   0,   1,   0,  10,   0, 
-     24,  21,  17,  16,   0,   0, 
-      1,   0,   0,   2,  38,   0, 
-      3,  18,  13,  21,   3,   0, 
-      2,  16,   0,   0,   0,   0, 
-    100, 105, 114, 101,  99, 116, 
-    105, 111, 110,   0,  13,  21, 
-      3,   0,   2,  16,   0,   0, 
-     16,   0,  99, 111, 108, 111, 
-    114,   0,  34,   0,   5,  21, 
-      2,   0,   0,   0,  19,  16, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,  28,   0, 
-     68, 105, 102, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-      0, 241,  14,   0,  23,  21, 
-     20,  16,   0,   0,  11, 202, 
-     49,   1,  56,   0,   0,   0, 
-      0,  16,   0,   0,   0,  16, 
-      0,   0,   0,   0,   0,   0, 
-     11,   0, 255, 255,   4,   0, 
-      0,   0, 255, 255,   3,   0, 
-      0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3762,6 +4235,9 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+      0,   0,   0,   0,  32,  80, 
+    111, 105, 110, 116,  76, 105, 
+    103, 104, 116,  13,  10, 123, 
      13,  10,  32,  32,  32,  32, 
     102, 108, 111,  97, 116,  51, 
      32, 112, 111, 115, 105, 116, 
@@ -3773,31 +4249,54 @@ const BYTE UIPixelShader[] =
     108, 111,  97, 116,  32, 114, 
      97, 100, 105, 117, 115,  59, 
      13,  10, 125,  59,  13,  10, 
-     13,  10,  83, 116, 114, 117, 
-     99, 116, 117, 114, 101, 100, 
-     66, 117, 102, 102, 101, 114, 
-     60,  32,  68, 105, 102, 102, 
+     13,  10,  99,  98, 117, 102, 
+    102, 101, 114,  32,  84, 101, 
+    120, 116, 117, 114,  69, 102, 
+    102, 101,  99, 116,  32,  58, 
+     32, 114, 101, 103, 105, 115, 
+    116, 101, 114,  40,  98,  51, 
+     41,  13,  10, 123,  13,  10, 
+     32,  32,  32,  32,  98, 111, 
+    111, 108,  32, 101, 102, 102, 
+    101,  99, 116,  69, 110,  97, 
+     98, 108, 101, 100,  59,  13, 
+     10,  32,  32,  32,  32, 102, 
+    108, 111,  97, 116,  32, 101, 
+    102, 102, 101,  99, 116,  80, 
+    101, 114,  99, 101, 110, 116, 
+     97, 103, 101,  59,  13,  10, 
+    125,  59,  13,  10,  13,  10, 
+     83, 116, 114, 117,  99, 116, 
+    117, 114, 101, 100,  66, 117, 
+    102, 102, 101, 114,  60,  32, 
+     68, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+     32,  62,  32, 100, 105, 102, 
     117, 115, 101,  76, 105, 103, 
-    104, 116,  32,  62,  32, 100, 
-    105, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116, 115,  32, 
-     58,  32, 114, 101, 103, 105, 
-    115, 116, 101, 114,  40,  32, 
-    116,  49,  32,  41,  59,  13, 
-     10,  83, 116, 114, 117,  99, 
-    116, 117, 114, 101, 100,  66, 
-    117, 102, 102, 101, 114,  60, 
-     32,  80, 111, 105, 110, 116, 
-     76, 105, 103, 104, 116,  32, 
-     62,  32, 112, 111, 105, 110, 
-    116,  76, 105, 103, 104, 116, 
-    115,  32,  58,  32, 114, 101, 
-    103, 105, 115, 116, 101, 114, 
-     40,  32, 116,  50,  32,  41, 
-     59,  13,  10,  13,  10,  47, 
-     47,  47,  47,  47,  47,  47, 
+    104, 116, 115,  32,  58,  32, 
+    114, 101, 103, 105, 115, 116, 
+    101, 114,  40, 116,  49,  41, 
+     59,  13,  10,  83, 116, 114, 
+    117,  99, 116, 117, 114, 101, 
+    100,  66, 117, 102, 102, 101, 
+    114,  60,  32,  80, 111, 105, 
+    110, 116,  76, 105, 103, 104, 
+    116,  32,  62,  32, 112, 111, 
+    105, 110, 116,  76, 105, 103, 
+    104, 116, 115,  32,  58,  32, 
+    114, 101, 103, 105, 115, 116, 
+    101, 114,  40, 116,  50,  41, 
+     59,  13,  10,  84, 101, 120, 
+    116, 117, 114, 101,  50,  68, 
+     32,  97, 100, 100, 105, 116, 
+    105, 111, 110,  97, 108,  84, 
+    101, 120, 116, 117, 114, 101, 
+     32,  58,  32, 114, 101, 103, 
+    105, 115, 116, 101, 114,  40, 
+    116,  51,  41,  59,  13,  10, 
+     13,  10,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  32,  32,  32,  32,  32, 
+     47,  47,  47,  47,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -3812,9 +4311,10 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  13,  10,  47,  47,  32, 
-     84,  89,  80,  69,  68,  69, 
-     70,  83,  32,  47,  47,  32, 
+     32,  32,  32,  32,  13,  10, 
+     47,  47,  32,  84,  89,  80, 
+     69,  68,  69,  70,  83,  32, 
+     47,  47,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -3829,10 +4329,9 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  32,  32,  13, 
-     10,  47,  47,  47,  47,  47, 
+     32,  32,  13,  10,  47,  47, 
+     47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  47,  47,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -3847,35 +4346,35 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  13,  10, 115, 
-    116, 114, 117,  99, 116,  32, 
-     80, 105, 120, 101, 108,  73, 
-    110, 112, 117, 116,  84, 121, 
-    112, 101,  13,  10, 123,  13, 
+     32,  32,  32,  32,  32,  32, 
+     13,  10, 115, 116, 114, 117, 
+     99, 116,  32,  80, 105, 120, 
+    101, 108,  73, 110, 112, 117, 
+    116,  84, 121, 112, 101,  13, 
+     10, 123,  13,  10,  32,  32, 
+     32,  32, 102, 108, 111,  97, 
+    116,  52,  32, 119, 111, 114, 
+    108, 100,  80, 111, 115,  32, 
+     58,  32,  80,  79,  83,  73, 
+     84,  73,  79,  78,  59,  13, 
      10,  32,  32,  32,  32, 102, 
     108, 111,  97, 116,  52,  32, 
-    119, 111, 114, 108, 100,  80, 
-    111, 115,  32,  58,  32,  80, 
-     79,  83,  73,  84,  73,  79, 
-     78,  59,  13,  10,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  52,  32, 112, 111, 115, 
-    105, 116, 105, 111, 110,  32, 
-     58,  32,  83,  86,  95,  80, 
-     79,  83,  73,  84,  73,  79, 
-     78,  59,  13,  10,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  50,  32, 116, 101, 120, 
-     32,  58,  32,  84,  69,  88, 
-     67,  79,  79,  82,  68,  48, 
-     59,  13,  10,  32,  32,  32, 
-     32, 102, 108, 111,  97, 116, 
-     51,  32, 110, 111, 114, 109, 
-     97, 108,  32,  58,  32,  84, 
-     69,  88,  67,  79,  79,  82, 
-     68,  49,  59,  13,  10, 125, 
-     59,  13,  10,  13,  10,  47, 
-     47,  47,  47,  47,  47,  47, 
+    112, 111, 115, 105, 116, 105, 
+    111, 110,  32,  58,  32,  83, 
+     86,  95,  80,  79,  83,  73, 
+     84,  73,  79,  78,  59,  13, 
+     10,  32,  32,  32,  32, 102, 
+    108, 111,  97, 116,  50,  32, 
+    116, 101, 120,  32,  58,  32, 
+     84,  69,  88,  67,  79,  79, 
+     82,  68,  48,  59,  13,  10, 
+     32,  32,  32,  32, 102, 108, 
+    111,  97, 116,  51,  32, 110, 
+    111, 114, 109,  97, 108,  32, 
+     58,  32,  84,  69,  88,  67, 
+     79,  79,  82,  68,  49,  59, 
+     13,  10, 125,  59,  13,  10, 
+     13,  10,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
@@ -3888,13 +4387,14 @@ const BYTE UIPixelShader[] =
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  32,  32,  32,  32,  32, 
+     47,  47,  47,  47,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  13,  10,  47,  47,  32, 
-     80, 105, 120, 101, 108,  32, 
-     83, 104,  97, 100, 101, 114, 
+     32,  32,  32,  32,  13,  10, 
+     47,  47,  32,  80, 105, 120, 
+    101, 108,  32,  83, 104,  97, 
+    100, 101, 114,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
@@ -3909,8 +4409,8 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  32,  32,  13, 
-     10,  47,  47,  47,  47,  47, 
+     32,  32,  13,  10,  47,  47, 
+     47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
@@ -3923,124 +4423,129 @@ const BYTE UIPixelShader[] =
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
      47,  47,  47,  47,  47,  47, 
-     47,  47,  47,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  32,  13,  10, 102, 
-    108, 111,  97, 116,  52,  32, 
-     84, 101, 120, 116, 117, 114, 
-    101,  80, 105, 120, 101, 108, 
-     83, 104,  97, 100, 101, 114, 
-     40,  32,  80, 105, 120, 101, 
-    108,  73, 110, 112, 117, 116, 
-     84, 121, 112, 101,  32, 105, 
-    110, 112, 117, 116,  32,  41, 
-     32,  58,  32,  83,  86,  95, 
-     84,  65,  82,  71,  69,  84, 
-     13,  10, 123,  13,  10,  32, 
-     32,  32,  32, 102, 108, 111, 
-     97, 116,  51,  32, 100, 105, 
-    102, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116,  32,  61, 
-     32, 102, 108, 111,  97, 116, 
-     51,  40,  32,  48,  44,  32, 
-     48,  44,  32,  48,  32,  41, 
-     59,  13,  10,  32,  32,  32, 
-     32, 102, 108, 111,  97, 116, 
-     51,  32, 115, 112, 101,  99, 
-    117, 108,  97, 114,  76, 105, 
-    103, 104, 116,  32,  61,  32, 
-    102, 108, 111,  97, 116,  51, 
-     40,  32,  48,  44,  32,  48, 
-     44,  32,  48,  32,  41,  59, 
-     13,  10,  32,  32,  32,  32, 
-    102, 111, 114,  40,  32, 105, 
-    110, 116,  32, 106,  32,  61, 
-     32,  48,  59,  32, 106,  32, 
-     60,  32, 100, 105, 102, 102, 
-    117, 115, 101,  76, 105, 103, 
-    104, 116,  67, 111, 117, 110, 
-    116,  59,  32, 106,  43,  43, 
-     32,  41,  13,  10,  32,  32, 
-     32,  32, 123,  13,  10,  32, 
      32,  32,  32,  32,  32,  32, 
-     32, 105, 102,  40,  32, 100, 
-    111, 116,  40,  32, 105, 110, 
-    112, 117, 116,  46, 110, 111, 
-    114, 109,  97, 108,  44,  32, 
-     45, 100, 105, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-    115,  91,  32, 106,  32,  93, 
-     46, 100, 105, 114, 101,  99, 
-    116, 105, 111, 110,  32,  41, 
-     32,  60,  32,  48,  32,  41, 
+     13,  10, 102, 108, 111,  97, 
+    116,  52,  32,  84, 101, 120, 
+    116, 117, 114, 101,  80, 105, 
+    120, 101, 108,  83, 104,  97, 
+    100, 101, 114,  40,  32,  80, 
+    105, 120, 101, 108,  73, 110, 
+    112, 117, 116,  84, 121, 112, 
+    101,  32, 105, 110, 112, 117, 
+    116,  32,  41,  32,  58,  32, 
+     83,  86,  95,  84,  65,  82, 
+     71,  69,  84,  13,  10, 123, 
      13,  10,  32,  32,  32,  32, 
+    102, 108, 111,  97, 116,  51, 
+     32, 100, 105, 102, 102, 117, 
+    115, 101,  76, 105, 103, 104, 
+    116,  32,  61,  32, 102, 108, 
+    111,  97, 116,  51,  40,  48, 
+     44,  32,  48,  44,  32,  48, 
+     41,  59,  13,  10,  32,  32, 
+     32,  32, 102, 108, 111,  97, 
+    116,  51,  32, 115, 112, 101, 
+     99, 117, 108,  97, 114,  76, 
+    105, 103, 104, 116,  32,  61, 
+     32, 102, 108, 111,  97, 116, 
+     51,  40,  48,  44,  32,  48, 
+     44,  32,  48,  41,  59,  13, 
+     10,  32,  32,  32,  32, 102, 
+    111, 114,  40,  32, 105, 110, 
+    116,  32, 106,  32,  61,  32, 
+     48,  59,  32, 106,  32,  60, 
+     32, 100, 105, 102, 102, 117, 
+    115, 101,  76, 105, 103, 104, 
+    116,  67, 111, 117, 110, 116, 
+     59,  32, 106,  43,  43,  32, 
+     41,  13,  10,  32,  32,  32, 
+     32, 123,  13,  10,  32,  32, 
      32,  32,  32,  32,  32,  32, 
-     32,  32,  99, 111, 110, 116, 
-    105, 110, 117, 101,  59,  13, 
+    105, 102,  40,  32, 100, 111, 
+    116,  40,  32, 105, 110, 112, 
+    117, 116,  46, 110, 111, 114, 
+    109,  97, 108,  44,  32,  45, 
+    100, 105, 102, 117, 115, 101, 
+     76, 105, 103, 104, 116, 115, 
+     91,  32, 106,  32,  93,  46, 
+    100, 105, 114, 101,  99, 116, 
+    105, 111, 110,  32,  41,  32, 
+     60,  32,  48,  32,  41,  13, 
      10,  32,  32,  32,  32,  32, 
-     32,  32,  32, 100, 105, 102, 
+     32,  32,  32,  32,  32,  32, 
+     32,  99, 111, 110, 116, 105, 
+    110, 117, 101,  59,  13,  10, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32, 100, 105, 102, 102, 
+    117, 115, 101,  76, 105, 103, 
+    104, 116,  32,  43,  61,  32, 
+    100, 105, 102, 117, 115, 101, 
+     76, 105, 103, 104, 116, 115, 
+     91,  32, 106,  32,  93,  46, 
+     99, 111, 108, 111, 114,  32, 
+     42,  32, 100, 111, 116,  40, 
+     32, 105, 110, 112, 117, 116, 
+     46, 110, 111, 114, 109,  97, 
+    108,  44,  32,  45, 100, 105, 
     102, 117, 115, 101,  76, 105, 
-    103, 104, 116,  32,  43,  61, 
-     32, 100, 105, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-    115,  91,  32, 106,  32,  93, 
-     46,  99, 111, 108, 111, 114, 
-     32,  42,  32, 100, 111, 116, 
-     40,  32, 105, 110, 112, 117, 
-    116,  46, 110, 111, 114, 109, 
-     97, 108,  44,  32,  45, 100, 
-    105, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116, 115,  91, 
-     32, 106,  32,  93,  46, 100, 
-    105, 114, 101,  99, 116, 105, 
-    111, 110,  32,  41,  59,  13, 
-     10,  32,  32,  32,  32, 125, 
-     13,  10,  32,  32,  32,  32, 
-    102, 111, 114,  40,  32, 105, 
-    110, 116,  32, 105,  32,  61, 
-     32,  48,  59,  32, 105,  32, 
-     60,  32, 112, 111, 105, 110, 
-    116,  76, 105, 103, 104, 116, 
-     67, 111, 117, 110, 116,  59, 
-     32, 105,  43,  43,  32,  41, 
-     13,  10,  32,  32,  32,  32, 
-    123,  13,  10,  32,  32,  32, 
-     32,  32,  32,  32,  32, 102, 
-    108, 111,  97, 116,  51,  32, 
-    108, 105, 103, 104, 116,  68, 
-    105, 114,  32,  61,  32, 112, 
-    111, 105, 110, 116,  76, 105, 
     103, 104, 116, 115,  91,  32, 
-    105,  32,  93,  46, 112, 111, 
-    115, 105, 116, 105, 111, 110, 
-     32,  45,  32, 105, 110, 112, 
-    117, 116,  46, 119, 111, 114, 
-    108, 100,  80, 111, 115,  46, 
-    120, 121, 122,  59,  13,  10, 
-     32,  32,  32,  32,  32,  32, 
-     32,  32, 102, 108, 111,  97, 
-    116,  32, 102,  97,  99, 116, 
-    111, 114,  59,  13,  10,   9, 
-      9, 105, 102,  32,  40, 108, 
-    101, 110, 103, 116, 104,  40, 
-    108, 105, 103, 104, 116,  68, 
-    105, 114,  41,  32,  60,  32, 
-     49,  41,  13,  10,   9,   9, 
-      9, 102,  97,  99, 116, 111, 
-    114,  32,  61,  32,  49,  59, 
-     13,  10,   9,   9, 101, 108, 
-    115, 101,  13,  10,   9,   9, 
-      9, 102,  97,  99, 116, 111, 
+    106,  32,  93,  46, 100, 105, 
+    114, 101,  99, 116, 105, 111, 
+    110,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32, 125,  13, 
+     10,  32,  32,  32,  32, 102, 
+    111, 114,  40,  32, 105, 110, 
+    116,  32, 105,  32,  61,  32, 
+     48,  59,  32, 105,  32,  60, 
+     32, 112, 111, 105, 110, 116, 
+     76, 105, 103, 104, 116,  67, 
+    111, 117, 110, 116,  59,  32, 
+    105,  43,  43,  32,  41,  13, 
+     10,  32,  32,  32,  32, 123, 
+     13,  10,  32,  32,  32,  32, 
+     32,  32,  32,  32, 102, 108, 
+    111,  97, 116,  51,  32, 108, 
+    105, 103, 104, 116,  68, 105, 
     114,  32,  61,  32, 112, 111, 
     105, 110, 116,  76, 105, 103, 
-    104, 116, 115,  91, 105,  93, 
-     46, 114,  97, 100, 105, 117, 
-    115,  32,  47,  32, 108, 101, 
-    110, 103, 116, 104,  40, 108, 
-    105, 103, 104, 116,  68, 105, 
-    114,  41,  59,  13,  10,  32, 
+    104, 116, 115,  91,  32, 105, 
+     32,  93,  46, 112, 111, 115, 
+    105, 116, 105, 111, 110,  32, 
+     45,  32, 105, 110, 112, 117, 
+    116,  46, 119, 111, 114, 108, 
+    100,  80, 111, 115,  46, 120, 
+    121, 122,  59,  13,  10,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32, 102, 108, 111,  97, 116, 
+     32, 102,  97,  99, 116, 111, 
+    114,  59,  13,  10,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+    105, 102,  40,  32, 108, 101, 
+    110, 103, 116, 104,  40,  32, 
+    108, 105, 103, 104, 116,  68, 
+    105, 114,  32,  41,  32,  60, 
+     32,  49,  32,  41,  13,  10, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+    102,  97,  99, 116, 111, 114, 
+     32,  61,  32,  49,  59,  13, 
+     10,  32,  32,  32,  32,  32, 
+     32,  32,  32, 101, 108, 115, 
+    101,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32,  32, 102,  97,  99, 
+    116, 111, 114,  32,  61,  32, 
+    112, 111, 105, 110, 116,  76, 
+    105, 103, 104, 116, 115,  91, 
+     32, 105,  32,  93,  46, 114, 
+     97, 100, 105, 117, 115,  32, 
+     47,  32, 108, 101, 110, 103, 
+    116, 104,  40,  32, 108, 105, 
+    103, 104, 116,  68, 105, 114, 
+     32,  41,  59,  13,  10,  32, 
      32,  32,  32,  32,  32,  32, 
      32, 102, 108, 111,  97, 116, 
      32, 102,  32,  61,  32, 100, 
@@ -4109,16 +4614,17 @@ const BYTE UIPixelShader[] =
      10,  32,  32,  32,  32,  32, 
      32,  32,  32, 125,  13,  10, 
      32,  32,  32,  32, 125,  13, 
-     10,   9,  47,  47, 105, 102, 
-     32,  40,  33,  40, 100, 105, 
-    102, 102, 117, 115, 101,  76, 
-    105, 103, 104, 116,  46, 120, 
-     32,  62,  61,  32,  48,  32, 
-     38,  38,  32, 100, 105, 102, 
-    102, 117, 115, 101,  76, 105, 
-    103, 104, 116,  46, 120,  32, 
-     60,  61,  32,  49,  41,  41, 
-     13,  10,   9,  47,  47,   9, 
+     10,  32,  32,  32,  32,  47, 
+     47, 105, 102,  32,  40,  33, 
+     40, 100, 105, 102, 102, 117, 
+    115, 101,  76, 105, 103, 104, 
+    116,  46, 120,  32,  62,  61, 
+     32,  48,  32,  38,  38,  32, 
+    100, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+     46, 120,  32,  60,  61,  32, 
+     49,  41,  41,  13,  10,  32, 
+     32,  32,  32,  47,  47,   9, 
     100, 105, 102, 102, 117, 115, 
     101,  76, 105, 103, 104, 116, 
      46, 120,  32,  61,  32,  48, 
@@ -4135,33 +4641,102 @@ const BYTE UIPixelShader[] =
     112, 101,  44,  32, 105, 110, 
     112, 117, 116,  46, 116, 101, 
     120,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32, 105, 102, 
+     40,  32, 101, 102, 102, 101, 
+     99, 116,  69, 110,  97,  98, 
+    108, 101, 100,  32,  41,  13, 
+     10,  32,  32,  32,  32, 123, 
+     13,  10,  32,  32,  32,  32, 
      32,  32,  32,  32, 102, 108, 
-    111,  97, 116,  52,  32, 116, 
-    101, 120, 116, 117, 114, 101, 
-     67, 111, 108, 111, 114,  32, 
-     61,  32, 115,  97, 116, 117, 
-    114,  97, 116, 101,  40,  32, 
-     40, 109,  97, 116, 101, 114, 
+    111,  97, 116,  32, 100, 105, 
+    115, 116,  32,  61,  32, 115, 
+    113, 114, 116,  40,  32,  40, 
+    105, 110, 112, 117, 116,  46, 
+    116, 101, 120,  46, 120,  32, 
+     45,  32,  48,  46,  53, 102, 
+     41,  32,  42,  32,  40, 105, 
+    110, 112, 117, 116,  46, 116, 
+    101, 120,  46, 120,  32,  45, 
+     32,  48,  46,  53, 102,  41, 
+     32,  43,  32,  40, 105, 110, 
+    112, 117, 116,  46, 116, 101, 
+    120,  46, 121,  32,  45,  32, 
+     48,  46,  53, 102,  41,  32, 
+     42,  32,  40, 105, 110, 112, 
+    117, 116,  46, 116, 101, 120, 
+     46, 121,  32,  45,  32,  48, 
+     46,  53, 102,  41,  32,  41, 
+     32,  47,  32, 115, 113, 114, 
+    116,  40,  32,  48,  46,  53, 
+    102,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32, 105, 102,  40,  32, 
+    100, 105, 115, 116,  32,  60, 
+     32, 101, 102, 102, 101,  99, 
+    116,  80, 101, 114,  99, 101, 
+    110, 116,  97, 103, 101,  32, 
+     41,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32, 123, 
+     13,  10,  32,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32, 102, 108, 111,  97, 
+    116,  52,  32, 101, 102, 102, 
+    101,  99, 116,  67, 111, 108, 
+    111, 114,  32,  61,  32,  97, 
+    100, 100, 105, 116, 105, 111, 
+    110,  97, 108,  84, 101, 120, 
+    116, 117, 114, 101,  46,  83, 
+     97, 109, 112, 108, 101,  40, 
+     32,  83,  97, 109, 112, 108, 
+    101,  84, 121, 112, 101,  44, 
+     32, 105, 110, 112, 117, 116, 
+     46, 116, 101, 120,  32,  41, 
+     59,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32,  32,  32, 109,  97, 116, 
+    101, 114, 105,  97, 108,  67, 
+    111, 108, 111, 114,  32,  61, 
+     32, 101, 102, 102, 101,  99, 
+    116,  67, 111, 108, 111, 114, 
+     32,  42,  32, 101, 102, 102, 
+    101,  99, 116,  67, 111, 108, 
+    111, 114,  46,  97,  32,  43, 
+     32, 109,  97, 116, 101, 114, 
     105,  97, 108,  67, 111, 108, 
-    111, 114,  32,  42,  32,  97, 
-    109,  98, 105, 101, 110, 116, 
-     70,  97,  99, 116, 111, 114, 
-     41,  32,  43,  32,  40, 102, 
-    108, 111,  97, 116,  52,  40, 
+    111, 114,  32,  42,  32,  40, 
+     49,  32,  45,  32, 101, 102, 
+    102, 101,  99, 116,  67, 111, 
+    108, 111, 114,  46,  97,  41, 
+     59,  13,  10,  32,  32,  32, 
+     32,  32,  32,  32,  32, 125, 
+     13,  10,  32,  32,  32,  32, 
+    125,  13,  10,  32,  32,  32, 
+     32, 102, 108, 111,  97, 116, 
+     52,  32, 116, 101, 120, 116, 
+    117, 114, 101,  67, 111, 108, 
+    111, 114,  32,  61,  32, 115, 
+     97, 116, 117, 114,  97, 116, 
+    101,  40,  32,  40, 109,  97, 
+    116, 101, 114, 105,  97, 108, 
+     67, 111, 108, 111, 114,  32, 
+     42,  32,  97, 109,  98, 105, 
+    101, 110, 116,  70,  97,  99, 
+    116, 111, 114,  41,  32,  43, 
+     32,  40, 102, 108, 111,  97, 
+    116,  52,  40, 100, 105, 102, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116,  46, 120,  44, 
      32, 100, 105, 102, 102, 117, 
     115, 101,  76, 105, 103, 104, 
-    116,  46, 120,  44,  32, 100, 
+    116,  46, 121,  44,  32, 100, 
     105, 102, 102, 117, 115, 101, 
      76, 105, 103, 104, 116,  46, 
-    121,  44,  32, 100, 105, 102, 
-    102, 117, 115, 101,  76, 105, 
-    103, 104, 116,  46, 122,  44, 
-     32,  48,  32,  41,  32,  42, 
-     32, 100, 105, 102, 102, 117, 
-    115,  70,  97,  99, 116, 111, 
-    114,  41,  32,  43,  32,  40, 
-    102, 108, 111,  97, 116,  52, 
-     40,  32, 115, 112, 101,  99, 
+    122,  44,  32,  48,  41,  32, 
+     42,  32, 100, 105, 102, 102, 
+    117, 115,  70,  97,  99, 116, 
+    111, 114,  41,  32,  43,  32, 
+     40, 102, 108, 111,  97, 116, 
+     52,  40, 115, 112, 101,  99, 
     117, 108,  97, 114,  76, 105, 
     103, 104, 116,  46, 120,  44, 
      32, 115, 112, 101,  99, 117, 
@@ -4170,48 +4745,52 @@ const BYTE UIPixelShader[] =
     115, 112, 101,  99, 117, 108, 
      97, 114,  76, 105, 103, 104, 
     116,  46, 122,  44,  32,  48, 
-     32,  41,  32,  42,  32, 115, 
-    112, 101,  99, 117, 108,  97, 
-    114,  70,  97,  99, 116, 111, 
-    114,  41,  32,  41,  59,  13, 
-     10,  32,  32,  32,  32, 116, 
-    101, 120, 116, 117, 114, 101, 
-     67, 111, 108, 111, 114,  46, 
-     97,  32,  61,  32, 109,  97, 
-    116, 101, 114, 105,  97, 108, 
-     67, 111, 108, 111, 114,  46, 
-     97,  59,  13,  10,   9, 105, 
-    102,  40, 105, 115, 110,  97, 
-    110,  40, 100, 105, 102, 102, 
-    117, 115, 101,  76, 105, 103, 
-    104, 116,  46, 120,  32,  42, 
-     32, 100, 105, 102, 102, 117, 
-    115,  70,  97,  99, 116, 111, 
-    114,  41,  41,  13,  10,   9, 
-      9, 116, 101, 120, 116, 117, 
+     41,  32,  42,  32, 115, 112, 
+    101,  99, 117, 108,  97, 114, 
+     70,  97,  99, 116, 111, 114, 
+     41,  32,  41,  59,  13,  10, 
+     32,  32,  32,  32, 116, 101, 
+    120, 116, 117, 114, 101,  67, 
+    111, 108, 111, 114,  46,  97, 
+     32,  61,  32, 109,  97, 116, 
+    101, 114, 105,  97, 108,  67, 
+    111, 108, 111, 114,  46,  97, 
+     59,  13,  10,  32,  32,  32, 
+     32, 105, 102,  40,  32, 105, 
+    115, 110,  97, 110,  40,  32, 
+    100, 105, 102, 102, 117, 115, 
+    101,  76, 105, 103, 104, 116, 
+     46, 120,  32,  42,  32, 100, 
+    105, 102, 102, 117, 115,  70, 
+     97,  99, 116, 111, 114,  32, 
+     41,  32,  41,  13,  10,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32, 116, 101, 120, 116, 117, 
     114, 101,  67, 111, 108, 111, 
     114,  32,  61,  32, 109,  97, 
     116, 101, 114, 105,  97, 108, 
      67, 111, 108, 111, 114,  59, 
-     13,  10,   9, 114, 101, 116, 
-    117, 114, 110,  32, 116, 101, 
-    120, 116, 117, 114, 101,  67, 
-    111, 108, 111, 114,  59,  13, 
-     10,  32,  32,  32,  32,  47, 
-     47, 114, 101, 116, 117, 114, 
-    110,  32, 116, 101, 120, 116, 
-    117, 114, 101,  67, 111, 108, 
-    111, 114,  59,  13,  10,   9, 
+     13,  10,  32,  32,  32,  32, 
+    114, 101, 116, 117, 114, 110, 
+     32, 116, 101, 120, 116, 117, 
+    114, 101,  67, 111, 108, 111, 
+    114,  59,  13,  10,  32,  32, 
+     32,  32,  47,  47, 114, 101, 
+    116, 117, 114, 110,  32, 116, 
+    101, 120, 116, 117, 114, 101, 
+     67, 111, 108, 111, 114,  59, 
+     13,  10,  32,  32,  32,  32, 
      47,  47, 105, 102,  32,  40, 
     100, 105, 102, 102, 117, 115, 
      70,  97,  99, 116, 111, 114, 
      32,  61,  61,  32,  48,  41, 
-     13,  10,   9,  47,  47,   9, 
-    114, 101, 116, 117, 114, 110, 
-     32, 102, 108, 111,  97, 116, 
-     52,  40,  49,  44,  32,  49, 
-     44,  32,  48,  44,  32,  49, 
-     41,  59,  13,  10,   9,  47, 
+     13,  10,  32,  32,  32,  32, 
+     47,  47,   9, 114, 101, 116, 
+    117, 114, 110,  32, 102, 108, 
+    111,  97, 116,  52,  40,  49, 
+     44,  32,  49,  44,  32,  48, 
+     44,  32,  49,  41,  59,  13, 
+     10,  32,  32,  32,  32,  47, 
      42, 105, 102,  32,  40, 105, 
     115, 110,  97, 110,  40, 100, 
     105, 102, 102, 117, 115, 101, 
@@ -4229,31 +4808,34 @@ const BYTE UIPixelShader[] =
      45, 100, 105, 102, 102, 117, 
     115, 101,  76, 105, 103, 104, 
     116,  46, 120,  41,  41,  13, 
-     10,   9,   9, 114, 101, 116, 
+     10,  32,  32,  32,  32,  32, 
+     32,  32,  32, 114, 101, 116, 
     117, 114, 110,  32, 102, 108, 
     111,  97, 116,  52,  40,  48, 
      44,  32,  49,  44,  32,  49, 
      44,  32,  49,  41,  59,  13, 
-     10,   9, 105, 102,  32,  40, 
-    105, 115, 110,  97, 110,  40, 
-    100, 105, 102, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-     46, 120,  32,  45,  32, 100, 
-    105, 102, 102, 117, 115, 101, 
-     76, 105, 103, 104, 116,  46, 
-    120,  41,  32,  38,  38,  32, 
-    105, 115, 110,  97, 110,  40, 
-    100, 105, 102, 102, 117, 115, 
-    101,  76, 105, 103, 104, 116, 
-     46, 120,  32,  42,  32, 100, 
-    105, 102, 102, 117, 115,  70, 
-     97,  99, 116, 111, 114,  41, 
-     32,  41,  13,  10,   9,   9, 
-    114, 101, 116, 117, 114, 110, 
-     32, 102, 108, 111,  97, 116, 
-     52,  40,  49,  44,  32,  49, 
+     10,  32,  32,  32,  32, 105, 
+    102,  32,  40, 105, 115, 110, 
+     97, 110,  40, 100, 105, 102, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116,  46, 120,  32, 
+     45,  32, 100, 105, 102, 102, 
+    117, 115, 101,  76, 105, 103, 
+    104, 116,  46, 120,  41,  32, 
+     38,  38,  32, 105, 115, 110, 
+     97, 110,  40, 100, 105, 102, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116,  46, 120,  32, 
+     42,  32, 100, 105, 102, 102, 
+    117, 115,  70,  97,  99, 116, 
+    111, 114,  41,  32,  41,  13, 
+     10,  32,  32,  32,  32,  32, 
+     32,  32,  32, 114, 101, 116, 
+    117, 114, 110,  32, 102, 108, 
+    111,  97, 116,  52,  40,  49, 
      44,  32,  49,  44,  32,  49, 
-     41,  59,  13,  10,   9, 105, 
+     44,  32,  49,  41,  59,  13, 
+     10,  32,  32,  32,  32, 105, 
     102,  32,  40,  40, 100, 105, 
     102, 102, 117, 115, 101,  76, 
     105, 103, 104, 116,  46, 120, 
@@ -4267,48 +4849,25 @@ const BYTE UIPixelShader[] =
      32, 100, 105, 102, 102, 117, 
     115,  70,  97,  99, 116, 111, 
     114,  41,  32,  33,  61,  32, 
-     45,  48,  41,  13,  10,   9, 
-      9, 114, 101, 116, 117, 114, 
+     45,  48,  41,  13,  10,  32, 
+     32,  32,  32,  32,  32,  32, 
+     32, 114, 101, 116, 117, 114, 
     110,  32, 102, 108, 111,  97, 
     116,  52,  40,  48,  44,  32, 
      48,  44,  32,  49,  44,  32, 
-     49,  41,  59,  13,  10,   9, 
-    114, 101, 116, 117, 114, 110, 
-     32, 102, 108, 111,  97, 116, 
-     52,  40,  48,  44,  32,  49, 
-     44,  32,  48,  44,  32,  49, 
-     41,  59,  42,  47,  13,  10, 
-    125,   0,   7,   0,   0,   0, 
-      0,   0,   0,   0,  84,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,  85,   0, 
-      0,   0, 168,   0,   0,   0, 
-      1,   0,   0,   0,   4,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+     49,  41,  59,  13,  10,  32, 
+     32,  32,  32, 114, 101, 116, 
+    117, 114, 110,  32, 102, 108, 
+    111,  97, 116,  52,  40,  48, 
+     44,  32,  49,  44,  32,  48, 
+     44,  32,  49,  41,  59,  42, 
+     47,  13,  10, 125,   0,   7, 
+      0,   0,   0, 168,   0,   0, 
+      0,  84,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
+      0,  85,   0,   0,   0,   1, 
       0,   0,   0,   0,   0,   0, 
+      0,   4,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4360,7 +4919,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,  68,  51,  68,  83, 
-     72,  68,  82,   0, 152,  12, 
+     72,  68,  82,   0,  48,  15, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4446,23 +5005,27 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 255, 255, 
     255, 255,  26,   9,  47, 241, 
-     88,   0,   0,   0,  48,   2, 
-      0,   0,  37,   0,   0,   0, 
-      1,   0,   0,   0,  29,   1, 
+    112,   0,   0,   0,  60,   2, 
+      0,   0, 209,   1,   0,   0, 
+      1,   0,   0,   0,  37,   0, 
       0,   0,   1,   0,   0,   0, 
-     65,   1,   0,   0,   1,   0, 
-      0,   0, 245,   0,   0,   0, 
-      1,   0,   0,   0, 209,   0, 
+     29,   1,   0,   0,   1,   0, 
+      0,   0,  65,   1,   0,   0, 
+      1,   0,   0,   0, 141,   1, 
       0,   0,   1,   0,   0,   0, 
-    173,   0,   0,   0,   1,   0, 
-      0,   0, 101,   1,   0,   0, 
-      1,   0,   0,   0, 137,   0, 
+    245,   0,   0,   0,   1,   0, 
+      0,   0, 209,   0,   0,   0, 
+      1,   0,   0,   0, 173,   0, 
       0,   0,   1,   0,   0,   0, 
-    105,   0,   0,   0,   1,   0, 
+    177,   1,   0,   0,   1,   0, 
+      0,   0, 137,   0,   0,   0, 
+      1,   0,   0,   0, 105,   0, 
+      0,   0,   1,   0,   0,   0, 
+    101,   1,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
       1,   0,   0,   0,  73,   0, 
       0,   0,   1,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+      8,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4481,7 +5044,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
      32,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+      0,   0,   0, 128,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4534,7 +5097,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+      0,   0, 128,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4555,12 +5118,8 @@ const BYTE UIPixelShader[] =
      72,   0,   0,   0,  84,   0, 
       0,   0,  96,   0,   0,   0, 
     108,   0,   0,   0, 120,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+      0,   0, 132,   0,   0,   0, 
+    144,   0,   0,   0, 156,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4669,36 +5228,36 @@ const BYTE UIPixelShader[] =
     112, 111, 105, 110, 116,  76, 
     105, 103, 104, 116,  67, 111, 
     117, 110, 116,   0,  34,   0, 
-     81,  17,  23,  16,   0,   0, 
-      7,   0, 255, 255, 255, 255, 
-      1,   0, 255, 255, 255, 255, 
-    100, 105, 102, 117, 115, 101, 
-     76, 105, 103, 104, 116, 115, 
-      0,   0,   0,   0,  30,   0, 
-     81,  17,  28,  16,   0,   0, 
+     81,  17,  20,  16,   0,   0, 
+      8,   0,   3,   0,   0,   0, 
+    255, 255, 255, 255, 255, 255, 
+    101, 102, 102, 101,  99, 116, 
+     69, 110,  97,  98, 108, 101, 
+    100,   0,   0,   0,  38,   0, 
+     81,  17,  16,  16,   0,   0, 
+      8,   0,   3,   0,   4,   0, 
+    255, 255, 255, 255, 255, 255, 
+    101, 102, 102, 101,  99, 116, 
+     80, 101, 114,  99, 101, 110, 
+    116,  97, 103, 101,   0,   0, 
+      0,   0,  34,   0,  81,  17, 
+     25,  16,   0,   0,   7,   0, 
+    255, 255, 255, 255,   1,   0, 
+    255, 255, 255, 255, 100, 105, 
+    102, 117, 115, 101,  76, 105, 
+    103, 104, 116, 115,   0,   0, 
+      0,   0,  30,   0,  81,  17, 
+     30,  16,   0,   0,   7,   0, 
+    255, 255, 255, 255,   2,   0, 
+    255, 255, 255, 255, 112, 111, 
+    105, 110, 116,  76, 105, 103, 
+    104, 116, 115,   0,  38,   0, 
+     81,  17,  10,  16,   0,   0, 
       7,   0, 255, 255, 255, 255, 
-      2,   0, 255, 255, 255, 255, 
-    112, 111, 105, 110, 116,  76, 
-    105, 103, 104, 116, 115,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+      3,   0, 255, 255, 255, 255, 
+     97, 100, 100, 105, 116, 105, 
+    111, 110,  97, 108,  84, 101, 
+    120, 116, 117, 114, 101,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  16,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4786,11 +5345,11 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-    148,  46,  49,   1, 213, 106, 
-    170,  97,   1,   0,   0,   0, 
-    205,  46, 115,  22, 201, 124, 
-    195,  71, 191,  39, 131, 132, 
-     55, 196, 205, 231, 128,   0, 
+    148,  46,  49,   1,   5, 126, 
+    208,  97,   1,   0,   0,   0, 
+    218,  47, 137, 160, 191, 138, 
+     43,  77, 163, 110, 124, 130, 
+     92, 201, 139,  45, 128,   0, 
       0,   0,  47,  76, 105, 110, 
     107,  73, 110, 102, 111,   0, 
      47, 110,  97, 109, 101, 115, 
@@ -4873,9 +5432,9 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0, 255, 255, 255, 255, 
     119,   9,  49,   1,   1,   0, 
-      0,   0,  13,   0,  10, 140, 
-     14,   0, 180, 156,  15,   0, 
-     11,   0,  88,   0,   0,   0, 
+      0,   0,  13,   0,   0, 142, 
+     14,   0,  63,  92,  15,   0, 
+      0,   0,  88,   0,   0,   0, 
      32,   0,   0,   0,  44,   0, 
       0,   0,  96,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4884,13 +5443,13 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
-    152,  12,   0,   0,  32,   0, 
+     48,  15,   0,   0,  32,   0, 
       0,  96,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   2,   0,   9,   0, 
-    164,   7,   0,   0,   0,   0, 
-      0,   0,  68,  11,   0,   0, 
-      1,   0, 120,  90,   0,   0, 
+    124,   8,   0,   0,   0,   0, 
+      0,   0, 180,  13,   0,   0, 
+      1,   0,  46,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  84, 101, 
     120, 116, 117, 114, 101,  80, 
@@ -4898,14 +5457,14 @@ const BYTE UIPixelShader[] =
      97, 100, 101, 114,   0, 110, 
     111, 110, 101,   0,  45, 186, 
      46, 241,   1,   0,   0,   0, 
-      0,   0,   0,   0, 152,  12, 
+      0,   0,   0,   0,  48,  15, 
       0,   0,  32,   0,   0,  96, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       2,   0,   2,   0,   7,   0, 
       0,   0,   0,   0,   1,   0, 
     255, 255, 255, 255,   0,   0, 
-      0,   0, 152,  12,   0,   0, 
+      0,   0,  48,  15,   0,   0, 
       8,   2,   0,   0,   0,   0, 
       0,   0, 255, 255, 255, 255, 
       0,   0,   0,   0, 255, 255, 
@@ -4958,45 +5517,45 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,  16,   0, 
       0,   0,  32,   0,   0,   0, 
-    220,   0,   0,   0, 168,   2, 
+    220,   0,   0,   0, 192,   2, 
       0,   0, 115,   1,   0,   0, 
      56,   0,   0,   0,   0,   0, 
-      0,   0,  62,  16,   0,   0, 
-    128,   0,   0,   0, 101,  15, 
-      0,   0,  24,  19,   0,   0, 
-    124,   0,   0,   0,   0,   0, 
+      0,   0, 209,  18,   0,   0, 
+    128,   0,   0,   0, 248,  17, 
+      0,   0, 108,  22,   0,   0, 
+    132,   0,   0,   0,   0,   0, 
       0,   0,  40,   0,   0,   0, 
-    152,   2,   0,   0,  44,   0, 
-      0,   0, 132,   1,   0,   0, 
-      3,   0,   0,   0,  43,   0, 
-      0,   0,  29,   0,   0,   0, 
-     28,   0,   0,   0,  44,   0, 
-      0,   0,  30,   0,   0,   0, 
-     16,   0,   0,   0,   6,   0, 
-      0,   0,  31,   0,   0,   0, 
-     32,   0,   0,   0,  33,   0, 
+    188,   2,   0,   0,  44,   0, 
+      0,   0, 248,   1,   0,   0, 
+      3,   0,   0,   0,  47,   0, 
+      0,   0,  32,   0,   0,   0, 
+     31,   0,   0,   0,  48,   0, 
+      0,   0,  33,   0,   0,   0, 
+     17,   0,   0,   0,   6,   0, 
       0,   0,  34,   0,   0,   0, 
      35,   0,   0,   0,  36,   0, 
       0,   0,  37,   0,   0,   0, 
-     17,   0,   0,   0,   8,   0, 
-      0,   0,   9,   0,   0,   0, 
-     10,   0,   0,   0,  11,   0, 
-      0,   0,  12,   0,   0,   0, 
-     13,   0,   0,   0,  14,   0, 
-      0,   0,  15,   0,   0,   0, 
-     18,   0,   0,   0,  19,   0, 
-      0,   0,  20,   0,   0,   0, 
-     21,   0,   0,   0,  22,   0, 
-      0,   0,  23,   0,   0,   0, 
-     24,   0,   0,   0,  25,   0, 
-      0,   0,  26,   0,   0,   0, 
-     27,   0,   0,   0,   7,   0, 
-      0,   0,  38,   0,   0,   0, 
-     39,   0,   0,   0,  40,   0, 
-      0,   0,  42,   0,   0,   0, 
-     41,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+     38,   0,   0,   0,  39,   0, 
+      0,   0,  40,   0,   0,   0, 
+     41,   0,   0,   0,  18,   0, 
+      0,   0,   8,   0,   0,   0, 
+      9,   0,   0,   0,  10,   0, 
+      0,   0,  11,   0,   0,   0, 
+     12,   0,   0,   0,  13,   0, 
+      0,   0,  14,   0,   0,   0, 
+     15,   0,   0,   0,  16,   0, 
+      0,   0,  19,   0,   0,   0, 
+     20,   0,   0,   0,  21,   0, 
+      0,   0,  22,   0,   0,   0, 
+     23,   0,   0,   0,  24,   0, 
+      0,   0,  25,   0,   0,   0, 
+     26,   0,   0,   0,  27,   0, 
+      0,   0,  28,   0,   0,   0, 
+     29,   0,   0,   0,  30,   0, 
+      0,   0,   7,   0,   0,   0, 
+     42,   0,   0,   0,  43,   0, 
+      0,   0,  44,   0,   0,   0, 
+     46,   0,   0,   0,  45,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -5042,7 +5601,7 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
-     45,   0,   0,   0,   0,   0, 
+     49,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 

+ 20 - 20
UIVertexShader.h

@@ -119,10 +119,10 @@ ret
 
 const BYTE UIVertexShader[] =
 {
-     68,  88,  66,  67, 100, 188, 
-     86, 237,  50,  79, 224, 127, 
-     86, 114, 250, 141, 179, 128, 
-     69,  14,   1,   0,   0,   0, 
+     68,  88,  66,  67,  78,  21, 
+    148,  62, 204,   1,  61, 227, 
+     63, 119, 110, 201, 212, 132, 
+    205,  43,   1,   0,   0,   0, 
     168,  77,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
      20,   2,   0,   0, 168,   2, 
@@ -873,10 +873,10 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    214, 106, 170,  97,   1,   0, 
-      0,   0, 228,  37, 154,  17, 
-    203,  78, 175,  77, 174, 175, 
-    101, 226, 159,  47, 116,  36, 
+      5, 126, 208,  97,   1,   0, 
+      0,   0,  55, 178, 226,  56, 
+    229, 248, 144,  75, 143,  69, 
+    173, 209, 138,  99, 225, 170, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   1,   0,   0,   0, 
       1,   0,   0,   0,   0,   0, 
@@ -1556,8 +1556,8 @@ const BYTE UIVertexShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      27, 226,  48,   1, 128,   0, 
-      0,   0,  41,  57,  58, 244, 
-    120, 232, 215,   1,   1,   0, 
+      0,   0, 205, 123, 213, 186, 
+     42, 255, 215,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1643,9 +1643,9 @@ const BYTE UIVertexShader[] =
       0,   0,   4,   0,   0,   0, 
      66,   0,  60,  17,  16,   1, 
       0,   0,   0,   1,  10,   0, 
-      1,   0,  15,   0, 171,  63, 
-     10,   0,   1,   0,  15,   0, 
-    171,  63,  77, 105,  99, 114, 
+      1,   0, 173,   2,  97,  74, 
+     10,   0,   1,   0, 173,   2, 
+     97,  74,  77, 105,  99, 114, 
     111, 115, 111, 102, 116,  32, 
      40,  82,  41,  32,  72,  76, 
      83,  76,  32,  83, 104,  97, 
@@ -2921,10 +2921,10 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-    214, 106, 170,  97,   1,   0, 
-      0,   0, 228,  37, 154,  17, 
-    203,  78, 175,  77, 174, 175, 
-    101, 226, 159,  47, 116,  36, 
+      5, 126, 208,  97,   1,   0, 
+      0,   0,  55, 178, 226,  56, 
+    229, 248, 144,  75, 143,  69, 
+    173, 209, 138,  99, 225, 170, 
     129,   0,   0,   0,  47,  76, 
     105, 110, 107,  73, 110, 102, 
     111,   0,  47, 110,  97, 109, 
@@ -3008,8 +3008,8 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0, 255, 255, 
     255, 255, 119,   9,  49,   1, 
       1,   0,   0,   0,  13,   0, 
-     10, 140,  14,   0, 180, 156, 
-     15,   0,  11,   0,  92,   0, 
+      0, 142,  14,   0,  63,  92, 
+     15,   0,   0,   0,  92,   0, 
       0,   0,  32,   0,   0,   0, 
      44,   0,   0,   0,  96,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3024,7 +3024,7 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   2,   0, 
       9,   0,  80,   5,   0,   0, 
       0,   0,   0,   0, 236,   2, 
-      0,   0,   1,   0, 130, 192, 
+      0,   0,   1,   0, 243, 140, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
      84, 101, 120, 116, 117, 114, 

+ 4098 - 0
d3dx12.h

@@ -0,0 +1,4098 @@
+//*********************************************************
+//
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
+// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
+// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
+// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
+//
+//*********************************************************
+
+// changes made for dynamic linking of dx12.dll
+// - all occurrences of "IID_ID3D12Device" were replaced by "__uuidof(*pDevice)"
+// - the function D3DX12SerializeVersionedRootSignature has two additional functionpointer arguments pointing to the dynamically loaded fuctions of type PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE and PFN_D3D12_SERIALIZE_ROOT_SIGNATURE
+
+
+#ifndef __D3DX12_H__
+#define __D3DX12_H__
+
+#include "d3d12.h"
+
+#if defined( __cplusplus )
+
+struct CD3DX12_DEFAULT {};
+extern const DECLSPEC_SELECTANY CD3DX12_DEFAULT D3D12_DEFAULT;
+
+//------------------------------------------------------------------------------------------------
+inline bool operator==( const D3D12_VIEWPORT& l, const D3D12_VIEWPORT& r ) noexcept
+{
+    return l.TopLeftX == r.TopLeftX && l.TopLeftY == r.TopLeftY && l.Width == r.Width &&
+        l.Height == r.Height && l.MinDepth == r.MinDepth && l.MaxDepth == r.MaxDepth;
+}
+
+//------------------------------------------------------------------------------------------------
+inline bool operator!=( const D3D12_VIEWPORT& l, const D3D12_VIEWPORT& r ) noexcept
+{
+    return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RECT : public D3D12_RECT
+{
+    CD3DX12_RECT() = default;
+    explicit CD3DX12_RECT( const D3D12_RECT& o ) noexcept :
+        D3D12_RECT( o )
+    {}
+    explicit CD3DX12_RECT(
+        LONG Left,
+        LONG Top,
+        LONG Right,
+        LONG Bottom ) noexcept
+    {
+        left = Left;
+        top = Top;
+        right = Right;
+        bottom = Bottom;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_VIEWPORT : public D3D12_VIEWPORT
+{
+    CD3DX12_VIEWPORT() = default;
+    explicit CD3DX12_VIEWPORT( const D3D12_VIEWPORT& o ) noexcept :
+        D3D12_VIEWPORT( o )
+    {}
+    explicit CD3DX12_VIEWPORT(
+        FLOAT topLeftX,
+        FLOAT topLeftY,
+        FLOAT width,
+        FLOAT height,
+        FLOAT minDepth = D3D12_MIN_DEPTH,
+        FLOAT maxDepth = D3D12_MAX_DEPTH ) noexcept
+    {
+        TopLeftX = topLeftX;
+        TopLeftY = topLeftY;
+        Width = width;
+        Height = height;
+        MinDepth = minDepth;
+        MaxDepth = maxDepth;
+    }
+    explicit CD3DX12_VIEWPORT(
+        _In_ ID3D12Resource* pResource,
+        UINT mipSlice = 0,
+        FLOAT topLeftX = 0.0f,
+        FLOAT topLeftY = 0.0f,
+        FLOAT minDepth = D3D12_MIN_DEPTH,
+        FLOAT maxDepth = D3D12_MAX_DEPTH ) noexcept
+    {
+        auto Desc = pResource->GetDesc();
+        const UINT64 SubresourceWidth = Desc.Width >> mipSlice;
+        const UINT64 SubresourceHeight = Desc.Height >> mipSlice;
+        switch( Desc.Dimension )
+        {
+        case D3D12_RESOURCE_DIMENSION_BUFFER:
+            TopLeftX = topLeftX;
+            TopLeftY = 0.0f;
+            Width = float( Desc.Width ) - topLeftX;
+            Height = 1.0f;
+            break;
+        case D3D12_RESOURCE_DIMENSION_TEXTURE1D:
+            TopLeftX = topLeftX;
+            TopLeftY = 0.0f;
+            Width = (SubresourceWidth ? float( SubresourceWidth ) : 1.0f) - topLeftX;
+            Height = 1.0f;
+            break;
+        case D3D12_RESOURCE_DIMENSION_TEXTURE2D:
+        case D3D12_RESOURCE_DIMENSION_TEXTURE3D:
+            TopLeftX = topLeftX;
+            TopLeftY = topLeftY;
+            Width = (SubresourceWidth ? float( SubresourceWidth ) : 1.0f) - topLeftX;
+            Height = (SubresourceHeight ? float( SubresourceHeight ) : 1.0f) - topLeftY;
+            break;
+        default: break;
+        }
+
+        MinDepth = minDepth;
+        MaxDepth = maxDepth;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_BOX : public D3D12_BOX
+{
+    CD3DX12_BOX() = default;
+    explicit CD3DX12_BOX( const D3D12_BOX& o ) noexcept :
+        D3D12_BOX( o )
+    {}
+    explicit CD3DX12_BOX(
+        LONG Left,
+        LONG Right ) noexcept
+    {
+        left = static_cast<UINT>(Left);
+        top = 0;
+        front = 0;
+        right = static_cast<UINT>(Right);
+        bottom = 1;
+        back = 1;
+    }
+    explicit CD3DX12_BOX(
+        LONG Left,
+        LONG Top,
+        LONG Right,
+        LONG Bottom ) noexcept
+    {
+        left = static_cast<UINT>(Left);
+        top = static_cast<UINT>(Top);
+        front = 0;
+        right = static_cast<UINT>(Right);
+        bottom = static_cast<UINT>(Bottom);
+        back = 1;
+    }
+    explicit CD3DX12_BOX(
+        LONG Left,
+        LONG Top,
+        LONG Front,
+        LONG Right,
+        LONG Bottom,
+        LONG Back ) noexcept
+    {
+        left = static_cast<UINT>(Left);
+        top = static_cast<UINT>(Top);
+        front = static_cast<UINT>(Front);
+        right = static_cast<UINT>(Right);
+        bottom = static_cast<UINT>(Bottom);
+        back = static_cast<UINT>(Back);
+    }
+};
+inline bool operator==( const D3D12_BOX& l, const D3D12_BOX& r ) noexcept
+{
+    return l.left == r.left && l.top == r.top && l.front == r.front &&
+        l.right == r.right && l.bottom == r.bottom && l.back == r.back;
+}
+inline bool operator!=( const D3D12_BOX& l, const D3D12_BOX& r ) noexcept
+{
+    return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DEPTH_STENCIL_DESC : public D3D12_DEPTH_STENCIL_DESC
+{
+    CD3DX12_DEPTH_STENCIL_DESC() = default;
+    explicit CD3DX12_DEPTH_STENCIL_DESC( const D3D12_DEPTH_STENCIL_DESC& o ) noexcept :
+        D3D12_DEPTH_STENCIL_DESC( o )
+    {}
+    explicit CD3DX12_DEPTH_STENCIL_DESC( CD3DX12_DEFAULT ) noexcept
+    {
+        DepthEnable = TRUE;
+        DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+        DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+        StencilEnable = FALSE;
+        StencilReadMask = D3D12_DEFAULT_STENCIL_READ_MASK;
+        StencilWriteMask = D3D12_DEFAULT_STENCIL_WRITE_MASK;
+        const D3D12_DEPTH_STENCILOP_DESC defaultStencilOp =
+        { D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_COMPARISON_FUNC_ALWAYS };
+        FrontFace = defaultStencilOp;
+        BackFace = defaultStencilOp;
+    }
+    explicit CD3DX12_DEPTH_STENCIL_DESC(
+        BOOL depthEnable,
+        D3D12_DEPTH_WRITE_MASK depthWriteMask,
+        D3D12_COMPARISON_FUNC depthFunc,
+        BOOL stencilEnable,
+        UINT8 stencilReadMask,
+        UINT8 stencilWriteMask,
+        D3D12_STENCIL_OP frontStencilFailOp,
+        D3D12_STENCIL_OP frontStencilDepthFailOp,
+        D3D12_STENCIL_OP frontStencilPassOp,
+        D3D12_COMPARISON_FUNC frontStencilFunc,
+        D3D12_STENCIL_OP backStencilFailOp,
+        D3D12_STENCIL_OP backStencilDepthFailOp,
+        D3D12_STENCIL_OP backStencilPassOp,
+        D3D12_COMPARISON_FUNC backStencilFunc ) noexcept
+    {
+        DepthEnable = depthEnable;
+        DepthWriteMask = depthWriteMask;
+        DepthFunc = depthFunc;
+        StencilEnable = stencilEnable;
+        StencilReadMask = stencilReadMask;
+        StencilWriteMask = stencilWriteMask;
+        FrontFace.StencilFailOp = frontStencilFailOp;
+        FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
+        FrontFace.StencilPassOp = frontStencilPassOp;
+        FrontFace.StencilFunc = frontStencilFunc;
+        BackFace.StencilFailOp = backStencilFailOp;
+        BackFace.StencilDepthFailOp = backStencilDepthFailOp;
+        BackFace.StencilPassOp = backStencilPassOp;
+        BackFace.StencilFunc = backStencilFunc;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DEPTH_STENCIL_DESC1 : public D3D12_DEPTH_STENCIL_DESC1
+{
+    CD3DX12_DEPTH_STENCIL_DESC1() = default;
+    explicit CD3DX12_DEPTH_STENCIL_DESC1( const D3D12_DEPTH_STENCIL_DESC1& o ) noexcept :
+        D3D12_DEPTH_STENCIL_DESC1( o )
+    {}
+    explicit CD3DX12_DEPTH_STENCIL_DESC1( const D3D12_DEPTH_STENCIL_DESC& o ) noexcept
+    {
+        DepthEnable = o.DepthEnable;
+        DepthWriteMask = o.DepthWriteMask;
+        DepthFunc = o.DepthFunc;
+        StencilEnable = o.StencilEnable;
+        StencilReadMask = o.StencilReadMask;
+        StencilWriteMask = o.StencilWriteMask;
+        FrontFace.StencilFailOp = o.FrontFace.StencilFailOp;
+        FrontFace.StencilDepthFailOp = o.FrontFace.StencilDepthFailOp;
+        FrontFace.StencilPassOp = o.FrontFace.StencilPassOp;
+        FrontFace.StencilFunc = o.FrontFace.StencilFunc;
+        BackFace.StencilFailOp = o.BackFace.StencilFailOp;
+        BackFace.StencilDepthFailOp = o.BackFace.StencilDepthFailOp;
+        BackFace.StencilPassOp = o.BackFace.StencilPassOp;
+        BackFace.StencilFunc = o.BackFace.StencilFunc;
+        DepthBoundsTestEnable = FALSE;
+    }
+    explicit CD3DX12_DEPTH_STENCIL_DESC1( CD3DX12_DEFAULT ) noexcept
+    {
+        DepthEnable = TRUE;
+        DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+        DepthFunc = D3D12_COMPARISON_FUNC_LESS;
+        StencilEnable = FALSE;
+        StencilReadMask = D3D12_DEFAULT_STENCIL_READ_MASK;
+        StencilWriteMask = D3D12_DEFAULT_STENCIL_WRITE_MASK;
+        const D3D12_DEPTH_STENCILOP_DESC defaultStencilOp =
+        { D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_COMPARISON_FUNC_ALWAYS };
+        FrontFace = defaultStencilOp;
+        BackFace = defaultStencilOp;
+        DepthBoundsTestEnable = FALSE;
+    }
+    explicit CD3DX12_DEPTH_STENCIL_DESC1(
+        BOOL depthEnable,
+        D3D12_DEPTH_WRITE_MASK depthWriteMask,
+        D3D12_COMPARISON_FUNC depthFunc,
+        BOOL stencilEnable,
+        UINT8 stencilReadMask,
+        UINT8 stencilWriteMask,
+        D3D12_STENCIL_OP frontStencilFailOp,
+        D3D12_STENCIL_OP frontStencilDepthFailOp,
+        D3D12_STENCIL_OP frontStencilPassOp,
+        D3D12_COMPARISON_FUNC frontStencilFunc,
+        D3D12_STENCIL_OP backStencilFailOp,
+        D3D12_STENCIL_OP backStencilDepthFailOp,
+        D3D12_STENCIL_OP backStencilPassOp,
+        D3D12_COMPARISON_FUNC backStencilFunc,
+        BOOL depthBoundsTestEnable ) noexcept
+    {
+        DepthEnable = depthEnable;
+        DepthWriteMask = depthWriteMask;
+        DepthFunc = depthFunc;
+        StencilEnable = stencilEnable;
+        StencilReadMask = stencilReadMask;
+        StencilWriteMask = stencilWriteMask;
+        FrontFace.StencilFailOp = frontStencilFailOp;
+        FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
+        FrontFace.StencilPassOp = frontStencilPassOp;
+        FrontFace.StencilFunc = frontStencilFunc;
+        BackFace.StencilFailOp = backStencilFailOp;
+        BackFace.StencilDepthFailOp = backStencilDepthFailOp;
+        BackFace.StencilPassOp = backStencilPassOp;
+        BackFace.StencilFunc = backStencilFunc;
+        DepthBoundsTestEnable = depthBoundsTestEnable;
+    }
+    operator D3D12_DEPTH_STENCIL_DESC() const noexcept
+    {
+        D3D12_DEPTH_STENCIL_DESC D;
+        D.DepthEnable = DepthEnable;
+        D.DepthWriteMask = DepthWriteMask;
+        D.DepthFunc = DepthFunc;
+        D.StencilEnable = StencilEnable;
+        D.StencilReadMask = StencilReadMask;
+        D.StencilWriteMask = StencilWriteMask;
+        D.FrontFace.StencilFailOp = FrontFace.StencilFailOp;
+        D.FrontFace.StencilDepthFailOp = FrontFace.StencilDepthFailOp;
+        D.FrontFace.StencilPassOp = FrontFace.StencilPassOp;
+        D.FrontFace.StencilFunc = FrontFace.StencilFunc;
+        D.BackFace.StencilFailOp = BackFace.StencilFailOp;
+        D.BackFace.StencilDepthFailOp = BackFace.StencilDepthFailOp;
+        D.BackFace.StencilPassOp = BackFace.StencilPassOp;
+        D.BackFace.StencilFunc = BackFace.StencilFunc;
+        return D;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_BLEND_DESC : public D3D12_BLEND_DESC
+{
+    CD3DX12_BLEND_DESC() = default;
+    explicit CD3DX12_BLEND_DESC( const D3D12_BLEND_DESC& o ) noexcept :
+        D3D12_BLEND_DESC( o )
+    {}
+    explicit CD3DX12_BLEND_DESC( CD3DX12_DEFAULT ) noexcept
+    {
+        AlphaToCoverageEnable = FALSE;
+        IndependentBlendEnable = FALSE;
+        const D3D12_RENDER_TARGET_BLEND_DESC defaultRenderTargetBlendDesc =
+        {
+            FALSE,FALSE,
+            D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD,
+            D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD,
+            D3D12_LOGIC_OP_NOOP,
+            D3D12_COLOR_WRITE_ENABLE_ALL,
+        };
+        for( UINT i = 0; i < D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i )
+            RenderTarget[ i ] = defaultRenderTargetBlendDesc;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RASTERIZER_DESC : public D3D12_RASTERIZER_DESC
+{
+    CD3DX12_RASTERIZER_DESC() = default;
+    explicit CD3DX12_RASTERIZER_DESC( const D3D12_RASTERIZER_DESC& o ) noexcept :
+        D3D12_RASTERIZER_DESC( o )
+    {}
+    explicit CD3DX12_RASTERIZER_DESC( CD3DX12_DEFAULT ) noexcept
+    {
+        FillMode = D3D12_FILL_MODE_SOLID;
+        CullMode = D3D12_CULL_MODE_BACK;
+        FrontCounterClockwise = FALSE;
+        DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+        DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+        SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+        DepthClipEnable = TRUE;
+        MultisampleEnable = FALSE;
+        AntialiasedLineEnable = FALSE;
+        ForcedSampleCount = 0;
+        ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+    }
+    explicit CD3DX12_RASTERIZER_DESC(
+        D3D12_FILL_MODE fillMode,
+        D3D12_CULL_MODE cullMode,
+        BOOL frontCounterClockwise,
+        INT depthBias,
+        FLOAT depthBiasClamp,
+        FLOAT slopeScaledDepthBias,
+        BOOL depthClipEnable,
+        BOOL multisampleEnable,
+        BOOL antialiasedLineEnable,
+        UINT forcedSampleCount,
+        D3D12_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster ) noexcept
+    {
+        FillMode = fillMode;
+        CullMode = cullMode;
+        FrontCounterClockwise = frontCounterClockwise;
+        DepthBias = depthBias;
+        DepthBiasClamp = depthBiasClamp;
+        SlopeScaledDepthBias = slopeScaledDepthBias;
+        DepthClipEnable = depthClipEnable;
+        MultisampleEnable = multisampleEnable;
+        AntialiasedLineEnable = antialiasedLineEnable;
+        ForcedSampleCount = forcedSampleCount;
+        ConservativeRaster = conservativeRaster;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_ALLOCATION_INFO : public D3D12_RESOURCE_ALLOCATION_INFO
+{
+    CD3DX12_RESOURCE_ALLOCATION_INFO() = default;
+    explicit CD3DX12_RESOURCE_ALLOCATION_INFO( const D3D12_RESOURCE_ALLOCATION_INFO& o ) noexcept :
+        D3D12_RESOURCE_ALLOCATION_INFO( o )
+    {}
+    CD3DX12_RESOURCE_ALLOCATION_INFO(
+        UINT64 size,
+        UINT64 alignment ) noexcept
+    {
+        SizeInBytes = size;
+        Alignment = alignment;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_HEAP_PROPERTIES : public D3D12_HEAP_PROPERTIES
+{
+    CD3DX12_HEAP_PROPERTIES() = default;
+    explicit CD3DX12_HEAP_PROPERTIES( const D3D12_HEAP_PROPERTIES& o ) noexcept :
+        D3D12_HEAP_PROPERTIES( o )
+    {}
+    CD3DX12_HEAP_PROPERTIES(
+        D3D12_CPU_PAGE_PROPERTY cpuPageProperty,
+        D3D12_MEMORY_POOL memoryPoolPreference,
+        UINT creationNodeMask = 1,
+        UINT nodeMask = 1 ) noexcept
+    {
+        Type = D3D12_HEAP_TYPE_CUSTOM;
+        CPUPageProperty = cpuPageProperty;
+        MemoryPoolPreference = memoryPoolPreference;
+        CreationNodeMask = creationNodeMask;
+        VisibleNodeMask = nodeMask;
+    }
+    explicit CD3DX12_HEAP_PROPERTIES(
+        D3D12_HEAP_TYPE type,
+        UINT creationNodeMask = 1,
+        UINT nodeMask = 1 ) noexcept
+    {
+        Type = type;
+        CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+        MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+        CreationNodeMask = creationNodeMask;
+        VisibleNodeMask = nodeMask;
+    }
+    bool IsCPUAccessible() const noexcept
+    {
+        return Type == D3D12_HEAP_TYPE_UPLOAD || Type == D3D12_HEAP_TYPE_READBACK || (Type == D3D12_HEAP_TYPE_CUSTOM &&
+                                                                                       (CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE || CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_WRITE_BACK));
+    }
+};
+inline bool operator==( const D3D12_HEAP_PROPERTIES& l, const D3D12_HEAP_PROPERTIES& r ) noexcept
+{
+    return l.Type == r.Type && l.CPUPageProperty == r.CPUPageProperty &&
+        l.MemoryPoolPreference == r.MemoryPoolPreference &&
+        l.CreationNodeMask == r.CreationNodeMask &&
+        l.VisibleNodeMask == r.VisibleNodeMask;
+}
+inline bool operator!=( const D3D12_HEAP_PROPERTIES& l, const D3D12_HEAP_PROPERTIES& r ) noexcept
+{
+    return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_HEAP_DESC : public D3D12_HEAP_DESC
+{
+    CD3DX12_HEAP_DESC() = default;
+    explicit CD3DX12_HEAP_DESC( const D3D12_HEAP_DESC& o ) noexcept :
+        D3D12_HEAP_DESC( o )
+    {}
+    CD3DX12_HEAP_DESC(
+        UINT64 size,
+        D3D12_HEAP_PROPERTIES properties,
+        UINT64 alignment = 0,
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE ) noexcept
+    {
+        SizeInBytes = size;
+        Properties = properties;
+        Alignment = alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC(
+        UINT64 size,
+        D3D12_HEAP_TYPE type,
+        UINT64 alignment = 0,
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE ) noexcept
+    {
+        SizeInBytes = size;
+        Properties = CD3DX12_HEAP_PROPERTIES( type );
+        Alignment = alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC(
+        UINT64 size,
+        D3D12_CPU_PAGE_PROPERTY cpuPageProperty,
+        D3D12_MEMORY_POOL memoryPoolPreference,
+        UINT64 alignment = 0,
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE ) noexcept
+    {
+        SizeInBytes = size;
+        Properties = CD3DX12_HEAP_PROPERTIES( cpuPageProperty, memoryPoolPreference );
+        Alignment = alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC(
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_HEAP_PROPERTIES properties,
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE ) noexcept
+    {
+        SizeInBytes = resAllocInfo.SizeInBytes;
+        Properties = properties;
+        Alignment = resAllocInfo.Alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC(
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_HEAP_TYPE type,
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE ) noexcept
+    {
+        SizeInBytes = resAllocInfo.SizeInBytes;
+        Properties = CD3DX12_HEAP_PROPERTIES( type );
+        Alignment = resAllocInfo.Alignment;
+        Flags = flags;
+    }
+    CD3DX12_HEAP_DESC(
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_CPU_PAGE_PROPERTY cpuPageProperty,
+        D3D12_MEMORY_POOL memoryPoolPreference,
+        D3D12_HEAP_FLAGS flags = D3D12_HEAP_FLAG_NONE ) noexcept
+    {
+        SizeInBytes = resAllocInfo.SizeInBytes;
+        Properties = CD3DX12_HEAP_PROPERTIES( cpuPageProperty, memoryPoolPreference );
+        Alignment = resAllocInfo.Alignment;
+        Flags = flags;
+    }
+    bool IsCPUAccessible() const noexcept
+    {
+        return static_cast<const CD3DX12_HEAP_PROPERTIES*>(&Properties)->IsCPUAccessible();
+    }
+};
+inline bool operator==( const D3D12_HEAP_DESC& l, const D3D12_HEAP_DESC& r ) noexcept
+{
+    return l.SizeInBytes == r.SizeInBytes &&
+        l.Properties == r.Properties &&
+        l.Alignment == r.Alignment &&
+        l.Flags == r.Flags;
+}
+inline bool operator!=( const D3D12_HEAP_DESC& l, const D3D12_HEAP_DESC& r ) noexcept
+{
+    return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_CLEAR_VALUE : public D3D12_CLEAR_VALUE
+{
+    CD3DX12_CLEAR_VALUE() = default;
+    explicit CD3DX12_CLEAR_VALUE( const D3D12_CLEAR_VALUE& o ) noexcept :
+        D3D12_CLEAR_VALUE( o )
+    {}
+    CD3DX12_CLEAR_VALUE(
+        DXGI_FORMAT format,
+        const FLOAT color[ 4 ] ) noexcept
+    {
+        Format = format;
+        memcpy( Color, color, sizeof( Color ) );
+    }
+    CD3DX12_CLEAR_VALUE(
+        DXGI_FORMAT format,
+        FLOAT depth,
+        UINT8 stencil ) noexcept
+    {
+        Format = format;
+        memset( &Color, 0, sizeof( Color ) );
+        /* Use memcpy to preserve NAN values */
+        memcpy( &DepthStencil.Depth, &depth, sizeof( depth ) );
+        DepthStencil.Stencil = stencil;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RANGE : public D3D12_RANGE
+{
+    CD3DX12_RANGE() = default;
+    explicit CD3DX12_RANGE( const D3D12_RANGE& o ) noexcept :
+        D3D12_RANGE( o )
+    {}
+    CD3DX12_RANGE(
+        SIZE_T begin,
+        SIZE_T end ) noexcept
+    {
+        Begin = begin;
+        End = end;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RANGE_UINT64 : public D3D12_RANGE_UINT64
+{
+    CD3DX12_RANGE_UINT64() = default;
+    explicit CD3DX12_RANGE_UINT64( const D3D12_RANGE_UINT64& o ) noexcept :
+        D3D12_RANGE_UINT64( o )
+    {}
+    CD3DX12_RANGE_UINT64(
+        UINT64 begin,
+        UINT64 end ) noexcept
+    {
+        Begin = begin;
+        End = end;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_RANGE_UINT64 : public D3D12_SUBRESOURCE_RANGE_UINT64
+{
+    CD3DX12_SUBRESOURCE_RANGE_UINT64() = default;
+    explicit CD3DX12_SUBRESOURCE_RANGE_UINT64( const D3D12_SUBRESOURCE_RANGE_UINT64& o ) noexcept :
+        D3D12_SUBRESOURCE_RANGE_UINT64( o )
+    {}
+    CD3DX12_SUBRESOURCE_RANGE_UINT64(
+        UINT subresource,
+        const D3D12_RANGE_UINT64& range ) noexcept
+    {
+        Subresource = subresource;
+        Range = range;
+    }
+    CD3DX12_SUBRESOURCE_RANGE_UINT64(
+        UINT subresource,
+        UINT64 begin,
+        UINT64 end ) noexcept
+    {
+        Subresource = subresource;
+        Range.Begin = begin;
+        Range.End = end;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SHADER_BYTECODE : public D3D12_SHADER_BYTECODE
+{
+    CD3DX12_SHADER_BYTECODE() = default;
+    explicit CD3DX12_SHADER_BYTECODE( const D3D12_SHADER_BYTECODE& o ) noexcept :
+        D3D12_SHADER_BYTECODE( o )
+    {}
+    CD3DX12_SHADER_BYTECODE(
+        _In_ ID3DBlob* pShaderBlob ) noexcept
+    {
+        pShaderBytecode = pShaderBlob->GetBufferPointer();
+        BytecodeLength = pShaderBlob->GetBufferSize();
+    }
+    CD3DX12_SHADER_BYTECODE(
+        const void* _pShaderBytecode,
+        SIZE_T bytecodeLength ) noexcept
+    {
+        pShaderBytecode = _pShaderBytecode;
+        BytecodeLength = bytecodeLength;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILED_RESOURCE_COORDINATE : public D3D12_TILED_RESOURCE_COORDINATE
+{
+    CD3DX12_TILED_RESOURCE_COORDINATE() = default;
+    explicit CD3DX12_TILED_RESOURCE_COORDINATE( const D3D12_TILED_RESOURCE_COORDINATE& o ) noexcept :
+        D3D12_TILED_RESOURCE_COORDINATE( o )
+    {}
+    CD3DX12_TILED_RESOURCE_COORDINATE(
+        UINT x,
+        UINT y,
+        UINT z,
+        UINT subresource ) noexcept
+    {
+        X = x;
+        Y = y;
+        Z = z;
+        Subresource = subresource;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILE_REGION_SIZE : public D3D12_TILE_REGION_SIZE
+{
+    CD3DX12_TILE_REGION_SIZE() = default;
+    explicit CD3DX12_TILE_REGION_SIZE( const D3D12_TILE_REGION_SIZE& o ) noexcept :
+        D3D12_TILE_REGION_SIZE( o )
+    {}
+    CD3DX12_TILE_REGION_SIZE(
+        UINT numTiles,
+        BOOL useBox,
+        UINT width,
+        UINT16 height,
+        UINT16 depth ) noexcept
+    {
+        NumTiles = numTiles;
+        UseBox = useBox;
+        Width = width;
+        Height = height;
+        Depth = depth;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_TILING : public D3D12_SUBRESOURCE_TILING
+{
+    CD3DX12_SUBRESOURCE_TILING() = default;
+    explicit CD3DX12_SUBRESOURCE_TILING( const D3D12_SUBRESOURCE_TILING& o ) noexcept :
+        D3D12_SUBRESOURCE_TILING( o )
+    {}
+    CD3DX12_SUBRESOURCE_TILING(
+        UINT widthInTiles,
+        UINT16 heightInTiles,
+        UINT16 depthInTiles,
+        UINT startTileIndexInOverallResource ) noexcept
+    {
+        WidthInTiles = widthInTiles;
+        HeightInTiles = heightInTiles;
+        DepthInTiles = depthInTiles;
+        StartTileIndexInOverallResource = startTileIndexInOverallResource;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TILE_SHAPE : public D3D12_TILE_SHAPE
+{
+    CD3DX12_TILE_SHAPE() = default;
+    explicit CD3DX12_TILE_SHAPE( const D3D12_TILE_SHAPE& o ) noexcept :
+        D3D12_TILE_SHAPE( o )
+    {}
+    CD3DX12_TILE_SHAPE(
+        UINT widthInTexels,
+        UINT heightInTexels,
+        UINT depthInTexels ) noexcept
+    {
+        WidthInTexels = widthInTexels;
+        HeightInTexels = heightInTexels;
+        DepthInTexels = depthInTexels;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_BARRIER : public D3D12_RESOURCE_BARRIER
+{
+    CD3DX12_RESOURCE_BARRIER() = default;
+    explicit CD3DX12_RESOURCE_BARRIER( const D3D12_RESOURCE_BARRIER& o ) noexcept :
+        D3D12_RESOURCE_BARRIER( o )
+    {}
+    static inline CD3DX12_RESOURCE_BARRIER Transition(
+        _In_ ID3D12Resource* pResource,
+        D3D12_RESOURCE_STATES stateBefore,
+        D3D12_RESOURCE_STATES stateAfter,
+        UINT subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES,
+        D3D12_RESOURCE_BARRIER_FLAGS flags = D3D12_RESOURCE_BARRIER_FLAG_NONE ) noexcept
+    {
+        CD3DX12_RESOURCE_BARRIER result = {};
+        D3D12_RESOURCE_BARRIER& barrier = result;
+        result.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+        result.Flags = flags;
+        barrier.Transition.pResource = pResource;
+        barrier.Transition.StateBefore = stateBefore;
+        barrier.Transition.StateAfter = stateAfter;
+        barrier.Transition.Subresource = subresource;
+        return result;
+    }
+    static inline CD3DX12_RESOURCE_BARRIER Aliasing(
+        _In_ ID3D12Resource* pResourceBefore,
+        _In_ ID3D12Resource* pResourceAfter ) noexcept
+    {
+        CD3DX12_RESOURCE_BARRIER result = {};
+        D3D12_RESOURCE_BARRIER& barrier = result;
+        result.Type = D3D12_RESOURCE_BARRIER_TYPE_ALIASING;
+        barrier.Aliasing.pResourceBefore = pResourceBefore;
+        barrier.Aliasing.pResourceAfter = pResourceAfter;
+        return result;
+    }
+    static inline CD3DX12_RESOURCE_BARRIER UAV(
+        _In_ ID3D12Resource* pResource ) noexcept
+    {
+        CD3DX12_RESOURCE_BARRIER result = {};
+        D3D12_RESOURCE_BARRIER& barrier = result;
+        result.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
+        barrier.UAV.pResource = pResource;
+        return result;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_PACKED_MIP_INFO : public D3D12_PACKED_MIP_INFO
+{
+    CD3DX12_PACKED_MIP_INFO() = default;
+    explicit CD3DX12_PACKED_MIP_INFO( const D3D12_PACKED_MIP_INFO& o ) noexcept :
+        D3D12_PACKED_MIP_INFO( o )
+    {}
+    CD3DX12_PACKED_MIP_INFO(
+        UINT8 numStandardMips,
+        UINT8 numPackedMips,
+        UINT numTilesForPackedMips,
+        UINT startTileIndexInOverallResource ) noexcept
+    {
+        NumStandardMips = numStandardMips;
+        NumPackedMips = numPackedMips;
+        NumTilesForPackedMips = numTilesForPackedMips;
+        StartTileIndexInOverallResource = startTileIndexInOverallResource;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_SUBRESOURCE_FOOTPRINT : public D3D12_SUBRESOURCE_FOOTPRINT
+{
+    CD3DX12_SUBRESOURCE_FOOTPRINT() = default;
+    explicit CD3DX12_SUBRESOURCE_FOOTPRINT( const D3D12_SUBRESOURCE_FOOTPRINT& o ) noexcept :
+        D3D12_SUBRESOURCE_FOOTPRINT( o )
+    {}
+    CD3DX12_SUBRESOURCE_FOOTPRINT(
+        DXGI_FORMAT format,
+        UINT width,
+        UINT height,
+        UINT depth,
+        UINT rowPitch ) noexcept
+    {
+        Format = format;
+        Width = width;
+        Height = height;
+        Depth = depth;
+        RowPitch = rowPitch;
+    }
+    explicit CD3DX12_SUBRESOURCE_FOOTPRINT(
+        const D3D12_RESOURCE_DESC& resDesc,
+        UINT rowPitch ) noexcept
+    {
+        Format = resDesc.Format;
+        Width = UINT( resDesc.Width );
+        Height = resDesc.Height;
+        Depth = (resDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? resDesc.DepthOrArraySize : 1);
+        RowPitch = rowPitch;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_TEXTURE_COPY_LOCATION : public D3D12_TEXTURE_COPY_LOCATION
+{
+    CD3DX12_TEXTURE_COPY_LOCATION() = default;
+    explicit CD3DX12_TEXTURE_COPY_LOCATION( const D3D12_TEXTURE_COPY_LOCATION& o ) noexcept :
+        D3D12_TEXTURE_COPY_LOCATION( o )
+    {}
+    CD3DX12_TEXTURE_COPY_LOCATION( _In_ ID3D12Resource* pRes ) noexcept
+    {
+        pResource = pRes;
+        Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+        PlacedFootprint = {};
+    }
+    CD3DX12_TEXTURE_COPY_LOCATION( _In_ ID3D12Resource* pRes, D3D12_PLACED_SUBRESOURCE_FOOTPRINT const& Footprint ) noexcept
+    {
+        pResource = pRes;
+        Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
+        PlacedFootprint = Footprint;
+    }
+    CD3DX12_TEXTURE_COPY_LOCATION( _In_ ID3D12Resource* pRes, UINT Sub ) noexcept
+    {
+        pResource = pRes;
+        Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+        PlacedFootprint = {};
+        SubresourceIndex = Sub;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DESCRIPTOR_RANGE : public D3D12_DESCRIPTOR_RANGE
+{
+    CD3DX12_DESCRIPTOR_RANGE() = default;
+    explicit CD3DX12_DESCRIPTOR_RANGE( const D3D12_DESCRIPTOR_RANGE& o ) noexcept :
+        D3D12_DESCRIPTOR_RANGE( o )
+    {}
+    CD3DX12_DESCRIPTOR_RANGE(
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ) noexcept
+    {
+        Init( rangeType, numDescriptors, baseShaderRegister, registerSpace, offsetInDescriptorsFromTableStart );
+    }
+
+    inline void Init(
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ) noexcept
+    {
+        Init( *this, rangeType, numDescriptors, baseShaderRegister, registerSpace, offsetInDescriptorsFromTableStart );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_DESCRIPTOR_RANGE& range,
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ) noexcept
+    {
+        range.RangeType = rangeType;
+        range.NumDescriptors = numDescriptors;
+        range.BaseShaderRegister = baseShaderRegister;
+        range.RegisterSpace = registerSpace;
+        range.OffsetInDescriptorsFromTableStart = offsetInDescriptorsFromTableStart;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_DESCRIPTOR_TABLE : public D3D12_ROOT_DESCRIPTOR_TABLE
+{
+    CD3DX12_ROOT_DESCRIPTOR_TABLE() = default;
+    explicit CD3DX12_ROOT_DESCRIPTOR_TABLE( const D3D12_ROOT_DESCRIPTOR_TABLE& o ) noexcept :
+        D3D12_ROOT_DESCRIPTOR_TABLE( o )
+    {}
+    CD3DX12_ROOT_DESCRIPTOR_TABLE(
+        UINT numDescriptorRanges,
+        _In_reads_opt_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE* _pDescriptorRanges ) noexcept
+    {
+        Init( numDescriptorRanges, _pDescriptorRanges );
+    }
+
+    inline void Init(
+        UINT numDescriptorRanges,
+        _In_reads_opt_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE* _pDescriptorRanges ) noexcept
+    {
+        Init( *this, numDescriptorRanges, _pDescriptorRanges );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_ROOT_DESCRIPTOR_TABLE& rootDescriptorTable,
+        UINT numDescriptorRanges,
+        _In_reads_opt_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE* _pDescriptorRanges ) noexcept
+    {
+        rootDescriptorTable.NumDescriptorRanges = numDescriptorRanges;
+        rootDescriptorTable.pDescriptorRanges = _pDescriptorRanges;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_CONSTANTS : public D3D12_ROOT_CONSTANTS
+{
+    CD3DX12_ROOT_CONSTANTS() = default;
+    explicit CD3DX12_ROOT_CONSTANTS( const D3D12_ROOT_CONSTANTS& o ) noexcept :
+        D3D12_ROOT_CONSTANTS( o )
+    {}
+    CD3DX12_ROOT_CONSTANTS(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0 ) noexcept
+    {
+        Init( num32BitValues, shaderRegister, registerSpace );
+    }
+
+    inline void Init(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0 ) noexcept
+    {
+        Init( *this, num32BitValues, shaderRegister, registerSpace );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_ROOT_CONSTANTS& rootConstants,
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0 ) noexcept
+    {
+        rootConstants.Num32BitValues = num32BitValues;
+        rootConstants.ShaderRegister = shaderRegister;
+        rootConstants.RegisterSpace = registerSpace;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_DESCRIPTOR : public D3D12_ROOT_DESCRIPTOR
+{
+    CD3DX12_ROOT_DESCRIPTOR() = default;
+    explicit CD3DX12_ROOT_DESCRIPTOR( const D3D12_ROOT_DESCRIPTOR& o ) noexcept :
+        D3D12_ROOT_DESCRIPTOR( o )
+    {}
+    CD3DX12_ROOT_DESCRIPTOR(
+        UINT shaderRegister,
+        UINT registerSpace = 0 ) noexcept
+    {
+        Init( shaderRegister, registerSpace );
+    }
+
+    inline void Init(
+        UINT shaderRegister,
+        UINT registerSpace = 0 ) noexcept
+    {
+        Init( *this, shaderRegister, registerSpace );
+    }
+
+    static inline void Init( _Out_ D3D12_ROOT_DESCRIPTOR& table, UINT shaderRegister, UINT registerSpace = 0 ) noexcept
+    {
+        table.ShaderRegister = shaderRegister;
+        table.RegisterSpace = registerSpace;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_PARAMETER : public D3D12_ROOT_PARAMETER
+{
+    CD3DX12_ROOT_PARAMETER() = default;
+    explicit CD3DX12_ROOT_PARAMETER( const D3D12_ROOT_PARAMETER& o ) noexcept :
+        D3D12_ROOT_PARAMETER( o )
+    {}
+
+    static inline void InitAsDescriptorTable(
+        _Out_ D3D12_ROOT_PARAMETER& rootParam,
+        UINT numDescriptorRanges,
+        _In_reads_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE* pDescriptorRanges,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR_TABLE::Init( rootParam.DescriptorTable, numDescriptorRanges, pDescriptorRanges );
+    }
+
+    static inline void InitAsConstants(
+        _Out_ D3D12_ROOT_PARAMETER& rootParam,
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_CONSTANTS::Init( rootParam.Constants, num32BitValues, shaderRegister, registerSpace );
+    }
+
+    static inline void InitAsConstantBufferView(
+        _Out_ D3D12_ROOT_PARAMETER& rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR::Init( rootParam.Descriptor, shaderRegister, registerSpace );
+    }
+
+    static inline void InitAsShaderResourceView(
+        _Out_ D3D12_ROOT_PARAMETER& rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_SRV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR::Init( rootParam.Descriptor, shaderRegister, registerSpace );
+    }
+
+    static inline void InitAsUnorderedAccessView(
+        _Out_ D3D12_ROOT_PARAMETER& rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR::Init( rootParam.Descriptor, shaderRegister, registerSpace );
+    }
+
+    inline void InitAsDescriptorTable(
+        UINT numDescriptorRanges,
+        _In_reads_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE* pDescriptorRanges,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsDescriptorTable( *this, numDescriptorRanges, pDescriptorRanges, visibility );
+    }
+
+    inline void InitAsConstants(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsConstants( *this, num32BitValues, shaderRegister, registerSpace, visibility );
+    }
+
+    inline void InitAsConstantBufferView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsConstantBufferView( *this, shaderRegister, registerSpace, visibility );
+    }
+
+    inline void InitAsShaderResourceView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsShaderResourceView( *this, shaderRegister, registerSpace, visibility );
+    }
+
+    inline void InitAsUnorderedAccessView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsUnorderedAccessView( *this, shaderRegister, registerSpace, visibility );
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_STATIC_SAMPLER_DESC : public D3D12_STATIC_SAMPLER_DESC
+{
+    CD3DX12_STATIC_SAMPLER_DESC() = default;
+    explicit CD3DX12_STATIC_SAMPLER_DESC( const D3D12_STATIC_SAMPLER_DESC& o ) noexcept :
+        D3D12_STATIC_SAMPLER_DESC( o )
+    {}
+    CD3DX12_STATIC_SAMPLER_DESC(
+        UINT shaderRegister,
+        D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
+        D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        FLOAT mipLODBias = 0,
+        UINT maxAnisotropy = 16,
+        D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
+        D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
+        FLOAT minLOD = 0.f,
+        FLOAT maxLOD = D3D12_FLOAT32_MAX,
+        D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
+        UINT registerSpace = 0 ) noexcept
+    {
+        Init(
+            shaderRegister,
+            filter,
+            addressU,
+            addressV,
+            addressW,
+            mipLODBias,
+            maxAnisotropy,
+            comparisonFunc,
+            borderColor,
+            minLOD,
+            maxLOD,
+            shaderVisibility,
+            registerSpace );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_STATIC_SAMPLER_DESC& samplerDesc,
+        UINT shaderRegister,
+        D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
+        D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        FLOAT mipLODBias = 0,
+        UINT maxAnisotropy = 16,
+        D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
+        D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
+        FLOAT minLOD = 0.f,
+        FLOAT maxLOD = D3D12_FLOAT32_MAX,
+        D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
+        UINT registerSpace = 0 ) noexcept
+    {
+        samplerDesc.ShaderRegister = shaderRegister;
+        samplerDesc.Filter = filter;
+        samplerDesc.AddressU = addressU;
+        samplerDesc.AddressV = addressV;
+        samplerDesc.AddressW = addressW;
+        samplerDesc.MipLODBias = mipLODBias;
+        samplerDesc.MaxAnisotropy = maxAnisotropy;
+        samplerDesc.ComparisonFunc = comparisonFunc;
+        samplerDesc.BorderColor = borderColor;
+        samplerDesc.MinLOD = minLOD;
+        samplerDesc.MaxLOD = maxLOD;
+        samplerDesc.ShaderVisibility = shaderVisibility;
+        samplerDesc.RegisterSpace = registerSpace;
+    }
+    inline void Init(
+        UINT shaderRegister,
+        D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,
+        D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,
+        FLOAT mipLODBias = 0,
+        UINT maxAnisotropy = 16,
+        D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL,
+        D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,
+        FLOAT minLOD = 0.f,
+        FLOAT maxLOD = D3D12_FLOAT32_MAX,
+        D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
+        UINT registerSpace = 0 ) noexcept
+    {
+        Init(
+            *this,
+            shaderRegister,
+            filter,
+            addressU,
+            addressV,
+            addressW,
+            mipLODBias,
+            maxAnisotropy,
+            comparisonFunc,
+            borderColor,
+            minLOD,
+            maxLOD,
+            shaderVisibility,
+            registerSpace );
+    }
+
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_SIGNATURE_DESC : public D3D12_ROOT_SIGNATURE_DESC
+{
+    CD3DX12_ROOT_SIGNATURE_DESC() = default;
+    explicit CD3DX12_ROOT_SIGNATURE_DESC( const D3D12_ROOT_SIGNATURE_DESC& o ) noexcept :
+        D3D12_ROOT_SIGNATURE_DESC( o )
+    {}
+    CD3DX12_ROOT_SIGNATURE_DESC(
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        Init( numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags );
+    }
+    CD3DX12_ROOT_SIGNATURE_DESC( CD3DX12_DEFAULT ) noexcept
+    {
+        Init( 0, nullptr, 0, nullptr, D3D12_ROOT_SIGNATURE_FLAG_NONE );
+    }
+
+    inline void Init(
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        Init( *this, numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_ROOT_SIGNATURE_DESC& desc,
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        desc.NumParameters = numParameters;
+        desc.pParameters = _pParameters;
+        desc.NumStaticSamplers = numStaticSamplers;
+        desc.pStaticSamplers = _pStaticSamplers;
+        desc.Flags = flags;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_DESCRIPTOR_RANGE1 : public D3D12_DESCRIPTOR_RANGE1
+{
+    CD3DX12_DESCRIPTOR_RANGE1() = default;
+    explicit CD3DX12_DESCRIPTOR_RANGE1( const D3D12_DESCRIPTOR_RANGE1& o ) noexcept :
+        D3D12_DESCRIPTOR_RANGE1( o )
+    {}
+    CD3DX12_DESCRIPTOR_RANGE1(
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        D3D12_DESCRIPTOR_RANGE_FLAGS flags = D3D12_DESCRIPTOR_RANGE_FLAG_NONE,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ) noexcept
+    {
+        Init( rangeType, numDescriptors, baseShaderRegister, registerSpace, flags, offsetInDescriptorsFromTableStart );
+    }
+
+    inline void Init(
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        D3D12_DESCRIPTOR_RANGE_FLAGS flags = D3D12_DESCRIPTOR_RANGE_FLAG_NONE,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ) noexcept
+    {
+        Init( *this, rangeType, numDescriptors, baseShaderRegister, registerSpace, flags, offsetInDescriptorsFromTableStart );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_DESCRIPTOR_RANGE1& range,
+        D3D12_DESCRIPTOR_RANGE_TYPE rangeType,
+        UINT numDescriptors,
+        UINT baseShaderRegister,
+        UINT registerSpace = 0,
+        D3D12_DESCRIPTOR_RANGE_FLAGS flags = D3D12_DESCRIPTOR_RANGE_FLAG_NONE,
+        UINT offsetInDescriptorsFromTableStart =
+        D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND ) noexcept
+    {
+        range.RangeType = rangeType;
+        range.NumDescriptors = numDescriptors;
+        range.BaseShaderRegister = baseShaderRegister;
+        range.RegisterSpace = registerSpace;
+        range.Flags = flags;
+        range.OffsetInDescriptorsFromTableStart = offsetInDescriptorsFromTableStart;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_DESCRIPTOR_TABLE1 : public D3D12_ROOT_DESCRIPTOR_TABLE1
+{
+    CD3DX12_ROOT_DESCRIPTOR_TABLE1() = default;
+    explicit CD3DX12_ROOT_DESCRIPTOR_TABLE1( const D3D12_ROOT_DESCRIPTOR_TABLE1& o ) noexcept :
+        D3D12_ROOT_DESCRIPTOR_TABLE1( o )
+    {}
+    CD3DX12_ROOT_DESCRIPTOR_TABLE1(
+        UINT numDescriptorRanges,
+        _In_reads_opt_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE1* _pDescriptorRanges ) noexcept
+    {
+        Init( numDescriptorRanges, _pDescriptorRanges );
+    }
+
+    inline void Init(
+        UINT numDescriptorRanges,
+        _In_reads_opt_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE1* _pDescriptorRanges ) noexcept
+    {
+        Init( *this, numDescriptorRanges, _pDescriptorRanges );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_ROOT_DESCRIPTOR_TABLE1& rootDescriptorTable,
+        UINT numDescriptorRanges,
+        _In_reads_opt_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE1* _pDescriptorRanges ) noexcept
+    {
+        rootDescriptorTable.NumDescriptorRanges = numDescriptorRanges;
+        rootDescriptorTable.pDescriptorRanges = _pDescriptorRanges;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_DESCRIPTOR1 : public D3D12_ROOT_DESCRIPTOR1
+{
+    CD3DX12_ROOT_DESCRIPTOR1() = default;
+    explicit CD3DX12_ROOT_DESCRIPTOR1( const D3D12_ROOT_DESCRIPTOR1& o ) noexcept :
+        D3D12_ROOT_DESCRIPTOR1( o )
+    {}
+    CD3DX12_ROOT_DESCRIPTOR1(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE ) noexcept
+    {
+        Init( shaderRegister, registerSpace, flags );
+    }
+
+    inline void Init(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE ) noexcept
+    {
+        Init( *this, shaderRegister, registerSpace, flags );
+    }
+
+    static inline void Init(
+        _Out_ D3D12_ROOT_DESCRIPTOR1& table,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE ) noexcept
+    {
+        table.ShaderRegister = shaderRegister;
+        table.RegisterSpace = registerSpace;
+        table.Flags = flags;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_ROOT_PARAMETER1 : public D3D12_ROOT_PARAMETER1
+{
+    CD3DX12_ROOT_PARAMETER1() = default;
+    explicit CD3DX12_ROOT_PARAMETER1( const D3D12_ROOT_PARAMETER1& o ) noexcept :
+        D3D12_ROOT_PARAMETER1( o )
+    {}
+
+    static inline void InitAsDescriptorTable(
+        _Out_ D3D12_ROOT_PARAMETER1& rootParam,
+        UINT numDescriptorRanges,
+        _In_reads_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE1* pDescriptorRanges,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR_TABLE1::Init( rootParam.DescriptorTable, numDescriptorRanges, pDescriptorRanges );
+    }
+
+    static inline void InitAsConstants(
+        _Out_ D3D12_ROOT_PARAMETER1& rootParam,
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_CONSTANTS::Init( rootParam.Constants, num32BitValues, shaderRegister, registerSpace );
+    }
+
+    static inline void InitAsConstantBufferView(
+        _Out_ D3D12_ROOT_PARAMETER1& rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_CBV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR1::Init( rootParam.Descriptor, shaderRegister, registerSpace, flags );
+    }
+
+    static inline void InitAsShaderResourceView(
+        _Out_ D3D12_ROOT_PARAMETER1& rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_SRV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR1::Init( rootParam.Descriptor, shaderRegister, registerSpace, flags );
+    }
+
+    static inline void InitAsUnorderedAccessView(
+        _Out_ D3D12_ROOT_PARAMETER1& rootParam,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        rootParam.ParameterType = D3D12_ROOT_PARAMETER_TYPE_UAV;
+        rootParam.ShaderVisibility = visibility;
+        CD3DX12_ROOT_DESCRIPTOR1::Init( rootParam.Descriptor, shaderRegister, registerSpace, flags );
+    }
+
+    inline void InitAsDescriptorTable(
+        UINT numDescriptorRanges,
+        _In_reads_( numDescriptorRanges ) const D3D12_DESCRIPTOR_RANGE1* pDescriptorRanges,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsDescriptorTable( *this, numDescriptorRanges, pDescriptorRanges, visibility );
+    }
+
+    inline void InitAsConstants(
+        UINT num32BitValues,
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsConstants( *this, num32BitValues, shaderRegister, registerSpace, visibility );
+    }
+
+    inline void InitAsConstantBufferView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsConstantBufferView( *this, shaderRegister, registerSpace, flags, visibility );
+    }
+
+    inline void InitAsShaderResourceView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsShaderResourceView( *this, shaderRegister, registerSpace, flags, visibility );
+    }
+
+    inline void InitAsUnorderedAccessView(
+        UINT shaderRegister,
+        UINT registerSpace = 0,
+        D3D12_ROOT_DESCRIPTOR_FLAGS flags = D3D12_ROOT_DESCRIPTOR_FLAG_NONE,
+        D3D12_SHADER_VISIBILITY visibility = D3D12_SHADER_VISIBILITY_ALL ) noexcept
+    {
+        InitAsUnorderedAccessView( *this, shaderRegister, registerSpace, flags, visibility );
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC : public D3D12_VERSIONED_ROOT_SIGNATURE_DESC
+{
+    CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC() = default;
+    explicit CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC( const D3D12_VERSIONED_ROOT_SIGNATURE_DESC& o ) noexcept :
+        D3D12_VERSIONED_ROOT_SIGNATURE_DESC( o )
+    {}
+    explicit CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC( const D3D12_ROOT_SIGNATURE_DESC& o ) noexcept
+    {
+        Version = D3D_ROOT_SIGNATURE_VERSION_1_0;
+        Desc_1_0 = o;
+    }
+    explicit CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC( const D3D12_ROOT_SIGNATURE_DESC1& o ) noexcept
+    {
+        Version = D3D_ROOT_SIGNATURE_VERSION_1_1;
+        Desc_1_1 = o;
+    }
+    CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        Init_1_0( numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags );
+    }
+    CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC(
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER1* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        Init_1_1( numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags );
+    }
+    CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC( CD3DX12_DEFAULT ) noexcept
+    {
+        Init_1_1( 0, nullptr, 0, nullptr, D3D12_ROOT_SIGNATURE_FLAG_NONE );
+    }
+
+    inline void Init_1_0(
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        Init_1_0( *this, numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags );
+    }
+
+    static inline void Init_1_0(
+        _Out_ D3D12_VERSIONED_ROOT_SIGNATURE_DESC& desc,
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        desc.Version = D3D_ROOT_SIGNATURE_VERSION_1_0;
+        desc.Desc_1_0.NumParameters = numParameters;
+        desc.Desc_1_0.pParameters = _pParameters;
+        desc.Desc_1_0.NumStaticSamplers = numStaticSamplers;
+        desc.Desc_1_0.pStaticSamplers = _pStaticSamplers;
+        desc.Desc_1_0.Flags = flags;
+    }
+
+    inline void Init_1_1(
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER1* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        Init_1_1( *this, numParameters, _pParameters, numStaticSamplers, _pStaticSamplers, flags );
+    }
+
+    static inline void Init_1_1(
+        _Out_ D3D12_VERSIONED_ROOT_SIGNATURE_DESC& desc,
+        UINT numParameters,
+        _In_reads_opt_( numParameters ) const D3D12_ROOT_PARAMETER1* _pParameters,
+        UINT numStaticSamplers = 0,
+        _In_reads_opt_( numStaticSamplers ) const D3D12_STATIC_SAMPLER_DESC* _pStaticSamplers = nullptr,
+        D3D12_ROOT_SIGNATURE_FLAGS flags = D3D12_ROOT_SIGNATURE_FLAG_NONE ) noexcept
+    {
+        desc.Version = D3D_ROOT_SIGNATURE_VERSION_1_1;
+        desc.Desc_1_1.NumParameters = numParameters;
+        desc.Desc_1_1.pParameters = _pParameters;
+        desc.Desc_1_1.NumStaticSamplers = numStaticSamplers;
+        desc.Desc_1_1.pStaticSamplers = _pStaticSamplers;
+        desc.Desc_1_1.Flags = flags;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
+{
+    CD3DX12_CPU_DESCRIPTOR_HANDLE() = default;
+    explicit CD3DX12_CPU_DESCRIPTOR_HANDLE( const D3D12_CPU_DESCRIPTOR_HANDLE& o ) noexcept :
+        D3D12_CPU_DESCRIPTOR_HANDLE( o )
+    {}
+    CD3DX12_CPU_DESCRIPTOR_HANDLE( CD3DX12_DEFAULT ) noexcept { ptr = 0; }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE( _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other, INT offsetScaledByIncrementSize ) noexcept
+    {
+        InitOffsetted( other, offsetScaledByIncrementSize );
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE( _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other, INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        InitOffsetted( other, offsetInDescriptors, descriptorIncrementSize );
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset( INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        ptr = SIZE_T( INT64( ptr ) + INT64( offsetInDescriptors ) * INT64( descriptorIncrementSize ) );
+        return *this;
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset( INT offsetScaledByIncrementSize ) noexcept
+    {
+        ptr = SIZE_T( INT64( ptr ) + INT64( offsetScaledByIncrementSize ) );
+        return *this;
+    }
+    bool operator==( _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other ) const noexcept
+    {
+        return (ptr == other.ptr);
+    }
+    bool operator!=( _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other ) const noexcept
+    {
+        return (ptr != other.ptr);
+    }
+    CD3DX12_CPU_DESCRIPTOR_HANDLE& operator=( const D3D12_CPU_DESCRIPTOR_HANDLE& other ) noexcept
+    {
+        ptr = other.ptr;
+        return *this;
+    }
+
+    inline void InitOffsetted( _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& base, INT offsetScaledByIncrementSize ) noexcept
+    {
+        InitOffsetted( *this, base, offsetScaledByIncrementSize );
+    }
+
+    inline void InitOffsetted( _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& base, INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        InitOffsetted( *this, base, offsetInDescriptors, descriptorIncrementSize );
+    }
+
+    static inline void InitOffsetted( _Out_ D3D12_CPU_DESCRIPTOR_HANDLE& handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& base, INT offsetScaledByIncrementSize ) noexcept
+    {
+        handle.ptr = SIZE_T( INT64( base.ptr ) + INT64( offsetScaledByIncrementSize ) );
+    }
+
+    static inline void InitOffsetted( _Out_ D3D12_CPU_DESCRIPTOR_HANDLE& handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE& base, INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        handle.ptr = SIZE_T( INT64( base.ptr ) + INT64( offsetInDescriptors ) * INT64( descriptorIncrementSize ) );
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
+{
+    CD3DX12_GPU_DESCRIPTOR_HANDLE() = default;
+    explicit CD3DX12_GPU_DESCRIPTOR_HANDLE( const D3D12_GPU_DESCRIPTOR_HANDLE& o ) noexcept :
+        D3D12_GPU_DESCRIPTOR_HANDLE( o )
+    {}
+    CD3DX12_GPU_DESCRIPTOR_HANDLE( CD3DX12_DEFAULT ) noexcept { ptr = 0; }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE( _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other, INT offsetScaledByIncrementSize ) noexcept
+    {
+        InitOffsetted( other, offsetScaledByIncrementSize );
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE( _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other, INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        InitOffsetted( other, offsetInDescriptors, descriptorIncrementSize );
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset( INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        ptr = UINT64( INT64( ptr ) + INT64( offsetInDescriptors ) * INT64( descriptorIncrementSize ) );
+        return *this;
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset( INT offsetScaledByIncrementSize ) noexcept
+    {
+        ptr = UINT64( INT64( ptr ) + INT64( offsetScaledByIncrementSize ) );
+        return *this;
+    }
+    inline bool operator==( _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other ) const noexcept
+    {
+        return (ptr == other.ptr);
+    }
+    inline bool operator!=( _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other ) const noexcept
+    {
+        return (ptr != other.ptr);
+    }
+    CD3DX12_GPU_DESCRIPTOR_HANDLE& operator=( const D3D12_GPU_DESCRIPTOR_HANDLE& other ) noexcept
+    {
+        ptr = other.ptr;
+        return *this;
+    }
+
+    inline void InitOffsetted( _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& base, INT offsetScaledByIncrementSize ) noexcept
+    {
+        InitOffsetted( *this, base, offsetScaledByIncrementSize );
+    }
+
+    inline void InitOffsetted( _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& base, INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        InitOffsetted( *this, base, offsetInDescriptors, descriptorIncrementSize );
+    }
+
+    static inline void InitOffsetted( _Out_ D3D12_GPU_DESCRIPTOR_HANDLE& handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& base, INT offsetScaledByIncrementSize ) noexcept
+    {
+        handle.ptr = UINT64( INT64( base.ptr ) + INT64( offsetScaledByIncrementSize ) );
+    }
+
+    static inline void InitOffsetted( _Out_ D3D12_GPU_DESCRIPTOR_HANDLE& handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE& base, INT offsetInDescriptors, UINT descriptorIncrementSize ) noexcept
+    {
+        handle.ptr = UINT64( INT64( base.ptr ) + INT64( offsetInDescriptors ) * INT64( descriptorIncrementSize ) );
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+inline constexpr UINT D3D12CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT PlaneSlice, UINT MipLevels, UINT ArraySize ) noexcept
+{
+    return MipSlice + ArraySlice * MipLevels + PlaneSlice * MipLevels * ArraySize;
+}
+
+//------------------------------------------------------------------------------------------------
+template <typename T, typename U, typename V>
+inline void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels, UINT ArraySize, _Out_ T& MipSlice, _Out_ U& ArraySlice, _Out_ V& PlaneSlice ) noexcept
+{
+    MipSlice = static_cast<T>(Subresource % MipLevels);
+    ArraySlice = static_cast<U>((Subresource / MipLevels) % ArraySize);
+    PlaneSlice = static_cast<V>(Subresource / (MipLevels * ArraySize));
+}
+
+//------------------------------------------------------------------------------------------------
+inline UINT8 D3D12GetFormatPlaneCount(
+    _In_ ID3D12Device* pDevice,
+    DXGI_FORMAT Format
+) noexcept
+{
+    D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = { Format, 0 };
+    if( FAILED( pDevice->CheckFeatureSupport( D3D12_FEATURE_FORMAT_INFO, &formatInfo, sizeof( formatInfo ) ) ) )
+    {
+        return 0;
+    }
+    return formatInfo.PlaneCount;
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_DESC : public D3D12_RESOURCE_DESC
+{
+    CD3DX12_RESOURCE_DESC() = default;
+    explicit CD3DX12_RESOURCE_DESC( const D3D12_RESOURCE_DESC& o ) noexcept :
+        D3D12_RESOURCE_DESC( o )
+    {}
+    CD3DX12_RESOURCE_DESC(
+        D3D12_RESOURCE_DIMENSION dimension,
+        UINT64 alignment,
+        UINT64 width,
+        UINT height,
+        UINT16 depthOrArraySize,
+        UINT16 mipLevels,
+        DXGI_FORMAT format,
+        UINT sampleCount,
+        UINT sampleQuality,
+        D3D12_TEXTURE_LAYOUT layout,
+        D3D12_RESOURCE_FLAGS flags ) noexcept
+    {
+        Dimension = dimension;
+        Alignment = alignment;
+        Width = width;
+        Height = height;
+        DepthOrArraySize = depthOrArraySize;
+        MipLevels = mipLevels;
+        Format = format;
+        SampleDesc.Count = sampleCount;
+        SampleDesc.Quality = sampleQuality;
+        Layout = layout;
+        Flags = flags;
+    }
+    static inline CD3DX12_RESOURCE_DESC Buffer(
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_BUFFER, resAllocInfo.Alignment, resAllocInfo.SizeInBytes,
+                                      1, 1, 1, DXGI_FORMAT_UNKNOWN, 1, 0, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Buffer(
+        UINT64 width,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_BUFFER, alignment, width, 1, 1, 1,
+                                      DXGI_FORMAT_UNKNOWN, 1, 0, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Tex1D(
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT16 arraySize = 1,
+        UINT16 mipLevels = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_TEXTURE1D, alignment, width, 1, arraySize,
+                                      mipLevels, format, 1, 0, layout, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Tex2D(
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT height,
+        UINT16 arraySize = 1,
+        UINT16 mipLevels = 0,
+        UINT sampleCount = 1,
+        UINT sampleQuality = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_TEXTURE2D, alignment, width, height, arraySize,
+                                      mipLevels, format, sampleCount, sampleQuality, layout, flags );
+    }
+    static inline CD3DX12_RESOURCE_DESC Tex3D(
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT height,
+        UINT16 depth,
+        UINT16 mipLevels = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC( D3D12_RESOURCE_DIMENSION_TEXTURE3D, alignment, width, height, depth,
+                                      mipLevels, format, 1, 0, layout, flags );
+    }
+    inline UINT16 Depth() const noexcept
+    {
+        return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1);
+    }
+    inline UINT16 ArraySize() const noexcept
+    {
+        return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1);
+    }
+    inline UINT8 PlaneCount( _In_ ID3D12Device* pDevice ) const noexcept
+    {
+        return D3D12GetFormatPlaneCount( pDevice, Format );
+    }
+    inline UINT Subresources( _In_ ID3D12Device* pDevice ) const noexcept
+    {
+        return MipLevels * ArraySize() * PlaneCount( pDevice );
+    }
+    inline UINT CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT PlaneSlice ) noexcept
+    {
+        return D3D12CalcSubresource( MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize() );
+    }
+};
+inline bool operator==( const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r ) noexcept
+{
+    return l.Dimension == r.Dimension &&
+        l.Alignment == r.Alignment &&
+        l.Width == r.Width &&
+        l.Height == r.Height &&
+        l.DepthOrArraySize == r.DepthOrArraySize &&
+        l.MipLevels == r.MipLevels &&
+        l.Format == r.Format &&
+        l.SampleDesc.Count == r.SampleDesc.Count &&
+        l.SampleDesc.Quality == r.SampleDesc.Quality &&
+        l.Layout == r.Layout &&
+        l.Flags == r.Flags;
+}
+inline bool operator!=( const D3D12_RESOURCE_DESC& l, const D3D12_RESOURCE_DESC& r ) noexcept
+{
+    return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RESOURCE_DESC1 : public D3D12_RESOURCE_DESC1
+{
+    CD3DX12_RESOURCE_DESC1() = default;
+    explicit CD3DX12_RESOURCE_DESC1( const D3D12_RESOURCE_DESC1& o ) noexcept :
+        D3D12_RESOURCE_DESC1( o )
+    {}
+    CD3DX12_RESOURCE_DESC1(
+        D3D12_RESOURCE_DIMENSION dimension,
+        UINT64 alignment,
+        UINT64 width,
+        UINT height,
+        UINT16 depthOrArraySize,
+        UINT16 mipLevels,
+        DXGI_FORMAT format,
+        UINT sampleCount,
+        UINT sampleQuality,
+        D3D12_TEXTURE_LAYOUT layout,
+        D3D12_RESOURCE_FLAGS flags,
+        UINT samplerFeedbackMipRegionWidth = 0,
+        UINT samplerFeedbackMipRegionHeight = 0,
+        UINT samplerFeedbackMipRegionDepth = 0 ) noexcept
+    {
+        Dimension = dimension;
+        Alignment = alignment;
+        Width = width;
+        Height = height;
+        DepthOrArraySize = depthOrArraySize;
+        MipLevels = mipLevels;
+        Format = format;
+        SampleDesc.Count = sampleCount;
+        SampleDesc.Quality = sampleQuality;
+        Layout = layout;
+        Flags = flags;
+        SamplerFeedbackMipRegion.Width = samplerFeedbackMipRegionWidth;
+        SamplerFeedbackMipRegion.Height = samplerFeedbackMipRegionHeight;
+        SamplerFeedbackMipRegion.Depth = samplerFeedbackMipRegionDepth;
+    }
+    static inline CD3DX12_RESOURCE_DESC1 Buffer(
+        const D3D12_RESOURCE_ALLOCATION_INFO& resAllocInfo,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC1( D3D12_RESOURCE_DIMENSION_BUFFER, resAllocInfo.Alignment, resAllocInfo.SizeInBytes,
+                                       1, 1, 1, DXGI_FORMAT_UNKNOWN, 1, 0, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, flags, 0, 0, 0 );
+    }
+    static inline CD3DX12_RESOURCE_DESC1 Buffer(
+        UINT64 width,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC1( D3D12_RESOURCE_DIMENSION_BUFFER, alignment, width, 1, 1, 1,
+                                       DXGI_FORMAT_UNKNOWN, 1, 0, D3D12_TEXTURE_LAYOUT_ROW_MAJOR, flags, 0, 0, 0 );
+    }
+    static inline CD3DX12_RESOURCE_DESC1 Tex1D(
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT16 arraySize = 1,
+        UINT16 mipLevels = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC1( D3D12_RESOURCE_DIMENSION_TEXTURE1D, alignment, width, 1, arraySize,
+                                       mipLevels, format, 1, 0, layout, flags, 0, 0, 0 );
+    }
+    static inline CD3DX12_RESOURCE_DESC1 Tex2D(
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT height,
+        UINT16 arraySize = 1,
+        UINT16 mipLevels = 0,
+        UINT sampleCount = 1,
+        UINT sampleQuality = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0,
+        UINT samplerFeedbackMipRegionWidth = 0,
+        UINT samplerFeedbackMipRegionHeight = 0,
+        UINT samplerFeedbackMipRegionDepth = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC1( D3D12_RESOURCE_DIMENSION_TEXTURE2D, alignment, width, height, arraySize,
+                                       mipLevels, format, sampleCount, sampleQuality, layout, flags, samplerFeedbackMipRegionWidth,
+                                       samplerFeedbackMipRegionHeight, samplerFeedbackMipRegionDepth );
+    }
+    static inline CD3DX12_RESOURCE_DESC1 Tex3D(
+        DXGI_FORMAT format,
+        UINT64 width,
+        UINT height,
+        UINT16 depth,
+        UINT16 mipLevels = 0,
+        D3D12_RESOURCE_FLAGS flags = D3D12_RESOURCE_FLAG_NONE,
+        D3D12_TEXTURE_LAYOUT layout = D3D12_TEXTURE_LAYOUT_UNKNOWN,
+        UINT64 alignment = 0 ) noexcept
+    {
+        return CD3DX12_RESOURCE_DESC1( D3D12_RESOURCE_DIMENSION_TEXTURE3D, alignment, width, height, depth,
+                                       mipLevels, format, 1, 0, layout, flags, 0, 0, 0 );
+    }
+    inline UINT16 Depth() const noexcept
+    {
+        return (Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1);
+    }
+    inline UINT16 ArraySize() const noexcept
+    {
+        return (Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D ? DepthOrArraySize : 1);
+    }
+    inline UINT8 PlaneCount( _In_ ID3D12Device* pDevice ) const noexcept
+    {
+        return D3D12GetFormatPlaneCount( pDevice, Format );
+    }
+    inline UINT Subresources( _In_ ID3D12Device* pDevice ) const noexcept
+    {
+        return MipLevels * ArraySize() * PlaneCount( pDevice );
+    }
+    inline UINT CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT PlaneSlice ) noexcept
+    {
+        return D3D12CalcSubresource( MipSlice, ArraySlice, PlaneSlice, MipLevels, ArraySize() );
+    }
+};
+inline bool operator==( const D3D12_RESOURCE_DESC1& l, const D3D12_RESOURCE_DESC1& r ) noexcept
+{
+    return l.Dimension == r.Dimension &&
+        l.Alignment == r.Alignment &&
+        l.Width == r.Width &&
+        l.Height == r.Height &&
+        l.DepthOrArraySize == r.DepthOrArraySize &&
+        l.MipLevels == r.MipLevels &&
+        l.Format == r.Format &&
+        l.SampleDesc.Count == r.SampleDesc.Count &&
+        l.SampleDesc.Quality == r.SampleDesc.Quality &&
+        l.Layout == r.Layout &&
+        l.Flags == r.Flags &&
+        l.SamplerFeedbackMipRegion.Width == r.SamplerFeedbackMipRegion.Width &&
+        l.SamplerFeedbackMipRegion.Height == r.SamplerFeedbackMipRegion.Height &&
+        l.SamplerFeedbackMipRegion.Depth == r.SamplerFeedbackMipRegion.Depth;
+}
+inline bool operator!=( const D3D12_RESOURCE_DESC1& l, const D3D12_RESOURCE_DESC1& r ) noexcept
+{
+    return !(l == r);
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_VIEW_INSTANCING_DESC : public D3D12_VIEW_INSTANCING_DESC
+{
+    CD3DX12_VIEW_INSTANCING_DESC() = default;
+    explicit CD3DX12_VIEW_INSTANCING_DESC( const D3D12_VIEW_INSTANCING_DESC& o ) noexcept :
+        D3D12_VIEW_INSTANCING_DESC( o )
+    {}
+    explicit CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT ) noexcept
+    {
+        ViewInstanceCount = 0;
+        pViewInstanceLocations = nullptr;
+        Flags = D3D12_VIEW_INSTANCING_FLAG_NONE;
+    }
+    explicit CD3DX12_VIEW_INSTANCING_DESC(
+        UINT InViewInstanceCount,
+        const D3D12_VIEW_INSTANCE_LOCATION* InViewInstanceLocations,
+        D3D12_VIEW_INSTANCING_FLAGS InFlags ) noexcept
+    {
+        ViewInstanceCount = InViewInstanceCount;
+        pViewInstanceLocations = InViewInstanceLocations;
+        Flags = InFlags;
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+// Row-by-row memcpy
+inline void MemcpySubresource(
+    _In_ const D3D12_MEMCPY_DEST* pDest,
+    _In_ const D3D12_SUBRESOURCE_DATA* pSrc,
+    SIZE_T RowSizeInBytes,
+    UINT NumRows,
+    UINT NumSlices ) noexcept
+{
+    for( UINT z = 0; z < NumSlices; ++z )
+    {
+        auto pDestSlice = static_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
+        auto pSrcSlice = static_cast<const BYTE*>(pSrc->pData) + pSrc->SlicePitch * LONG_PTR( z );
+        for( UINT y = 0; y < NumRows; ++y )
+        {
+            memcpy( pDestSlice + pDest->RowPitch * y,
+                    pSrcSlice + pSrc->RowPitch * LONG_PTR( y ),
+                    RowSizeInBytes );
+        }
+    }
+}
+
+//------------------------------------------------------------------------------------------------
+// Row-by-row memcpy
+inline void MemcpySubresource(
+    _In_ const D3D12_MEMCPY_DEST* pDest,
+    _In_ const void* pResourceData,
+    _In_ const D3D12_SUBRESOURCE_INFO* pSrc,
+    SIZE_T RowSizeInBytes,
+    UINT NumRows,
+    UINT NumSlices ) noexcept
+{
+    for( UINT z = 0; z < NumSlices; ++z )
+    {
+        auto pDestSlice = static_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
+        auto pSrcSlice = (static_cast<const BYTE*>(pResourceData) + pSrc->Offset) + pSrc->DepthPitch * ULONG_PTR( z );
+        for( UINT y = 0; y < NumRows; ++y )
+        {
+            memcpy( pDestSlice + pDest->RowPitch * y,
+                    pSrcSlice + pSrc->RowPitch * ULONG_PTR( y ),
+                    RowSizeInBytes );
+        }
+    }
+}
+
+//------------------------------------------------------------------------------------------------
+// Returns required size of a buffer to be used for data upload
+inline UINT64 GetRequiredIntermediateSize(
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES ) UINT FirstSubresource,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES - FirstSubresource ) UINT NumSubresources ) noexcept
+{
+    auto Desc = pDestinationResource->GetDesc();
+    UINT64 RequiredSize = 0;
+
+    ID3D12Device* pDevice = nullptr;
+    pDestinationResource->GetDevice( __uuidof(*pDevice), reinterpret_cast<void**>(&pDevice) );
+    pDevice->GetCopyableFootprints( &Desc, FirstSubresource, NumSubresources, 0, nullptr, nullptr, nullptr, &RequiredSize );
+    pDevice->Release();
+
+    return RequiredSize;
+}
+
+//------------------------------------------------------------------------------------------------
+// All arrays must be populated (e.g. by calling GetCopyableFootprints)
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES ) UINT FirstSubresource,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES - FirstSubresource ) UINT NumSubresources,
+    UINT64 RequiredSize,
+    _In_reads_( NumSubresources ) const D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
+    _In_reads_( NumSubresources ) const UINT* pNumRows,
+    _In_reads_( NumSubresources ) const UINT64* pRowSizesInBytes,
+    _In_reads_( NumSubresources ) const D3D12_SUBRESOURCE_DATA* pSrcData ) noexcept
+{
+    // Minor validation
+    auto IntermediateDesc = pIntermediate->GetDesc();
+    auto DestinationDesc = pDestinationResource->GetDesc();
+    if( IntermediateDesc.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER ||
+        IntermediateDesc.Width < RequiredSize + pLayouts[ 0 ].Offset ||
+        RequiredSize > SIZE_T( -1 ) ||
+        (DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER &&
+          (FirstSubresource != 0 || NumSubresources != 1)) )
+    {
+        return 0;
+    }
+
+    BYTE* pData;
+    HRESULT hr = pIntermediate->Map( 0, nullptr, reinterpret_cast<void**>(&pData) );
+    if( FAILED( hr ) )
+    {
+        return 0;
+    }
+
+    for( UINT i = 0; i < NumSubresources; ++i )
+    {
+        if( pRowSizesInBytes[ i ] > SIZE_T( -1 ) ) return 0;
+        D3D12_MEMCPY_DEST DestData = { pData + pLayouts[ i ].Offset, pLayouts[ i ].Footprint.RowPitch, SIZE_T( pLayouts[ i ].Footprint.RowPitch ) * SIZE_T( pNumRows[ i ] ) };
+        MemcpySubresource( &DestData, &pSrcData[ i ], static_cast<SIZE_T>(pRowSizesInBytes[ i ]), pNumRows[ i ], pLayouts[ i ].Footprint.Depth );
+    }
+    pIntermediate->Unmap( 0, nullptr );
+
+    if( DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER )
+    {
+        pCmdList->CopyBufferRegion(
+            pDestinationResource, 0, pIntermediate, pLayouts[ 0 ].Offset, pLayouts[ 0 ].Footprint.Width );
+    }
+    else
+    {
+        for( UINT i = 0; i < NumSubresources; ++i )
+        {
+            CD3DX12_TEXTURE_COPY_LOCATION Dst( pDestinationResource, i + FirstSubresource );
+            CD3DX12_TEXTURE_COPY_LOCATION Src( pIntermediate, pLayouts[ i ] );
+            pCmdList->CopyTextureRegion( &Dst, 0, 0, 0, &Src, nullptr );
+        }
+    }
+    return RequiredSize;
+}
+
+//------------------------------------------------------------------------------------------------
+// All arrays must be populated (e.g. by calling GetCopyableFootprints)
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES ) UINT FirstSubresource,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES - FirstSubresource ) UINT NumSubresources,
+    UINT64 RequiredSize,
+    _In_reads_( NumSubresources ) const D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
+    _In_reads_( NumSubresources ) const UINT* pNumRows,
+    _In_reads_( NumSubresources ) const UINT64* pRowSizesInBytes,
+    _In_ const void* pResourceData,
+    _In_reads_( NumSubresources ) const D3D12_SUBRESOURCE_INFO* pSrcData ) noexcept
+{
+    // Minor validation
+    auto IntermediateDesc = pIntermediate->GetDesc();
+    auto DestinationDesc = pDestinationResource->GetDesc();
+    if( IntermediateDesc.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER ||
+        IntermediateDesc.Width < RequiredSize + pLayouts[ 0 ].Offset ||
+        RequiredSize > SIZE_T( -1 ) ||
+        (DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER &&
+          (FirstSubresource != 0 || NumSubresources != 1)) )
+    {
+        return 0;
+    }
+
+    BYTE* pData;
+    HRESULT hr = pIntermediate->Map( 0, nullptr, reinterpret_cast<void**>(&pData) );
+    if( FAILED( hr ) )
+    {
+        return 0;
+    }
+
+    for( UINT i = 0; i < NumSubresources; ++i )
+    {
+        if( pRowSizesInBytes[ i ] > SIZE_T( -1 ) ) return 0;
+        D3D12_MEMCPY_DEST DestData = { pData + pLayouts[ i ].Offset, pLayouts[ i ].Footprint.RowPitch, SIZE_T( pLayouts[ i ].Footprint.RowPitch ) * SIZE_T( pNumRows[ i ] ) };
+        MemcpySubresource( &DestData, pResourceData, &pSrcData[ i ], static_cast<SIZE_T>(pRowSizesInBytes[ i ]), pNumRows[ i ], pLayouts[ i ].Footprint.Depth );
+    }
+    pIntermediate->Unmap( 0, nullptr );
+
+    if( DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER )
+    {
+        pCmdList->CopyBufferRegion(
+            pDestinationResource, 0, pIntermediate, pLayouts[ 0 ].Offset, pLayouts[ 0 ].Footprint.Width );
+    }
+    else
+    {
+        for( UINT i = 0; i < NumSubresources; ++i )
+        {
+            CD3DX12_TEXTURE_COPY_LOCATION Dst( pDestinationResource, i + FirstSubresource );
+            CD3DX12_TEXTURE_COPY_LOCATION Src( pIntermediate, pLayouts[ i ] );
+            pCmdList->CopyTextureRegion( &Dst, 0, 0, 0, &Src, nullptr );
+        }
+    }
+    return RequiredSize;
+}
+
+//------------------------------------------------------------------------------------------------
+// Heap-allocating UpdateSubresources implementation
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    UINT64 IntermediateOffset,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES ) UINT FirstSubresource,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES - FirstSubresource ) UINT NumSubresources,
+    _In_reads_( NumSubresources ) const D3D12_SUBRESOURCE_DATA* pSrcData ) noexcept
+{
+    UINT64 RequiredSize = 0;
+    auto MemToAlloc = static_cast<UINT64>(sizeof( D3D12_PLACED_SUBRESOURCE_FOOTPRINT ) + sizeof( UINT ) + sizeof( UINT64 )) * NumSubresources;
+    if( MemToAlloc > SIZE_MAX )
+    {
+        return 0;
+    }
+    void* pMem = HeapAlloc( GetProcessHeap(), 0, static_cast<SIZE_T>(MemToAlloc) );
+    if( pMem == nullptr )
+    {
+        return 0;
+    }
+    auto pLayouts = static_cast<D3D12_PLACED_SUBRESOURCE_FOOTPRINT*>(pMem);
+    auto pRowSizesInBytes = reinterpret_cast<UINT64*>(pLayouts + NumSubresources);
+    auto pNumRows = reinterpret_cast<UINT*>(pRowSizesInBytes + NumSubresources);
+
+    auto Desc = pDestinationResource->GetDesc();
+    ID3D12Device* pDevice = nullptr;
+    pDestinationResource->GetDevice( __uuidof(*pDevice), reinterpret_cast<void**>(&pDevice) );
+    pDevice->GetCopyableFootprints( &Desc, FirstSubresource, NumSubresources, IntermediateOffset, pLayouts, pNumRows, pRowSizesInBytes, &RequiredSize );
+    pDevice->Release();
+
+    UINT64 Result = UpdateSubresources( pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, pLayouts, pNumRows, pRowSizesInBytes, pSrcData );
+    HeapFree( GetProcessHeap(), 0, pMem );
+    return Result;
+}
+
+//------------------------------------------------------------------------------------------------
+// Heap-allocating UpdateSubresources implementation
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    UINT64 IntermediateOffset,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES ) UINT FirstSubresource,
+    _In_range_( 0, D3D12_REQ_SUBRESOURCES - FirstSubresource ) UINT NumSubresources,
+    _In_ const void* pResourceData,
+    _In_reads_( NumSubresources ) D3D12_SUBRESOURCE_INFO* pSrcData ) noexcept
+{
+    UINT64 RequiredSize = 0;
+    auto MemToAlloc = static_cast<UINT64>(sizeof( D3D12_PLACED_SUBRESOURCE_FOOTPRINT ) + sizeof( UINT ) + sizeof( UINT64 )) * NumSubresources;
+    if( MemToAlloc > SIZE_MAX )
+    {
+        return 0;
+    }
+    void* pMem = HeapAlloc( GetProcessHeap(), 0, static_cast<SIZE_T>(MemToAlloc) );
+    if( pMem == nullptr )
+    {
+        return 0;
+    }
+    auto pLayouts = reinterpret_cast<D3D12_PLACED_SUBRESOURCE_FOOTPRINT*>(pMem);
+    auto pRowSizesInBytes = reinterpret_cast<UINT64*>(pLayouts + NumSubresources);
+    auto pNumRows = reinterpret_cast<UINT*>(pRowSizesInBytes + NumSubresources);
+
+    auto Desc = pDestinationResource->GetDesc();
+    ID3D12Device* pDevice = nullptr;
+    pDestinationResource->GetDevice( __uuidof(*pDevice), reinterpret_cast<void**>(&pDevice) );
+    pDevice->GetCopyableFootprints( &Desc, FirstSubresource, NumSubresources, IntermediateOffset, pLayouts, pNumRows, pRowSizesInBytes, &RequiredSize );
+    pDevice->Release();
+
+    UINT64 Result = UpdateSubresources( pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, pLayouts, pNumRows, pRowSizesInBytes, pResourceData, pSrcData );
+    HeapFree( GetProcessHeap(), 0, pMem );
+    return Result;
+}
+
+//------------------------------------------------------------------------------------------------
+// Stack-allocating UpdateSubresources implementation
+template <UINT MaxSubresources>
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    UINT64 IntermediateOffset,
+    _In_range_( 0, MaxSubresources ) UINT FirstSubresource,
+    _In_range_( 1, MaxSubresources - FirstSubresource ) UINT NumSubresources,
+    _In_reads_( NumSubresources ) const D3D12_SUBRESOURCE_DATA* pSrcData ) noexcept
+{
+    UINT64 RequiredSize = 0;
+    D3D12_PLACED_SUBRESOURCE_FOOTPRINT Layouts[ MaxSubresources ];
+    UINT NumRows[ MaxSubresources ];
+    UINT64 RowSizesInBytes[ MaxSubresources ];
+
+    auto Desc = pDestinationResource->GetDesc();
+    ID3D12Device* pDevice = nullptr;
+    pDestinationResource->GetDevice( __uuidof(*pDevice), reinterpret_cast<void**>(&pDevice) );
+    pDevice->GetCopyableFootprints( &Desc, FirstSubresource, NumSubresources, IntermediateOffset, Layouts, NumRows, RowSizesInBytes, &RequiredSize );
+    pDevice->Release();
+
+    return UpdateSubresources( pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, Layouts, NumRows, RowSizesInBytes, pSrcData );
+}
+
+//------------------------------------------------------------------------------------------------
+// Stack-allocating UpdateSubresources implementation
+template <UINT MaxSubresources>
+inline UINT64 UpdateSubresources(
+    _In_ ID3D12GraphicsCommandList* pCmdList,
+    _In_ ID3D12Resource* pDestinationResource,
+    _In_ ID3D12Resource* pIntermediate,
+    UINT64 IntermediateOffset,
+    _In_range_( 0, MaxSubresources ) UINT FirstSubresource,
+    _In_range_( 1, MaxSubresources - FirstSubresource ) UINT NumSubresources,
+    _In_ const void* pResourceData,
+    _In_reads_( NumSubresources ) D3D12_SUBRESOURCE_INFO* pSrcData ) noexcept
+{
+    UINT64 RequiredSize = 0;
+    D3D12_PLACED_SUBRESOURCE_FOOTPRINT Layouts[ MaxSubresources ];
+    UINT NumRows[ MaxSubresources ];
+    UINT64 RowSizesInBytes[ MaxSubresources ];
+
+    auto Desc = pDestinationResource->GetDesc();
+    ID3D12Device* pDevice = nullptr;
+    pDestinationResource->GetDevice( __uuidof(*pDevice), reinterpret_cast<void**>(&pDevice) );
+    pDevice->GetCopyableFootprints( &Desc, FirstSubresource, NumSubresources, IntermediateOffset, Layouts, NumRows, RowSizesInBytes, &RequiredSize );
+    pDevice->Release();
+
+    return UpdateSubresources( pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, Layouts, NumRows, RowSizesInBytes, pResourceData, pSrcData );
+}
+
+//------------------------------------------------------------------------------------------------
+inline constexpr bool D3D12IsLayoutOpaque( D3D12_TEXTURE_LAYOUT Layout ) noexcept
+{
+    return Layout == D3D12_TEXTURE_LAYOUT_UNKNOWN || Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE;
+}
+
+//------------------------------------------------------------------------------------------------
+template <typename t_CommandListType>
+inline ID3D12CommandList* const* CommandListCast( t_CommandListType* const* pp ) noexcept
+{
+    // This cast is useful for passing strongly typed command list pointers into
+    // ExecuteCommandLists.
+    // This cast is valid as long as the const-ness is respected. D3D12 APIs do
+    // respect the const-ness of their arguments.
+    return reinterpret_cast<ID3D12CommandList* const*>(pp);
+}
+
+
+
+
+
+//------------------------------------------------------------------------------------------------
+// D3D12 exports a new method for serializing root signatures in the Windows 10 Anniversary Update.
+// To help enable root signature 1.1 features when they are available and not require maintaining
+// two code paths for building root signatures, this helper method reconstructs a 1.0 signature when
+// 1.1 is not supported.
+inline HRESULT D3DX12SerializeVersionedRootSignature(
+    _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignatureDesc,
+    D3D_ROOT_SIGNATURE_VERSION MaxVersion,
+    _Outptr_ ID3DBlob** ppBlob,
+    _Always_( _Outptr_opt_result_maybenull_ ) ID3DBlob** ppErrorBlob, PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE D3D12SerializeVersionedRootSignature, PFN_D3D12_SERIALIZE_ROOT_SIGNATURE D3D12SerializeRootSignature ) noexcept
+{
+    if( ppErrorBlob != nullptr )
+    {
+        *ppErrorBlob = nullptr;
+    }
+
+    switch( MaxVersion )
+    {
+    case D3D_ROOT_SIGNATURE_VERSION_1_0:
+        switch( pRootSignatureDesc->Version )
+        {
+        case D3D_ROOT_SIGNATURE_VERSION_1_0:
+            return D3D12SerializeRootSignature( &pRootSignatureDesc->Desc_1_0, D3D_ROOT_SIGNATURE_VERSION_1, ppBlob, ppErrorBlob );
+
+        case D3D_ROOT_SIGNATURE_VERSION_1_1:
+        {
+            HRESULT hr = S_OK;
+            const D3D12_ROOT_SIGNATURE_DESC1& desc_1_1 = pRootSignatureDesc->Desc_1_1;
+
+            const SIZE_T ParametersSize = sizeof( D3D12_ROOT_PARAMETER ) * desc_1_1.NumParameters;
+            void* pParameters = (ParametersSize > 0) ? HeapAlloc( GetProcessHeap(), 0, ParametersSize ) : nullptr;
+            if( ParametersSize > 0 && pParameters == nullptr )
+            {
+                hr = E_OUTOFMEMORY;
+            }
+            auto pParameters_1_0 = static_cast<D3D12_ROOT_PARAMETER*>(pParameters);
+
+            if( SUCCEEDED( hr ) )
+            {
+                for( UINT n = 0; n < desc_1_1.NumParameters; n++ )
+                {
+                    __analysis_assume( ParametersSize == sizeof( D3D12_ROOT_PARAMETER ) * desc_1_1.NumParameters );
+                    pParameters_1_0[ n ].ParameterType = desc_1_1.pParameters[ n ].ParameterType;
+                    pParameters_1_0[ n ].ShaderVisibility = desc_1_1.pParameters[ n ].ShaderVisibility;
+
+                    switch( desc_1_1.pParameters[ n ].ParameterType )
+                    {
+                    case D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
+                        pParameters_1_0[ n ].Constants.Num32BitValues = desc_1_1.pParameters[ n ].Constants.Num32BitValues;
+                        pParameters_1_0[ n ].Constants.RegisterSpace = desc_1_1.pParameters[ n ].Constants.RegisterSpace;
+                        pParameters_1_0[ n ].Constants.ShaderRegister = desc_1_1.pParameters[ n ].Constants.ShaderRegister;
+                        break;
+
+                    case D3D12_ROOT_PARAMETER_TYPE_CBV:
+                    case D3D12_ROOT_PARAMETER_TYPE_SRV:
+                    case D3D12_ROOT_PARAMETER_TYPE_UAV:
+                        pParameters_1_0[ n ].Descriptor.RegisterSpace = desc_1_1.pParameters[ n ].Descriptor.RegisterSpace;
+                        pParameters_1_0[ n ].Descriptor.ShaderRegister = desc_1_1.pParameters[ n ].Descriptor.ShaderRegister;
+                        break;
+
+                    case D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
+                        const D3D12_ROOT_DESCRIPTOR_TABLE1& table_1_1 = desc_1_1.pParameters[ n ].DescriptorTable;
+
+                        const SIZE_T DescriptorRangesSize = sizeof( D3D12_DESCRIPTOR_RANGE ) * table_1_1.NumDescriptorRanges;
+                        void* pDescriptorRanges = (DescriptorRangesSize > 0 && SUCCEEDED( hr )) ? HeapAlloc( GetProcessHeap(), 0, DescriptorRangesSize ) : nullptr;
+                        if( DescriptorRangesSize > 0 && pDescriptorRanges == nullptr )
+                        {
+                            hr = E_OUTOFMEMORY;
+                        }
+                        auto pDescriptorRanges_1_0 = static_cast<D3D12_DESCRIPTOR_RANGE*>(pDescriptorRanges);
+
+                        if( SUCCEEDED( hr ) )
+                        {
+                            for( UINT x = 0; x < table_1_1.NumDescriptorRanges; x++ )
+                            {
+                                __analysis_assume( DescriptorRangesSize == sizeof( D3D12_DESCRIPTOR_RANGE ) * table_1_1.NumDescriptorRanges );
+                                pDescriptorRanges_1_0[ x ].BaseShaderRegister = table_1_1.pDescriptorRanges[ x ].BaseShaderRegister;
+                                pDescriptorRanges_1_0[ x ].NumDescriptors = table_1_1.pDescriptorRanges[ x ].NumDescriptors;
+                                pDescriptorRanges_1_0[ x ].OffsetInDescriptorsFromTableStart = table_1_1.pDescriptorRanges[ x ].OffsetInDescriptorsFromTableStart;
+                                pDescriptorRanges_1_0[ x ].RangeType = table_1_1.pDescriptorRanges[ x ].RangeType;
+                                pDescriptorRanges_1_0[ x ].RegisterSpace = table_1_1.pDescriptorRanges[ x ].RegisterSpace;
+                            }
+                        }
+
+                        D3D12_ROOT_DESCRIPTOR_TABLE& table_1_0 = pParameters_1_0[ n ].DescriptorTable;
+                        table_1_0.NumDescriptorRanges = table_1_1.NumDescriptorRanges;
+                        table_1_0.pDescriptorRanges = pDescriptorRanges_1_0;
+                    }
+                }
+            }
+
+            if( SUCCEEDED( hr ) )
+            {
+                CD3DX12_ROOT_SIGNATURE_DESC desc_1_0( desc_1_1.NumParameters, pParameters_1_0, desc_1_1.NumStaticSamplers, desc_1_1.pStaticSamplers, desc_1_1.Flags );
+                hr = D3D12SerializeRootSignature( &desc_1_0, D3D_ROOT_SIGNATURE_VERSION_1, ppBlob, ppErrorBlob );
+            }
+
+            if( pParameters )
+            {
+                for( UINT n = 0; n < desc_1_1.NumParameters; n++ )
+                {
+                    if( desc_1_1.pParameters[ n ].ParameterType == D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE )
+                    {
+                        HeapFree( GetProcessHeap(), 0, reinterpret_cast<void*>(const_cast<D3D12_DESCRIPTOR_RANGE*>(pParameters_1_0[ n ].DescriptorTable.pDescriptorRanges)) );
+                    }
+                }
+                HeapFree( GetProcessHeap(), 0, pParameters );
+            }
+            return hr;
+        }
+        }
+        break;
+
+    case D3D_ROOT_SIGNATURE_VERSION_1_1:
+        return D3D12SerializeVersionedRootSignature( pRootSignatureDesc, ppBlob, ppErrorBlob );
+    }
+
+    return E_INVALIDARG;
+}
+
+//------------------------------------------------------------------------------------------------
+struct CD3DX12_RT_FORMAT_ARRAY : public D3D12_RT_FORMAT_ARRAY
+{
+    CD3DX12_RT_FORMAT_ARRAY() = default;
+    explicit CD3DX12_RT_FORMAT_ARRAY( const D3D12_RT_FORMAT_ARRAY& o ) noexcept
+        : D3D12_RT_FORMAT_ARRAY( o )
+    {}
+    explicit CD3DX12_RT_FORMAT_ARRAY( _In_reads_( NumFormats ) const DXGI_FORMAT* pFormats, UINT NumFormats ) noexcept
+    {
+        NumRenderTargets = NumFormats;
+        memcpy( RTFormats, pFormats, sizeof( RTFormats ) );
+        // assumes ARRAY_SIZE(pFormats) == ARRAY_SIZE(RTFormats)
+    }
+};
+
+//------------------------------------------------------------------------------------------------
+// Pipeline State Stream Helpers
+//------------------------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------------------------
+// Stream Subobjects, i.e. elements of a stream
+
+struct DefaultSampleMask { operator UINT() noexcept { return UINT_MAX; } };
+struct DefaultSampleDesc { operator DXGI_SAMPLE_DESC() noexcept { return DXGI_SAMPLE_DESC{ 1, 0 }; } };
+
+#pragma warning(push)
+#pragma warning(disable : 4324)
+template <typename InnerStructType, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type, typename DefaultArg = InnerStructType>
+class alignas(void*) CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT
+{
+private:
+    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE _Type;
+    InnerStructType _Inner;
+public:
+    CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT() noexcept : _Type( Type ), _Inner( DefaultArg() ) {}
+    CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT( InnerStructType const& i ) noexcept : _Type( Type ), _Inner( i ) {}
+    CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT& operator=( InnerStructType const& i ) noexcept { _Type = Type; _Inner = i; return *this; }
+    operator InnerStructType const& () const noexcept { return _Inner; }
+    operator InnerStructType& () noexcept { return _Inner; }
+    InnerStructType* operator&() noexcept { return &_Inner; }
+    InnerStructType const* operator&() const noexcept { return &_Inner; }
+};
+#pragma warning(pop)
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_PIPELINE_STATE_FLAGS, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS>                             CD3DX12_PIPELINE_STATE_STREAM_FLAGS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< UINT, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK>                         CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< ID3D12RootSignature*, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE>                    CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_INPUT_LAYOUT_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT>                      CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_INDEX_BUFFER_STRIP_CUT_VALUE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE>                CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_PRIMITIVE_TOPOLOGY_TYPE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY>                CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS>                                CD3DX12_PIPELINE_STATE_STREAM_VS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS>                                CD3DX12_PIPELINE_STATE_STREAM_GS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_STREAM_OUTPUT_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT>                     CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS>                                CD3DX12_PIPELINE_STATE_STREAM_HS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS>                                CD3DX12_PIPELINE_STATE_STREAM_DS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS>                                CD3DX12_PIPELINE_STATE_STREAM_PS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_AS>                                CD3DX12_PIPELINE_STATE_STREAM_AS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS>                                CD3DX12_PIPELINE_STATE_STREAM_MS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_SHADER_BYTECODE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS>                                CD3DX12_PIPELINE_STATE_STREAM_CS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< CD3DX12_BLEND_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND, CD3DX12_DEFAULT>   CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< CD3DX12_DEPTH_STENCIL_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL, CD3DX12_DEFAULT>   CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< CD3DX12_DEPTH_STENCIL_DESC1, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1, CD3DX12_DEFAULT>   CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< DXGI_FORMAT, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT>              CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< CD3DX12_RASTERIZER_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER, CD3DX12_DEFAULT>   CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_RT_FORMAT_ARRAY, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS>             CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< DXGI_SAMPLE_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC, DefaultSampleDesc> CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< UINT, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK, DefaultSampleMask> CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< D3D12_CACHED_PIPELINE_STATE, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO>                        CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO;
+typedef CD3DX12_PIPELINE_STATE_STREAM_SUBOBJECT< CD3DX12_VIEW_INSTANCING_DESC, D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING, CD3DX12_DEFAULT>  CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING;
+
+//------------------------------------------------------------------------------------------------
+// Stream Parser Helpers
+
+struct ID3DX12PipelineParserCallbacks
+{
+    // Subobject Callbacks
+    virtual void FlagsCb( D3D12_PIPELINE_STATE_FLAGS ) {}
+    virtual void NodeMaskCb( UINT ) {}
+    virtual void RootSignatureCb( ID3D12RootSignature* ) {}
+    virtual void InputLayoutCb( const D3D12_INPUT_LAYOUT_DESC& ) {}
+    virtual void IBStripCutValueCb( D3D12_INDEX_BUFFER_STRIP_CUT_VALUE ) {}
+    virtual void PrimitiveTopologyTypeCb( D3D12_PRIMITIVE_TOPOLOGY_TYPE ) {}
+    virtual void VSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void GSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void StreamOutputCb( const D3D12_STREAM_OUTPUT_DESC& ) {}
+    virtual void HSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void DSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void PSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void CSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void ASCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void MSCb( const D3D12_SHADER_BYTECODE& ) {}
+    virtual void BlendStateCb( const D3D12_BLEND_DESC& ) {}
+    virtual void DepthStencilStateCb( const D3D12_DEPTH_STENCIL_DESC& ) {}
+    virtual void DepthStencilState1Cb( const D3D12_DEPTH_STENCIL_DESC1& ) {}
+    virtual void DSVFormatCb( DXGI_FORMAT ) {}
+    virtual void RasterizerStateCb( const D3D12_RASTERIZER_DESC& ) {}
+    virtual void RTVFormatsCb( const D3D12_RT_FORMAT_ARRAY& ) {}
+    virtual void SampleDescCb( const DXGI_SAMPLE_DESC& ) {}
+    virtual void SampleMaskCb( UINT ) {}
+    virtual void ViewInstancingCb( const D3D12_VIEW_INSTANCING_DESC& ) {}
+    virtual void CachedPSOCb( const D3D12_CACHED_PIPELINE_STATE& ) {}
+
+    // Error Callbacks
+    virtual void ErrorBadInputParameter( UINT /*ParameterIndex*/ ) {}
+    virtual void ErrorDuplicateSubobject( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE /*DuplicateType*/ ) {}
+    virtual void ErrorUnknownSubobject( UINT /*UnknownTypeValue*/ ) {}
+
+    virtual ~ID3DX12PipelineParserCallbacks() = default;
+};
+
+struct D3DX12_MESH_SHADER_PIPELINE_STATE_DESC
+{
+    ID3D12RootSignature* pRootSignature;
+    D3D12_SHADER_BYTECODE         AS;
+    D3D12_SHADER_BYTECODE         MS;
+    D3D12_SHADER_BYTECODE         PS;
+    D3D12_BLEND_DESC              BlendState;
+    UINT                          SampleMask;
+    D3D12_RASTERIZER_DESC         RasterizerState;
+    D3D12_DEPTH_STENCIL_DESC      DepthStencilState;
+    D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType;
+    UINT                          NumRenderTargets;
+    DXGI_FORMAT                   RTVFormats[ D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT ];
+    DXGI_FORMAT                   DSVFormat;
+    DXGI_SAMPLE_DESC              SampleDesc;
+    UINT                          NodeMask;
+    D3D12_CACHED_PIPELINE_STATE   CachedPSO;
+    D3D12_PIPELINE_STATE_FLAGS    Flags;
+};
+
+// CD3DX12_PIPELINE_STATE_STREAM2 Works on OS Build 19041+ (where there is a new mesh shader pipeline).
+// Use CD3DX12_PIPELINE_STATE_STREAM1 for OS Build 16299+ (where there is a new view instancing subobject).
+// Use CD3DX12_PIPELINE_STATE_STREAM for OS Build 15063+ support.
+struct CD3DX12_PIPELINE_STATE_STREAM2
+{
+    CD3DX12_PIPELINE_STATE_STREAM2() = default;
+    // Mesh and amplification shaders must be set manually, since they do not have representation in D3D12_GRAPHICS_PIPELINE_STATE_DESC
+    CD3DX12_PIPELINE_STATE_STREAM2( const D3D12_GRAPHICS_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , InputLayout( Desc.InputLayout )
+        , IBStripCutValue( Desc.IBStripCutValue )
+        , PrimitiveTopologyType( Desc.PrimitiveTopologyType )
+        , VS( Desc.VS )
+        , GS( Desc.GS )
+        , StreamOutput( Desc.StreamOutput )
+        , HS( Desc.HS )
+        , DS( Desc.DS )
+        , PS( Desc.PS )
+        , BlendState( CD3DX12_BLEND_DESC( Desc.BlendState ) )
+        , DepthStencilState( CD3DX12_DEPTH_STENCIL_DESC1( Desc.DepthStencilState ) )
+        , DSVFormat( Desc.DSVFormat )
+        , RasterizerState( CD3DX12_RASTERIZER_DESC( Desc.RasterizerState ) )
+        , RTVFormats( CD3DX12_RT_FORMAT_ARRAY( Desc.RTVFormats, Desc.NumRenderTargets ) )
+        , SampleDesc( Desc.SampleDesc )
+        , SampleMask( Desc.SampleMask )
+        , CachedPSO( Desc.CachedPSO )
+        , ViewInstancingDesc( CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT() ) )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM2( const D3DX12_MESH_SHADER_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , PrimitiveTopologyType( Desc.PrimitiveTopologyType )
+        , PS( Desc.PS )
+        , AS( Desc.AS )
+        , MS( Desc.MS )
+        , BlendState( CD3DX12_BLEND_DESC( Desc.BlendState ) )
+        , DepthStencilState( CD3DX12_DEPTH_STENCIL_DESC1( Desc.DepthStencilState ) )
+        , DSVFormat( Desc.DSVFormat )
+        , RasterizerState( CD3DX12_RASTERIZER_DESC( Desc.RasterizerState ) )
+        , RTVFormats( CD3DX12_RT_FORMAT_ARRAY( Desc.RTVFormats, Desc.NumRenderTargets ) )
+        , SampleDesc( Desc.SampleDesc )
+        , SampleMask( Desc.SampleMask )
+        , CachedPSO( Desc.CachedPSO )
+        , ViewInstancingDesc( CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT() ) )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM2( const D3D12_COMPUTE_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , CS( CD3DX12_SHADER_BYTECODE( Desc.CS ) )
+        , CachedPSO( Desc.CachedPSO )
+    {
+        static_cast<D3D12_DEPTH_STENCIL_DESC1&>(DepthStencilState).DepthEnable = false;
+    }
+    CD3DX12_PIPELINE_STATE_STREAM_FLAGS Flags;
+    CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK NodeMask;
+    CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE pRootSignature;
+    CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT InputLayout;
+    CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE IBStripCutValue;
+    CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY PrimitiveTopologyType;
+    CD3DX12_PIPELINE_STATE_STREAM_VS VS;
+    CD3DX12_PIPELINE_STATE_STREAM_GS GS;
+    CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT StreamOutput;
+    CD3DX12_PIPELINE_STATE_STREAM_HS HS;
+    CD3DX12_PIPELINE_STATE_STREAM_DS DS;
+    CD3DX12_PIPELINE_STATE_STREAM_PS PS;
+    CD3DX12_PIPELINE_STATE_STREAM_AS AS;
+    CD3DX12_PIPELINE_STATE_STREAM_MS MS;
+    CD3DX12_PIPELINE_STATE_STREAM_CS CS;
+    CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC BlendState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1 DepthStencilState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT DSVFormat;
+    CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER RasterizerState;
+    CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS RTVFormats;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC SampleDesc;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK SampleMask;
+    CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO CachedPSO;
+    CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING ViewInstancingDesc;
+    D3D12_GRAPHICS_PIPELINE_STATE_DESC GraphicsDescV0() const noexcept
+    {
+        D3D12_GRAPHICS_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.InputLayout = this->InputLayout;
+        D.IBStripCutValue = this->IBStripCutValue;
+        D.PrimitiveTopologyType = this->PrimitiveTopologyType;
+        D.VS = this->VS;
+        D.GS = this->GS;
+        D.StreamOutput = this->StreamOutput;
+        D.HS = this->HS;
+        D.DS = this->DS;
+        D.PS = this->PS;
+        D.BlendState = this->BlendState;
+        D.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( D3D12_DEPTH_STENCIL_DESC1( this->DepthStencilState ) );
+        D.DSVFormat = this->DSVFormat;
+        D.RasterizerState = this->RasterizerState;
+        D.NumRenderTargets = D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).NumRenderTargets;
+        memcpy( D.RTVFormats, D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).RTFormats, sizeof( D.RTVFormats ) );
+        D.SampleDesc = this->SampleDesc;
+        D.SampleMask = this->SampleMask;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+    D3D12_COMPUTE_PIPELINE_STATE_DESC ComputeDescV0() const noexcept
+    {
+        D3D12_COMPUTE_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.CS = this->CS;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+};
+
+// CD3DX12_PIPELINE_STATE_STREAM1 Works on OS Build 16299+ (where there is a new view instancing subobject).
+// Use CD3DX12_PIPELINE_STATE_STREAM for OS Build 15063+ support.
+struct CD3DX12_PIPELINE_STATE_STREAM1
+{
+    CD3DX12_PIPELINE_STATE_STREAM1() = default;
+    // Mesh and amplification shaders must be set manually, since they do not have representation in D3D12_GRAPHICS_PIPELINE_STATE_DESC
+    CD3DX12_PIPELINE_STATE_STREAM1( const D3D12_GRAPHICS_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , InputLayout( Desc.InputLayout )
+        , IBStripCutValue( Desc.IBStripCutValue )
+        , PrimitiveTopologyType( Desc.PrimitiveTopologyType )
+        , VS( Desc.VS )
+        , GS( Desc.GS )
+        , StreamOutput( Desc.StreamOutput )
+        , HS( Desc.HS )
+        , DS( Desc.DS )
+        , PS( Desc.PS )
+        , BlendState( CD3DX12_BLEND_DESC( Desc.BlendState ) )
+        , DepthStencilState( CD3DX12_DEPTH_STENCIL_DESC1( Desc.DepthStencilState ) )
+        , DSVFormat( Desc.DSVFormat )
+        , RasterizerState( CD3DX12_RASTERIZER_DESC( Desc.RasterizerState ) )
+        , RTVFormats( CD3DX12_RT_FORMAT_ARRAY( Desc.RTVFormats, Desc.NumRenderTargets ) )
+        , SampleDesc( Desc.SampleDesc )
+        , SampleMask( Desc.SampleMask )
+        , CachedPSO( Desc.CachedPSO )
+        , ViewInstancingDesc( CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT() ) )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM1( const D3DX12_MESH_SHADER_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , PrimitiveTopologyType( Desc.PrimitiveTopologyType )
+        , PS( Desc.PS )
+        , BlendState( CD3DX12_BLEND_DESC( Desc.BlendState ) )
+        , DepthStencilState( CD3DX12_DEPTH_STENCIL_DESC1( Desc.DepthStencilState ) )
+        , DSVFormat( Desc.DSVFormat )
+        , RasterizerState( CD3DX12_RASTERIZER_DESC( Desc.RasterizerState ) )
+        , RTVFormats( CD3DX12_RT_FORMAT_ARRAY( Desc.RTVFormats, Desc.NumRenderTargets ) )
+        , SampleDesc( Desc.SampleDesc )
+        , SampleMask( Desc.SampleMask )
+        , CachedPSO( Desc.CachedPSO )
+        , ViewInstancingDesc( CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT() ) )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM1( const D3D12_COMPUTE_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , CS( CD3DX12_SHADER_BYTECODE( Desc.CS ) )
+        , CachedPSO( Desc.CachedPSO )
+    {
+        static_cast<D3D12_DEPTH_STENCIL_DESC1&>(DepthStencilState).DepthEnable = false;
+    }
+    CD3DX12_PIPELINE_STATE_STREAM_FLAGS Flags;
+    CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK NodeMask;
+    CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE pRootSignature;
+    CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT InputLayout;
+    CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE IBStripCutValue;
+    CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY PrimitiveTopologyType;
+    CD3DX12_PIPELINE_STATE_STREAM_VS VS;
+    CD3DX12_PIPELINE_STATE_STREAM_GS GS;
+    CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT StreamOutput;
+    CD3DX12_PIPELINE_STATE_STREAM_HS HS;
+    CD3DX12_PIPELINE_STATE_STREAM_DS DS;
+    CD3DX12_PIPELINE_STATE_STREAM_PS PS;
+    CD3DX12_PIPELINE_STATE_STREAM_CS CS;
+    CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC BlendState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1 DepthStencilState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT DSVFormat;
+    CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER RasterizerState;
+    CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS RTVFormats;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC SampleDesc;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK SampleMask;
+    CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO CachedPSO;
+    CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING ViewInstancingDesc;
+    D3D12_GRAPHICS_PIPELINE_STATE_DESC GraphicsDescV0() const noexcept
+    {
+        D3D12_GRAPHICS_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.InputLayout = this->InputLayout;
+        D.IBStripCutValue = this->IBStripCutValue;
+        D.PrimitiveTopologyType = this->PrimitiveTopologyType;
+        D.VS = this->VS;
+        D.GS = this->GS;
+        D.StreamOutput = this->StreamOutput;
+        D.HS = this->HS;
+        D.DS = this->DS;
+        D.PS = this->PS;
+        D.BlendState = this->BlendState;
+        D.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( D3D12_DEPTH_STENCIL_DESC1( this->DepthStencilState ) );
+        D.DSVFormat = this->DSVFormat;
+        D.RasterizerState = this->RasterizerState;
+        D.NumRenderTargets = D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).NumRenderTargets;
+        memcpy( D.RTVFormats, D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).RTFormats, sizeof( D.RTVFormats ) );
+        D.SampleDesc = this->SampleDesc;
+        D.SampleMask = this->SampleMask;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+    D3D12_COMPUTE_PIPELINE_STATE_DESC ComputeDescV0() const noexcept
+    {
+        D3D12_COMPUTE_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.CS = this->CS;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+};
+
+
+struct CD3DX12_PIPELINE_MESH_STATE_STREAM
+{
+    CD3DX12_PIPELINE_MESH_STATE_STREAM() = default;
+    CD3DX12_PIPELINE_MESH_STATE_STREAM( const D3DX12_MESH_SHADER_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , PS( Desc.PS )
+        , AS( Desc.AS )
+        , MS( Desc.MS )
+        , BlendState( CD3DX12_BLEND_DESC( Desc.BlendState ) )
+        , DepthStencilState( CD3DX12_DEPTH_STENCIL_DESC1( Desc.DepthStencilState ) )
+        , DSVFormat( Desc.DSVFormat )
+        , RasterizerState( CD3DX12_RASTERIZER_DESC( Desc.RasterizerState ) )
+        , RTVFormats( CD3DX12_RT_FORMAT_ARRAY( Desc.RTVFormats, Desc.NumRenderTargets ) )
+        , SampleDesc( Desc.SampleDesc )
+        , SampleMask( Desc.SampleMask )
+        , CachedPSO( Desc.CachedPSO )
+        , ViewInstancingDesc( CD3DX12_VIEW_INSTANCING_DESC( CD3DX12_DEFAULT() ) )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM_FLAGS Flags;
+    CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK NodeMask;
+    CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE pRootSignature;
+    CD3DX12_PIPELINE_STATE_STREAM_PS PS;
+    CD3DX12_PIPELINE_STATE_STREAM_AS AS;
+    CD3DX12_PIPELINE_STATE_STREAM_MS MS;
+    CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC BlendState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1 DepthStencilState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT DSVFormat;
+    CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER RasterizerState;
+    CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS RTVFormats;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC SampleDesc;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK SampleMask;
+    CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO CachedPSO;
+    CD3DX12_PIPELINE_STATE_STREAM_VIEW_INSTANCING ViewInstancingDesc;
+    D3DX12_MESH_SHADER_PIPELINE_STATE_DESC MeshShaderDescV0() const noexcept
+    {
+        D3DX12_MESH_SHADER_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.PS = this->PS;
+        D.AS = this->AS;
+        D.MS = this->MS;
+        D.BlendState = this->BlendState;
+        D.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( D3D12_DEPTH_STENCIL_DESC1( this->DepthStencilState ) );
+        D.DSVFormat = this->DSVFormat;
+        D.RasterizerState = this->RasterizerState;
+        D.NumRenderTargets = D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).NumRenderTargets;
+        memcpy( D.RTVFormats, D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).RTFormats, sizeof( D.RTVFormats ) );
+        D.SampleDesc = this->SampleDesc;
+        D.SampleMask = this->SampleMask;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+};
+
+// CD3DX12_PIPELINE_STATE_STREAM works on OS Build 15063+ but does not support new subobject(s) added in OS Build 16299+.
+// See CD3DX12_PIPELINE_STATE_STREAM1 for instance.
+struct CD3DX12_PIPELINE_STATE_STREAM
+{
+    CD3DX12_PIPELINE_STATE_STREAM() = default;
+    CD3DX12_PIPELINE_STATE_STREAM( const D3D12_GRAPHICS_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , InputLayout( Desc.InputLayout )
+        , IBStripCutValue( Desc.IBStripCutValue )
+        , PrimitiveTopologyType( Desc.PrimitiveTopologyType )
+        , VS( Desc.VS )
+        , GS( Desc.GS )
+        , StreamOutput( Desc.StreamOutput )
+        , HS( Desc.HS )
+        , DS( Desc.DS )
+        , PS( Desc.PS )
+        , BlendState( CD3DX12_BLEND_DESC( Desc.BlendState ) )
+        , DepthStencilState( CD3DX12_DEPTH_STENCIL_DESC1( Desc.DepthStencilState ) )
+        , DSVFormat( Desc.DSVFormat )
+        , RasterizerState( CD3DX12_RASTERIZER_DESC( Desc.RasterizerState ) )
+        , RTVFormats( CD3DX12_RT_FORMAT_ARRAY( Desc.RTVFormats, Desc.NumRenderTargets ) )
+        , SampleDesc( Desc.SampleDesc )
+        , SampleMask( Desc.SampleMask )
+        , CachedPSO( Desc.CachedPSO )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM( const D3D12_COMPUTE_PIPELINE_STATE_DESC& Desc ) noexcept
+        : Flags( Desc.Flags )
+        , NodeMask( Desc.NodeMask )
+        , pRootSignature( Desc.pRootSignature )
+        , CS( CD3DX12_SHADER_BYTECODE( Desc.CS ) )
+        , CachedPSO( Desc.CachedPSO )
+    {}
+    CD3DX12_PIPELINE_STATE_STREAM_FLAGS Flags;
+    CD3DX12_PIPELINE_STATE_STREAM_NODE_MASK NodeMask;
+    CD3DX12_PIPELINE_STATE_STREAM_ROOT_SIGNATURE pRootSignature;
+    CD3DX12_PIPELINE_STATE_STREAM_INPUT_LAYOUT InputLayout;
+    CD3DX12_PIPELINE_STATE_STREAM_IB_STRIP_CUT_VALUE IBStripCutValue;
+    CD3DX12_PIPELINE_STATE_STREAM_PRIMITIVE_TOPOLOGY PrimitiveTopologyType;
+    CD3DX12_PIPELINE_STATE_STREAM_VS VS;
+    CD3DX12_PIPELINE_STATE_STREAM_GS GS;
+    CD3DX12_PIPELINE_STATE_STREAM_STREAM_OUTPUT StreamOutput;
+    CD3DX12_PIPELINE_STATE_STREAM_HS HS;
+    CD3DX12_PIPELINE_STATE_STREAM_DS DS;
+    CD3DX12_PIPELINE_STATE_STREAM_PS PS;
+    CD3DX12_PIPELINE_STATE_STREAM_CS CS;
+    CD3DX12_PIPELINE_STATE_STREAM_BLEND_DESC BlendState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL1 DepthStencilState;
+    CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL_FORMAT DSVFormat;
+    CD3DX12_PIPELINE_STATE_STREAM_RASTERIZER RasterizerState;
+    CD3DX12_PIPELINE_STATE_STREAM_RENDER_TARGET_FORMATS RTVFormats;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_DESC SampleDesc;
+    CD3DX12_PIPELINE_STATE_STREAM_SAMPLE_MASK SampleMask;
+    CD3DX12_PIPELINE_STATE_STREAM_CACHED_PSO CachedPSO;
+    D3D12_GRAPHICS_PIPELINE_STATE_DESC GraphicsDescV0() const noexcept
+    {
+        D3D12_GRAPHICS_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.InputLayout = this->InputLayout;
+        D.IBStripCutValue = this->IBStripCutValue;
+        D.PrimitiveTopologyType = this->PrimitiveTopologyType;
+        D.VS = this->VS;
+        D.GS = this->GS;
+        D.StreamOutput = this->StreamOutput;
+        D.HS = this->HS;
+        D.DS = this->DS;
+        D.PS = this->PS;
+        D.BlendState = this->BlendState;
+        D.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( D3D12_DEPTH_STENCIL_DESC1( this->DepthStencilState ) );
+        D.DSVFormat = this->DSVFormat;
+        D.RasterizerState = this->RasterizerState;
+        D.NumRenderTargets = D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).NumRenderTargets;
+        memcpy( D.RTVFormats, D3D12_RT_FORMAT_ARRAY( this->RTVFormats ).RTFormats, sizeof( D.RTVFormats ) );
+        D.SampleDesc = this->SampleDesc;
+        D.SampleMask = this->SampleMask;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+    D3D12_COMPUTE_PIPELINE_STATE_DESC ComputeDescV0() const noexcept
+    {
+        D3D12_COMPUTE_PIPELINE_STATE_DESC D;
+        D.Flags = this->Flags;
+        D.NodeMask = this->NodeMask;
+        D.pRootSignature = this->pRootSignature;
+        D.CS = this->CS;
+        D.CachedPSO = this->CachedPSO;
+        return D;
+    }
+};
+
+struct CD3DX12_PIPELINE_STATE_STREAM2_PARSE_HELPER : public ID3DX12PipelineParserCallbacks
+{
+    CD3DX12_PIPELINE_STATE_STREAM2 PipelineStream;
+    CD3DX12_PIPELINE_STATE_STREAM2_PARSE_HELPER() noexcept
+        : SeenDSS( false )
+    {
+        // Adjust defaults to account for absent members.
+        PipelineStream.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+
+        // Depth disabled if no DSV format specified.
+        static_cast<D3D12_DEPTH_STENCIL_DESC1&>(PipelineStream.DepthStencilState).DepthEnable = false;
+    }
+
+    // ID3DX12PipelineParserCallbacks
+    void FlagsCb( D3D12_PIPELINE_STATE_FLAGS Flags ) override { PipelineStream.Flags = Flags; }
+    void NodeMaskCb( UINT NodeMask ) override { PipelineStream.NodeMask = NodeMask; }
+    void RootSignatureCb( ID3D12RootSignature* pRootSignature ) override { PipelineStream.pRootSignature = pRootSignature; }
+    void InputLayoutCb( const D3D12_INPUT_LAYOUT_DESC& InputLayout ) override { PipelineStream.InputLayout = InputLayout; }
+    void IBStripCutValueCb( D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue ) override { PipelineStream.IBStripCutValue = IBStripCutValue; }
+    void PrimitiveTopologyTypeCb( D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType ) override { PipelineStream.PrimitiveTopologyType = PrimitiveTopologyType; }
+    void VSCb( const D3D12_SHADER_BYTECODE& VS ) override { PipelineStream.VS = VS; }
+    void GSCb( const D3D12_SHADER_BYTECODE& GS ) override { PipelineStream.GS = GS; }
+    void StreamOutputCb( const D3D12_STREAM_OUTPUT_DESC& StreamOutput ) override { PipelineStream.StreamOutput = StreamOutput; }
+    void HSCb( const D3D12_SHADER_BYTECODE& HS ) override { PipelineStream.HS = HS; }
+    void DSCb( const D3D12_SHADER_BYTECODE& DS ) override { PipelineStream.DS = DS; }
+    void PSCb( const D3D12_SHADER_BYTECODE& PS ) override { PipelineStream.PS = PS; }
+    void CSCb( const D3D12_SHADER_BYTECODE& CS ) override { PipelineStream.CS = CS; }
+    void ASCb( const D3D12_SHADER_BYTECODE& AS ) override { PipelineStream.AS = AS; }
+    void MSCb( const D3D12_SHADER_BYTECODE& MS ) override { PipelineStream.MS = MS; }
+    void BlendStateCb( const D3D12_BLEND_DESC& BlendState ) override { PipelineStream.BlendState = CD3DX12_BLEND_DESC( BlendState ); }
+    void DepthStencilStateCb( const D3D12_DEPTH_STENCIL_DESC& DepthStencilState ) override
+    {
+        PipelineStream.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( DepthStencilState );
+        SeenDSS = true;
+    }
+    void DepthStencilState1Cb( const D3D12_DEPTH_STENCIL_DESC1& DepthStencilState ) override
+    {
+        PipelineStream.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( DepthStencilState );
+        SeenDSS = true;
+    }
+    void DSVFormatCb( DXGI_FORMAT DSVFormat ) override
+    {
+        PipelineStream.DSVFormat = DSVFormat;
+        if( !SeenDSS && DSVFormat != DXGI_FORMAT_UNKNOWN )
+        {
+            // Re-enable depth for the default state.
+            static_cast<D3D12_DEPTH_STENCIL_DESC1&>(PipelineStream.DepthStencilState).DepthEnable = true;
+        }
+    }
+    void RasterizerStateCb( const D3D12_RASTERIZER_DESC& RasterizerState ) override { PipelineStream.RasterizerState = CD3DX12_RASTERIZER_DESC( RasterizerState ); }
+    void RTVFormatsCb( const D3D12_RT_FORMAT_ARRAY& RTVFormats ) override { PipelineStream.RTVFormats = RTVFormats; }
+    void SampleDescCb( const DXGI_SAMPLE_DESC& SampleDesc ) override { PipelineStream.SampleDesc = SampleDesc; }
+    void SampleMaskCb( UINT SampleMask ) override { PipelineStream.SampleMask = SampleMask; }
+    void ViewInstancingCb( const D3D12_VIEW_INSTANCING_DESC& ViewInstancingDesc ) override { PipelineStream.ViewInstancingDesc = CD3DX12_VIEW_INSTANCING_DESC( ViewInstancingDesc ); }
+    void CachedPSOCb( const D3D12_CACHED_PIPELINE_STATE& CachedPSO ) override { PipelineStream.CachedPSO = CachedPSO; }
+
+private:
+    bool SeenDSS;
+};
+
+
+struct CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER : public ID3DX12PipelineParserCallbacks
+{
+    CD3DX12_PIPELINE_STATE_STREAM1 PipelineStream;
+    CD3DX12_PIPELINE_STATE_STREAM_PARSE_HELPER() noexcept
+        : SeenDSS( false )
+    {
+        // Adjust defaults to account for absent members.
+        PipelineStream.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+
+        // Depth disabled if no DSV format specified.
+        static_cast<D3D12_DEPTH_STENCIL_DESC1&>(PipelineStream.DepthStencilState).DepthEnable = false;
+    }
+
+    // ID3DX12PipelineParserCallbacks
+    void FlagsCb( D3D12_PIPELINE_STATE_FLAGS Flags ) override { PipelineStream.Flags = Flags; }
+    void NodeMaskCb( UINT NodeMask ) override { PipelineStream.NodeMask = NodeMask; }
+    void RootSignatureCb( ID3D12RootSignature* pRootSignature ) override { PipelineStream.pRootSignature = pRootSignature; }
+    void InputLayoutCb( const D3D12_INPUT_LAYOUT_DESC& InputLayout ) override { PipelineStream.InputLayout = InputLayout; }
+    void IBStripCutValueCb( D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue ) override { PipelineStream.IBStripCutValue = IBStripCutValue; }
+    void PrimitiveTopologyTypeCb( D3D12_PRIMITIVE_TOPOLOGY_TYPE PrimitiveTopologyType ) override { PipelineStream.PrimitiveTopologyType = PrimitiveTopologyType; }
+    void VSCb( const D3D12_SHADER_BYTECODE& VS ) override { PipelineStream.VS = VS; }
+    void GSCb( const D3D12_SHADER_BYTECODE& GS ) override { PipelineStream.GS = GS; }
+    void StreamOutputCb( const D3D12_STREAM_OUTPUT_DESC& StreamOutput ) override { PipelineStream.StreamOutput = StreamOutput; }
+    void HSCb( const D3D12_SHADER_BYTECODE& HS ) override { PipelineStream.HS = HS; }
+    void DSCb( const D3D12_SHADER_BYTECODE& DS ) override { PipelineStream.DS = DS; }
+    void PSCb( const D3D12_SHADER_BYTECODE& PS ) override { PipelineStream.PS = PS; }
+    void CSCb( const D3D12_SHADER_BYTECODE& CS ) override { PipelineStream.CS = CS; }
+    void BlendStateCb( const D3D12_BLEND_DESC& BlendState ) override { PipelineStream.BlendState = CD3DX12_BLEND_DESC( BlendState ); }
+    void DepthStencilStateCb( const D3D12_DEPTH_STENCIL_DESC& DepthStencilState ) override
+    {
+        PipelineStream.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( DepthStencilState );
+        SeenDSS = true;
+    }
+    void DepthStencilState1Cb( const D3D12_DEPTH_STENCIL_DESC1& DepthStencilState ) override
+    {
+        PipelineStream.DepthStencilState = CD3DX12_DEPTH_STENCIL_DESC1( DepthStencilState );
+        SeenDSS = true;
+    }
+    void DSVFormatCb( DXGI_FORMAT DSVFormat ) override
+    {
+        PipelineStream.DSVFormat = DSVFormat;
+        if( !SeenDSS && DSVFormat != DXGI_FORMAT_UNKNOWN )
+        {
+            // Re-enable depth for the default state.
+            static_cast<D3D12_DEPTH_STENCIL_DESC1&>(PipelineStream.DepthStencilState).DepthEnable = true;
+        }
+    }
+    void RasterizerStateCb( const D3D12_RASTERIZER_DESC& RasterizerState ) override { PipelineStream.RasterizerState = CD3DX12_RASTERIZER_DESC( RasterizerState ); }
+    void RTVFormatsCb( const D3D12_RT_FORMAT_ARRAY& RTVFormats ) override { PipelineStream.RTVFormats = RTVFormats; }
+    void SampleDescCb( const DXGI_SAMPLE_DESC& SampleDesc ) override { PipelineStream.SampleDesc = SampleDesc; }
+    void SampleMaskCb( UINT SampleMask ) override { PipelineStream.SampleMask = SampleMask; }
+    void ViewInstancingCb( const D3D12_VIEW_INSTANCING_DESC& ViewInstancingDesc ) override { PipelineStream.ViewInstancingDesc = CD3DX12_VIEW_INSTANCING_DESC( ViewInstancingDesc ); }
+    void CachedPSOCb( const D3D12_CACHED_PIPELINE_STATE& CachedPSO ) override { PipelineStream.CachedPSO = CachedPSO; }
+
+private:
+    bool SeenDSS;
+};
+
+inline D3D12_PIPELINE_STATE_SUBOBJECT_TYPE D3DX12GetBaseSubobjectType( D3D12_PIPELINE_STATE_SUBOBJECT_TYPE SubobjectType ) noexcept
+{
+    switch( SubobjectType )
+    {
+    case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1:
+        return D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL;
+    default:
+        return SubobjectType;
+    }
+}
+
+inline HRESULT D3DX12ParsePipelineStream( const D3D12_PIPELINE_STATE_STREAM_DESC& Desc, ID3DX12PipelineParserCallbacks* pCallbacks )
+{
+    if( pCallbacks == nullptr )
+    {
+        return E_INVALIDARG;
+    }
+
+    if( Desc.SizeInBytes == 0 || Desc.pPipelineStateSubobjectStream == nullptr )
+    {
+        pCallbacks->ErrorBadInputParameter( 1 ); // first parameter issue
+        return E_INVALIDARG;
+    }
+
+    bool SubobjectSeen[ D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID ] = {};
+    for( SIZE_T CurOffset = 0, SizeOfSubobject = 0; CurOffset < Desc.SizeInBytes; CurOffset += SizeOfSubobject )
+    {
+        BYTE* pStream = static_cast<BYTE*>(Desc.pPipelineStateSubobjectStream) + CurOffset;
+        auto SubobjectType = *reinterpret_cast<D3D12_PIPELINE_STATE_SUBOBJECT_TYPE*>(pStream);
+        if( SubobjectType < 0 || SubobjectType >= D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID )
+        {
+            pCallbacks->ErrorUnknownSubobject( SubobjectType );
+            return E_INVALIDARG;
+        }
+        if( SubobjectSeen[ D3DX12GetBaseSubobjectType( SubobjectType ) ] )
+        {
+            pCallbacks->ErrorDuplicateSubobject( SubobjectType );
+            return E_INVALIDARG; // disallow subobject duplicates in a stream
+        }
+        SubobjectSeen[ SubobjectType ] = true;
+        switch( SubobjectType )
+        {
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE:
+            pCallbacks->RootSignatureCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::pRootSignature)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::pRootSignature );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS:
+            pCallbacks->VSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::VS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::VS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS:
+            pCallbacks->PSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::PS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::PS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS:
+            pCallbacks->DSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::DS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::DS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS:
+            pCallbacks->HSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::HS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::HS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS:
+            pCallbacks->GSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::GS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::GS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS:
+            pCallbacks->CSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::CS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::CS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_AS:
+            pCallbacks->ASCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM2::AS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM2::AS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS:
+            pCallbacks->MSCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM2::MS)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM2::MS );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT:
+            pCallbacks->StreamOutputCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::StreamOutput)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::StreamOutput );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND:
+            pCallbacks->BlendStateCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::BlendState)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::BlendState );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK:
+            pCallbacks->SampleMaskCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::SampleMask)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::SampleMask );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER:
+            pCallbacks->RasterizerStateCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::RasterizerState)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::RasterizerState );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL:
+            pCallbacks->DepthStencilStateCb( *reinterpret_cast<CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM_DEPTH_STENCIL );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1:
+            pCallbacks->DepthStencilState1Cb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::DepthStencilState)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::DepthStencilState );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT:
+            pCallbacks->InputLayoutCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::InputLayout)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::InputLayout );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE:
+            pCallbacks->IBStripCutValueCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::IBStripCutValue)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::IBStripCutValue );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY:
+            pCallbacks->PrimitiveTopologyTypeCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::PrimitiveTopologyType)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::PrimitiveTopologyType );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS:
+            pCallbacks->RTVFormatsCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::RTVFormats)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::RTVFormats );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT:
+            pCallbacks->DSVFormatCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::DSVFormat)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::DSVFormat );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC:
+            pCallbacks->SampleDescCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::SampleDesc)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::SampleDesc );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK:
+            pCallbacks->NodeMaskCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::NodeMask)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::NodeMask );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO:
+            pCallbacks->CachedPSOCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::CachedPSO)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::CachedPSO );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS:
+            pCallbacks->FlagsCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM::Flags)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM::Flags );
+            break;
+        case D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING:
+            pCallbacks->ViewInstancingCb( *reinterpret_cast<decltype(CD3DX12_PIPELINE_STATE_STREAM1::ViewInstancingDesc)*>(pStream) );
+            SizeOfSubobject = sizeof( CD3DX12_PIPELINE_STATE_STREAM1::ViewInstancingDesc );
+            break;
+        default:
+            pCallbacks->ErrorUnknownSubobject( SubobjectType );
+            return E_INVALIDARG;
+
+        }
+    }
+
+    return S_OK;
+}
+
+//------------------------------------------------------------------------------------------------
+inline bool operator==( const D3D12_CLEAR_VALUE& a, const D3D12_CLEAR_VALUE& b ) noexcept
+{
+    if( a.Format != b.Format ) return false;
+    if( a.Format == DXGI_FORMAT_D24_UNORM_S8_UINT
+        || a.Format == DXGI_FORMAT_D16_UNORM
+        || a.Format == DXGI_FORMAT_D32_FLOAT
+        || a.Format == DXGI_FORMAT_D32_FLOAT_S8X24_UINT )
+    {
+        return (a.DepthStencil.Depth == b.DepthStencil.Depth) &&
+            (a.DepthStencil.Stencil == b.DepthStencil.Stencil);
+    }
+    else
+    {
+        return (a.Color[ 0 ] == b.Color[ 0 ]) &&
+            (a.Color[ 1 ] == b.Color[ 1 ]) &&
+            (a.Color[ 2 ] == b.Color[ 2 ]) &&
+            (a.Color[ 3 ] == b.Color[ 3 ]);
+    }
+}
+inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS& a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS& b ) noexcept
+{
+    return a.ClearValue == b.ClearValue;
+}
+inline bool operator==( const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS& b ) noexcept
+{
+    if( a.pSrcResource != b.pSrcResource ) return false;
+    if( a.pDstResource != b.pDstResource ) return false;
+    if( a.SubresourceCount != b.SubresourceCount ) return false;
+    if( a.Format != b.Format ) return false;
+    if( a.ResolveMode != b.ResolveMode ) return false;
+    if( a.PreserveResolveSource != b.PreserveResolveSource ) return false;
+    return true;
+}
+inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS& a, const D3D12_RENDER_PASS_BEGINNING_ACCESS& b ) noexcept
+{
+    if( a.Type != b.Type ) return false;
+    if( a.Type == D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR && !(a.Clear == b.Clear) ) return false;
+    return true;
+}
+inline bool operator==( const D3D12_RENDER_PASS_ENDING_ACCESS& a, const D3D12_RENDER_PASS_ENDING_ACCESS& b ) noexcept
+{
+    if( a.Type != b.Type ) return false;
+    if( a.Type == D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE && !(a.Resolve == b.Resolve) ) return false;
+    return true;
+}
+inline bool operator==( const D3D12_RENDER_PASS_RENDER_TARGET_DESC& a, const D3D12_RENDER_PASS_RENDER_TARGET_DESC& b ) noexcept
+{
+    if( a.cpuDescriptor.ptr != b.cpuDescriptor.ptr ) return false;
+    if( !(a.BeginningAccess == b.BeginningAccess) ) return false;
+    if( !(a.EndingAccess == b.EndingAccess) ) return false;
+    return true;
+}
+inline bool operator==( const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC& a, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC& b ) noexcept
+{
+    if( a.cpuDescriptor.ptr != b.cpuDescriptor.ptr ) return false;
+    if( !(a.DepthBeginningAccess == b.DepthBeginningAccess) ) return false;
+    if( !(a.StencilBeginningAccess == b.StencilBeginningAccess) ) return false;
+    if( !(a.DepthEndingAccess == b.DepthEndingAccess) ) return false;
+    if( !(a.StencilEndingAccess == b.StencilEndingAccess) ) return false;
+    return true;
+}
+
+
+#ifndef D3DX12_NO_STATE_OBJECT_HELPERS
+
+//================================================================================================
+// D3DX12 State Object Creation Helpers
+//
+// Helper classes for creating new style state objects out of an arbitrary set of subobjects.
+// Uses STL
+//
+// Start by instantiating CD3DX12_STATE_OBJECT_DESC (see it's public methods).
+// One of its methods is CreateSubobject(), which has a comment showing a couple of options for
+// defining subobjects using the helper classes for each subobject (CD3DX12_DXIL_LIBRARY_SUBOBJECT
+// etc.). The subobject helpers each have methods specific to the subobject for configuring it's
+// contents.
+//
+//================================================================================================
+#include <list>
+#include <vector>
+#include <string>
+#include <memory>
+#ifndef D3DX12_USE_ATL
+#include <wrl/client.h>
+#define D3DX12_COM_PTR Microsoft::WRL::ComPtr
+#define D3DX12_COM_PTR_GET(x) x.Get()
+#define D3DX12_COM_PTR_ADDRESSOF(x) x.GetAddressOf()
+#else
+#include <atlbase.h>
+#define D3DX12_COM_PTR ATL::CComPtr
+#define D3DX12_COM_PTR_GET(x) x.p
+#define D3DX12_COM_PTR_ADDRESSOF(x) &x.p
+#endif
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_STATE_OBJECT_DESC
+{
+public:
+    CD3DX12_STATE_OBJECT_DESC() noexcept
+    {
+        Init( D3D12_STATE_OBJECT_TYPE_COLLECTION );
+    }
+    CD3DX12_STATE_OBJECT_DESC( D3D12_STATE_OBJECT_TYPE Type ) noexcept
+    {
+        Init( Type );
+    }
+    void SetStateObjectType( D3D12_STATE_OBJECT_TYPE Type ) noexcept { m_Desc.Type = Type; }
+    operator const D3D12_STATE_OBJECT_DESC& ()
+    {
+        // Do final preparation work
+        m_RepointedAssociations.clear();
+        m_SubobjectArray.clear();
+        m_SubobjectArray.reserve( m_Desc.NumSubobjects );
+        // Flatten subobjects into an array (each flattened subobject still has a
+        // member that's a pointer to it's desc that's not flattened)
+        for( auto Iter = m_SubobjectList.begin();
+             Iter != m_SubobjectList.end(); Iter++ )
+        {
+            m_SubobjectArray.push_back( *Iter );
+            // Store new location in array so we can redirect pointers contained in subobjects
+            Iter->pSubobjectArrayLocation = &m_SubobjectArray.back();
+        }
+        // For subobjects with pointer fields, create a new copy of those subobject definitions
+        // with fixed pointers
+        for( UINT i = 0; i < m_Desc.NumSubobjects; i++ )
+        {
+            if( m_SubobjectArray[ i ].Type == D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION )
+            {
+                auto pOriginalSubobjectAssociation =
+                    static_cast<const D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION*>(m_SubobjectArray[ i ].pDesc);
+                D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION Repointed = *pOriginalSubobjectAssociation;
+                auto pWrapper =
+                    static_cast<const SUBOBJECT_WRAPPER*>(pOriginalSubobjectAssociation->pSubobjectToAssociate);
+                Repointed.pSubobjectToAssociate = pWrapper->pSubobjectArrayLocation;
+                m_RepointedAssociations.push_back( Repointed );
+                m_SubobjectArray[ i ].pDesc = &m_RepointedAssociations.back();
+            }
+        }
+        // Below: using ugly way to get pointer in case .data() is not defined
+        m_Desc.pSubobjects = m_Desc.NumSubobjects ? &m_SubobjectArray[ 0 ] : nullptr;
+        return m_Desc;
+    }
+    operator const D3D12_STATE_OBJECT_DESC* ()
+    {
+        // Cast calls the above final preparation work
+        return &static_cast<const D3D12_STATE_OBJECT_DESC&>(*this);
+    }
+
+    // CreateSubobject creates a sububject helper (e.g. CD3DX12_HIT_GROUP_SUBOBJECT)
+    // whose lifetime is owned by this class.
+    // e.g.
+    //
+    //    CD3DX12_STATE_OBJECT_DESC Collection1(D3D12_STATE_OBJECT_TYPE_COLLECTION);
+    //    auto Lib0 = Collection1.CreateSubobject<CD3DX12_DXIL_LIBRARY_SUBOBJECT>();
+    //    Lib0->SetDXILLibrary(&pMyAppDxilLibs[0]);
+    //    Lib0->DefineExport(L"rayGenShader0"); // in practice these export listings might be
+    //                                          // data/engine driven
+    //    etc.
+    //
+    // Alternatively, users can instantiate sububject helpers explicitly, such as via local
+    // variables instead, passing the state object desc that should point to it into the helper
+    // constructor (or call mySubobjectHelper.AddToStateObject(Collection1)).
+    // In this alternative scenario, the user must keep the subobject alive as long as the state
+    // object it is associated with is alive, else it's pointer references will be stale.
+    // e.g.
+    //
+    //    CD3DX12_STATE_OBJECT_DESC RaytracingState2(D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE);
+    //    CD3DX12_DXIL_LIBRARY_SUBOBJECT LibA(RaytracingState2);
+    //    LibA.SetDXILLibrary(&pMyAppDxilLibs[4]); // not manually specifying exports
+    //                                             // - meaning all exports in the libraries
+    //                                             // are exported
+    //    etc.
+
+    template<typename T>
+    T* CreateSubobject()
+    {
+        T* pSubobject = new T( *this );
+        m_OwnedSubobjectHelpers.emplace_back( pSubobject );
+        return pSubobject;
+    }
+
+private:
+    D3D12_STATE_SUBOBJECT* TrackSubobject( D3D12_STATE_SUBOBJECT_TYPE Type, void* pDesc )
+    {
+        SUBOBJECT_WRAPPER Subobject;
+        Subobject.pSubobjectArrayLocation = nullptr;
+        Subobject.Type = Type;
+        Subobject.pDesc = pDesc;
+        m_SubobjectList.push_back( Subobject );
+        m_Desc.NumSubobjects++;
+        return &m_SubobjectList.back();
+    }
+    void Init( D3D12_STATE_OBJECT_TYPE Type ) noexcept
+    {
+        SetStateObjectType( Type );
+        m_Desc.pSubobjects = nullptr;
+        m_Desc.NumSubobjects = 0;
+        m_SubobjectList.clear();
+        m_SubobjectArray.clear();
+        m_RepointedAssociations.clear();
+    }
+    typedef struct SUBOBJECT_WRAPPER : public D3D12_STATE_SUBOBJECT
+    {
+        D3D12_STATE_SUBOBJECT* pSubobjectArrayLocation; // new location when flattened into array
+                                                        // for repointing pointers in subobjects
+    } SUBOBJECT_WRAPPER;
+    D3D12_STATE_OBJECT_DESC m_Desc;
+    std::list<SUBOBJECT_WRAPPER>   m_SubobjectList; // Pointers to list nodes handed out so
+                                                    // these can be edited live
+    std::vector<D3D12_STATE_SUBOBJECT> m_SubobjectArray; // Built at the end, copying list contents
+
+    std::list<D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION>
+        m_RepointedAssociations; // subobject type that contains pointers to other subobjects,
+                                 // repointed to flattened array
+
+    class StringContainer
+    {
+    public:
+        LPCWSTR LocalCopy( LPCWSTR string, bool bSingleString = false )
+        {
+            if( string )
+            {
+                if( bSingleString )
+                {
+                    m_Strings.clear();
+                    m_Strings.push_back( string );
+                }
+                else
+                {
+                    m_Strings.push_back( string );
+                }
+                return m_Strings.back().c_str();
+            }
+            else
+            {
+                return nullptr;
+            }
+        }
+        void clear() noexcept { m_Strings.clear(); }
+    private:
+        std::list<std::wstring> m_Strings;
+    };
+
+    class SUBOBJECT_HELPER_BASE
+    {
+    public:
+        SUBOBJECT_HELPER_BASE() noexcept { Init(); }
+        virtual ~SUBOBJECT_HELPER_BASE() = default;
+        virtual D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept = 0;
+        void AddToStateObject( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+        {
+            m_pSubobject = ContainingStateObject.TrackSubobject( Type(), Data() );
+        }
+    protected:
+        virtual void* Data() noexcept = 0;
+        void Init() noexcept { m_pSubobject = nullptr; }
+        D3D12_STATE_SUBOBJECT* m_pSubobject;
+    };
+
+#if(__cplusplus >= 201103L)
+    std::list<std::unique_ptr<const SUBOBJECT_HELPER_BASE>> m_OwnedSubobjectHelpers;
+#else
+    class OWNED_HELPER
+    {
+    public:
+        OWNED_HELPER( const SUBOBJECT_HELPER_BASE* pHelper ) noexcept { m_pHelper = pHelper; }
+        ~OWNED_HELPER() { delete m_pHelper; }
+        const SUBOBJECT_HELPER_BASE* m_pHelper;
+    };
+
+    std::list<OWNED_HELPER> m_OwnedSubobjectHelpers;
+#endif
+
+    friend class CD3DX12_DXIL_LIBRARY_SUBOBJECT;
+    friend class CD3DX12_EXISTING_COLLECTION_SUBOBJECT;
+    friend class CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT;
+    friend class CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
+    friend class CD3DX12_HIT_GROUP_SUBOBJECT;
+    friend class CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT;
+    friend class CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT;
+    friend class CD3DX12_RAYTRACING_PIPELINE_CONFIG1_SUBOBJECT;
+    friend class CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT;
+    friend class CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT;
+    friend class CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT;
+    friend class CD3DX12_NODE_MASK_SUBOBJECT;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_DXIL_LIBRARY_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_DXIL_LIBRARY_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_DXIL_LIBRARY_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetDXILLibrary( const D3D12_SHADER_BYTECODE* pCode ) noexcept
+    {
+        static const D3D12_SHADER_BYTECODE Default = {};
+        m_Desc.DXILLibrary = pCode ? *pCode : Default;
+    }
+    void DefineExport(
+        LPCWSTR Name,
+        LPCWSTR ExportToRename = nullptr,
+        D3D12_EXPORT_FLAGS Flags = D3D12_EXPORT_FLAG_NONE )
+    {
+        D3D12_EXPORT_DESC Export;
+        Export.Name = m_Strings.LocalCopy( Name );
+        Export.ExportToRename = m_Strings.LocalCopy( ExportToRename );
+        Export.Flags = Flags;
+        m_Exports.push_back( Export );
+        m_Desc.pExports = &m_Exports[ 0 ];  // using ugly way to get pointer in case .data() is not defined
+        m_Desc.NumExports = static_cast<UINT>(m_Exports.size());
+    }
+    template<size_t N>
+    void DefineExports( LPCWSTR( &Exports )[ N ] )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            DefineExport( Exports[ i ] );
+        }
+    }
+    void DefineExports( const LPCWSTR* Exports, UINT N )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            DefineExport( Exports[ i ] );
+        }
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_DXIL_LIBRARY;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_DXIL_LIBRARY_DESC& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+        m_Strings.clear();
+        m_Exports.clear();
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_DXIL_LIBRARY_DESC m_Desc;
+    CD3DX12_STATE_OBJECT_DESC::StringContainer m_Strings;
+    std::vector<D3D12_EXPORT_DESC> m_Exports;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_EXISTING_COLLECTION_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_EXISTING_COLLECTION_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_EXISTING_COLLECTION_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetExistingCollection( ID3D12StateObject* pExistingCollection ) noexcept
+    {
+        m_Desc.pExistingCollection = pExistingCollection;
+        m_CollectionRef = pExistingCollection;
+    }
+    void DefineExport(
+        LPCWSTR Name,
+        LPCWSTR ExportToRename = nullptr,
+        D3D12_EXPORT_FLAGS Flags = D3D12_EXPORT_FLAG_NONE )
+    {
+        D3D12_EXPORT_DESC Export;
+        Export.Name = m_Strings.LocalCopy( Name );
+        Export.ExportToRename = m_Strings.LocalCopy( ExportToRename );
+        Export.Flags = Flags;
+        m_Exports.push_back( Export );
+        m_Desc.pExports = &m_Exports[ 0 ]; // using ugly way to get pointer in case .data() is not defined
+        m_Desc.NumExports = static_cast<UINT>(m_Exports.size());
+    }
+    template<size_t N>
+    void DefineExports( LPCWSTR( &Exports )[ N ] )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            DefineExport( Exports[ i ] );
+        }
+    }
+    void DefineExports( const LPCWSTR* Exports, UINT N )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            DefineExport( Exports[ i ] );
+        }
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_EXISTING_COLLECTION_DESC& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+        m_CollectionRef = nullptr;
+        m_Strings.clear();
+        m_Exports.clear();
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_EXISTING_COLLECTION_DESC m_Desc;
+    D3DX12_COM_PTR<ID3D12StateObject> m_CollectionRef;
+    CD3DX12_STATE_OBJECT_DESC::StringContainer m_Strings;
+    std::vector<D3D12_EXPORT_DESC> m_Exports;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_SUBOBJECT_TO_EXPORTS_ASSOCIATION_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetSubobjectToAssociate( const D3D12_STATE_SUBOBJECT& SubobjectToAssociate ) noexcept
+    {
+        m_Desc.pSubobjectToAssociate = &SubobjectToAssociate;
+    }
+    void AddExport( LPCWSTR Export )
+    {
+        m_Desc.NumExports++;
+        m_Exports.push_back( m_Strings.LocalCopy( Export ) );
+        m_Desc.pExports = &m_Exports[ 0 ];  // using ugly way to get pointer in case .data() is not defined
+    }
+    template<size_t N>
+    void AddExports( LPCWSTR( &Exports )[ N ] )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            AddExport( Exports[ i ] );
+        }
+    }
+    void AddExports( const LPCWSTR* Exports, UINT N )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            AddExport( Exports[ i ] );
+        }
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+        m_Strings.clear();
+        m_Exports.clear();
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION m_Desc;
+    CD3DX12_STATE_OBJECT_DESC::StringContainer m_Strings;
+    std::vector<LPCWSTR> m_Exports;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION() noexcept
+    {
+        Init();
+    }
+    CD3DX12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetSubobjectNameToAssociate( LPCWSTR SubobjectToAssociate )
+    {
+        m_Desc.SubobjectToAssociate = m_SubobjectName.LocalCopy( SubobjectToAssociate, true );
+    }
+    void AddExport( LPCWSTR Export )
+    {
+        m_Desc.NumExports++;
+        m_Exports.push_back( m_Strings.LocalCopy( Export ) );
+        m_Desc.pExports = &m_Exports[ 0 ];  // using ugly way to get pointer in case .data() is not defined
+    }
+    template<size_t N>
+    void AddExports( LPCWSTR( &Exports )[ N ] )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            AddExport( Exports[ i ] );
+        }
+    }
+    void AddExports( const LPCWSTR* Exports, UINT N )
+    {
+        for( UINT i = 0; i < N; i++ )
+        {
+            AddExport( Exports[ i ] );
+        }
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+        m_Strings.clear();
+        m_SubobjectName.clear();
+        m_Exports.clear();
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION m_Desc;
+    CD3DX12_STATE_OBJECT_DESC::StringContainer m_Strings;
+    CD3DX12_STATE_OBJECT_DESC::StringContainer m_SubobjectName;
+    std::vector<LPCWSTR> m_Exports;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_HIT_GROUP_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_HIT_GROUP_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_HIT_GROUP_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetHitGroupExport( LPCWSTR exportName )
+    {
+        m_Desc.HitGroupExport = m_Strings[ 0 ].LocalCopy( exportName, true );
+    }
+    void SetHitGroupType( D3D12_HIT_GROUP_TYPE Type ) noexcept { m_Desc.Type = Type; }
+    void SetAnyHitShaderImport( LPCWSTR importName )
+    {
+        m_Desc.AnyHitShaderImport = m_Strings[ 1 ].LocalCopy( importName, true );
+    }
+    void SetClosestHitShaderImport( LPCWSTR importName )
+    {
+        m_Desc.ClosestHitShaderImport = m_Strings[ 2 ].LocalCopy( importName, true );
+    }
+    void SetIntersectionShaderImport( LPCWSTR importName )
+    {
+        m_Desc.IntersectionShaderImport = m_Strings[ 3 ].LocalCopy( importName, true );
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_HIT_GROUP_DESC& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+        for( UINT i = 0; i < m_NumStrings; i++ )
+        {
+            m_Strings[ i ].clear();
+        }
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_HIT_GROUP_DESC m_Desc;
+    static const UINT m_NumStrings = 4;
+    CD3DX12_STATE_OBJECT_DESC::StringContainer
+        m_Strings[ m_NumStrings ]; // one string for every entrypoint name
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_RAYTRACING_SHADER_CONFIG_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void Config( UINT MaxPayloadSizeInBytes, UINT MaxAttributeSizeInBytes ) noexcept
+    {
+        m_Desc.MaxPayloadSizeInBytes = MaxPayloadSizeInBytes;
+        m_Desc.MaxAttributeSizeInBytes = MaxAttributeSizeInBytes;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_SHADER_CONFIG;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_RAYTRACING_SHADER_CONFIG& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_RAYTRACING_SHADER_CONFIG m_Desc;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_RAYTRACING_PIPELINE_CONFIG_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void Config( UINT MaxTraceRecursionDepth ) noexcept
+    {
+        m_Desc.MaxTraceRecursionDepth = MaxTraceRecursionDepth;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_RAYTRACING_PIPELINE_CONFIG& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_RAYTRACING_PIPELINE_CONFIG m_Desc;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_RAYTRACING_PIPELINE_CONFIG1_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_RAYTRACING_PIPELINE_CONFIG1_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_RAYTRACING_PIPELINE_CONFIG1_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void Config( UINT MaxTraceRecursionDepth, D3D12_RAYTRACING_PIPELINE_FLAGS Flags ) noexcept
+    {
+        m_Desc.MaxTraceRecursionDepth = MaxTraceRecursionDepth;
+        m_Desc.Flags = Flags;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG1;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_RAYTRACING_PIPELINE_CONFIG1& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_RAYTRACING_PIPELINE_CONFIG1 m_Desc;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_GLOBAL_ROOT_SIGNATURE_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetRootSignature( ID3D12RootSignature* pRootSig ) noexcept
+    {
+        m_pRootSig = pRootSig;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_GLOBAL_ROOT_SIGNATURE;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator ID3D12RootSignature* () const noexcept { return D3DX12_COM_PTR_GET( m_pRootSig ); }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_pRootSig = nullptr;
+    }
+    void* Data() noexcept override { return D3DX12_COM_PTR_ADDRESSOF( m_pRootSig ); }
+    D3DX12_COM_PTR<ID3D12RootSignature> m_pRootSig;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_LOCAL_ROOT_SIGNATURE_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetRootSignature( ID3D12RootSignature* pRootSig ) noexcept
+    {
+        m_pRootSig = pRootSig;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_LOCAL_ROOT_SIGNATURE;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator ID3D12RootSignature* () const noexcept { return D3DX12_COM_PTR_GET( m_pRootSig ); }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_pRootSig = nullptr;
+    }
+    void* Data() noexcept override { return D3DX12_COM_PTR_ADDRESSOF( m_pRootSig ); }
+    D3DX12_COM_PTR<ID3D12RootSignature> m_pRootSig;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_STATE_OBJECT_CONFIG_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetFlags( D3D12_STATE_OBJECT_FLAGS Flags ) noexcept
+    {
+        m_Desc.Flags = Flags;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_STATE_OBJECT_CONFIG;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_STATE_OBJECT_CONFIG& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_STATE_OBJECT_CONFIG m_Desc;
+};
+
+//------------------------------------------------------------------------------------------------
+class CD3DX12_NODE_MASK_SUBOBJECT
+    : public CD3DX12_STATE_OBJECT_DESC::SUBOBJECT_HELPER_BASE
+{
+public:
+    CD3DX12_NODE_MASK_SUBOBJECT() noexcept
+    {
+        Init();
+    }
+    CD3DX12_NODE_MASK_SUBOBJECT( CD3DX12_STATE_OBJECT_DESC& ContainingStateObject )
+    {
+        Init();
+        AddToStateObject( ContainingStateObject );
+    }
+    void SetNodeMask( UINT NodeMask ) noexcept
+    {
+        m_Desc.NodeMask = NodeMask;
+    }
+    D3D12_STATE_SUBOBJECT_TYPE Type() const noexcept override
+    {
+        return D3D12_STATE_SUBOBJECT_TYPE_NODE_MASK;
+    }
+    operator const D3D12_STATE_SUBOBJECT& () const noexcept { return *m_pSubobject; }
+    operator const D3D12_NODE_MASK& () const noexcept { return m_Desc; }
+private:
+    void Init() noexcept
+    {
+        SUBOBJECT_HELPER_BASE::Init();
+        m_Desc = {};
+    }
+    void* Data() noexcept override { return &m_Desc; }
+    D3D12_NODE_MASK m_Desc;
+};
+
+#undef D3DX12_COM_PTR
+#undef D3DX12_COM_PTR_GET
+#undef D3DX12_COM_PTR_ADDRESSOF
+#endif // #ifndef D3DX12_NO_STATE_OBJECT_HELPERS
+
+#endif // defined( __cplusplus )
+
+#endif //__D3DX12_H__