Browse Source

Schnelleres rendern

Kolja Strohm 5 years ago
parent
commit
e291f07e96
6 changed files with 76 additions and 76 deletions
  1. 1 1
      Bildschirm.cpp
  2. 15 15
      DX12PixelShader.h
  3. 21 21
      DX12VertexShader.h
  4. 4 4
      UIMLView.cpp
  5. 16 16
      UIPixelShader.h
  6. 19 19
      UIVertexShader.h

+ 1 - 1
Bildschirm.cpp

@@ -545,9 +545,9 @@ void Bildschirm3D::render() // Zeichnet das Bild
         if( renderOnTop &&onTop )
             onTop->render( *ui );
     }
+    unlock();
     api->presentFrame();
     renderZeit->messungEnde();
-    unlock();
 #ifdef _DEBUG
     //std::cout << renderZeit->getSekunden() << "\n";
 #endif

+ 15 - 15
DX12PixelShader.h

@@ -92,10 +92,10 @@ ret
 
 const BYTE DX12PixelShaderBytes[] =
 {
-     68,  88,  66,  67, 162,  87, 
-    246, 169, 127,  73,  96, 252, 
-     44,  51, 112,   4,  21,  13, 
-    157,   3,   1,   0,   0,   0, 
+     68,  88,  66,  67,  99,  35, 
+    117, 174,  60,  32,  37, 186, 
+    120,  13, 222,  38, 125,  80, 
+    159, 110,   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,  72, 146, 118,  92, 
-      1,   0,   0,   0, 135, 237, 
-    167, 157,  16, 115, 104,  75, 
-    147,  31,  33,  38, 134, 108, 
-    242,  49,   0,   0,   0,   0, 
+     49,   1, 114, 208, 119,  92, 
+      1,   0,   0,   0, 238, 247, 
+     46, 207, 201, 186, 199,  79, 
+    138, 248, 190, 253, 211, 255, 
+    109,  80,   0,   0,   0,   0, 
       0,   0,   0,   0,   1,   0, 
       0,   0,   1,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1788,7 +1788,7 @@ const BYTE DX12PixelShaderBytes[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  27, 226, 
      48,   1, 128,   0,   0,   0, 
-     52,  34, 101, 101, 161, 206, 
+     94, 142,  31,   9,  95, 207, 
     212,   1,   1,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -3427,7 +3427,7 @@ const BYTE DX12PixelShaderBytes[] =
       2,   0,   9,   0, 220,   4, 
       0,   0,   0,   0,   0,   0, 
     156,   1,   0,   0,   1,   0, 
-      0,   0, 120, 121,  71,   3, 
+      0,   0, 120, 122,  72,   3, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 109,  97, 105, 110, 
       0, 110, 111, 110, 101,   0, 
@@ -3494,10 +3494,10 @@ const BYTE DX12PixelShaderBytes[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-     72, 146, 118,  92,   1,   0, 
-      0,   0, 135, 237, 167, 157, 
-     16, 115, 104,  75, 147,  31, 
-     33,  38, 134, 108, 242,  49, 
+    114, 208, 119,  92,   1,   0, 
+      0,   0, 238, 247,  46, 207, 
+    201, 186, 199,  79, 138, 248, 
+    190, 253, 211, 255, 109,  80, 
     137,   0,   0,   0,  47,  76, 
     105, 110, 107,  73, 110, 102, 
     111,   0,  47, 110,  97, 109, 

+ 21 - 21
DX12VertexShader.h

@@ -129,10 +129,10 @@ ret
 
 const BYTE DX12VertexShaderBytes[] =
 {
-     68,  88,  66,  67,  61, 213, 
-    106, 130,  71, 176,   0,  35, 
-     58, 219, 161, 175, 175, 126, 
-    191, 170,   1,   0,   0,   0, 
+     68,  88,  66,  67, 201,  27, 
+    159,  26, 251, 112, 211,  98, 
+    108, 116, 231, 205,  62,  63, 
+    162,   7,   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,  73, 146, 
-    118,  92,   1,   0,   0,   0, 
-    199, 159,   5, 142,  21,  53, 
-     20,  64, 155, 142, 123, 147, 
-    198, 149,  13,  42,   0,   0, 
+    148,  46,  49,   1, 114, 208, 
+    119,  92,   1,   0,   0,   0, 
+    239, 243, 204, 150,  75, 190, 
+    102,  79, 182,  88, 133,  46, 
+     18, 196, 251,  31,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       1,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -1095,7 +1095,7 @@ const BYTE DX12VertexShaderBytes[] =
       0,   0, 103, 159,   1,   0, 
     179, 120,   1,   0, 238,  97, 
       2,   0,  90,  28,   0,   0, 
-     19,  95,   3,   0,  53, 174, 
+      8,  85,   1,   0,  53, 174, 
       3,   0, 206,  21,   0,   0, 
     193, 205,   3,   0, 207, 193, 
       1,   0,  62,   3,   3,   0, 
@@ -1684,8 +1684,8 @@ const BYTE DX12VertexShaderBytes[] =
     111, 110,  59,  13,  10, 125, 
      59,  13,  10,  13,  10,  47, 
      27, 226,  48,   1, 128,   0, 
-      0,   0, 247,  23, 168, 101, 
-    161, 206, 212,   1,   1,   0, 
+      0,   0,   3, 158,  92,   9, 
+     95, 207, 212,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -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, 
-    112, 123,   0,   0, 242, 241, 
+    128, 123,   0,   0, 242, 241, 
      10,   0,  24,  21,  14,  16, 
       0,   0,   1,   0,   0,   2, 
      18,   0,  22,  21,  10,  16, 
@@ -3148,19 +3148,19 @@ const BYTE DX12VertexShaderBytes[] =
       1,   0,   0,   0,   0,   0, 
       0,   0,  24,   4,   0,   0, 
      32,   0,   0,  96,   0,   0, 
-      0,   0,   0,   0,   0,   0, 
+    251,  31,   0,   0,   0,   0, 
       0,   0,   0,   0,   2,   0, 
       9,   0, 132,   5,   0,   0, 
       0,   0,   0,   0, 236,   2, 
       0,   0,   1,   0,   0,   0, 
-    232, 121, 240,   3,   0,   0, 
+     56, 122,  67,   3,   0,   0, 
       0,   0,   0,   0,   0,   0, 
     109,  97, 105, 110,   0, 110, 
     111, 110, 101,   0,   0,   0, 
      45, 186,  46, 241,   1,   0, 
       0,   0,   0,   0,   0,   0, 
      24,   4,   0,   0,  32,   0, 
-      0,  96,   0,   0,   0,   0, 
+      0,  96,   0,   0, 251,  31, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   2,   0,   2,   0, 
       7,   0,   0,   0,   0,   0, 
@@ -3219,11 +3219,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,  73, 146, 
-    118,  92,   1,   0,   0,   0, 
-    199, 159,   5, 142,  21,  53, 
-     20,  64, 155, 142, 123, 147, 
-    198, 149,  13,  42, 138,   0, 
+    148,  46,  49,   1, 114, 208, 
+    119,  92,   1,   0,   0,   0, 
+    239, 243, 204, 150,  75, 190, 
+    102,  79, 182,  88, 133,  46, 
+     18, 196, 251,  31, 138,   0, 
       0,   0,  47,  76, 105, 110, 
     107,  73, 110, 102, 111,   0, 
      47, 110,  97, 109, 101, 115, 

+ 4 - 4
UIMLView.cpp

@@ -249,7 +249,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
         if( e->hasAttribute( "align-left" ) )
         {
             Text la = e->getAttributeValue( "align-left" );
-            int x;
+            int x = 0;
             if( la.istGleich( "start" ) )
                 x = 0;
             else if( la.istGleich( "end" ) )
@@ -276,7 +276,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
         else if( e->hasAttribute( "align-right" ) )
         {
             Text ra = e->getAttributeValue( "align-right" );
-            int x;
+            int x = 0;
             if( ra.istGleich( "start" ) )
                 x = -z->getBreite();
             else if( ra.istGleich( "end" ) )
@@ -303,7 +303,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
         if( e->hasAttribute( "align-top" ) )
         {
             Text ta = e->getAttributeValue( "align-top" );
-            int y;
+            int y = 0;
             if( ta.istGleich( "start" ) )
                 y = 0;
             else if( ta.istGleich( "end" ) )
@@ -330,7 +330,7 @@ void UIMLView::layout( XML::Element *e, int pWidth, int pHeight )
         else if( e->hasAttribute( "align-bottom" ) )
         {
             Text ba = e->getAttributeValue( "align-bottom" );
-            int y;
+            int y = 0;
             if( ba.istGleich( "start" ) )
                 y = -z->getHeight();
             else if( ba.istGleich( "end" ) )

+ 16 - 16
UIPixelShader.h

@@ -262,10 +262,10 @@ ret
 
 const BYTE UIPixelShader[] =
 {
-     68,  88,  66,  67, 225, 118, 
-    206,   4,  68, 104,  94, 173, 
-    222,  72, 101, 149, 220, 231, 
-      2, 155,   1,   0,   0,   0, 
+     68,  88,  66,  67, 165,  20, 
+    193,  31,  46, 135,  50, 132, 
+    186,  35, 247, 116,  13, 110, 
+    131, 186,   1,   0,   0,   0, 
     136, 104,   0,   0,   6,   0, 
       0,   0,  56,   0,   0,   0, 
     124,   5,   0,   0,  12,   6, 
@@ -1480,10 +1480,10 @@ const BYTE UIPixelShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0, 148,  46,  49,   1, 
-     73, 146, 118,  92,   1,   0, 
-      0,   0,  92,   4,  33,  44, 
-    185,  95, 161,  69, 165, 149, 
-     45,  60,  87, 212, 139,  64, 
+    114, 208, 119,  92,   1,   0, 
+      0,   0,  13, 121, 218,  52, 
+    128, 202, 104,  71, 137,  27, 
+     45, 100,  19, 239,  86, 197, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   1,   0,   0,   0, 
       1,   0,   0,   0,   0,   0, 
@@ -2419,8 +2419,8 @@ const BYTE UIPixelShader[] =
      32,  32,  32,  32,  32,  32, 
      32,  32,  32,  32,  32,  32, 
      27, 226,  48,   1, 128,   0, 
-      0,   0, 233, 246, 207, 101, 
-    161, 206, 212,   1,   1,   0, 
+      0,   0,  83,   9, 129,   9, 
+     95, 207, 212,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -4400,7 +4400,7 @@ const BYTE UIPixelShader[] =
       9,   0, 160,   7,   0,   0, 
       0,   0,   0,   0, 244,   9, 
       0,   0,   1,   0,   0,   0, 
-    168, 123,  90,   3,   0,   0, 
+    216, 121, 224,   3,   0,   0, 
       0,   0,   0,   0,   0,   0, 
      84, 101, 120, 116, 117, 114, 
     101,  80, 105, 120, 101, 108, 
@@ -4466,11 +4466,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,  73, 146, 
-    118,  92,   1,   0,   0,   0, 
-     92,   4,  33,  44, 185,  95, 
-    161,  69, 165, 149,  45,  60, 
-     87, 212, 139,  64, 137,   0, 
+    148,  46,  49,   1, 114, 208, 
+    119,  92,   1,   0,   0,   0, 
+     13, 121, 218,  52, 128, 202, 
+    104,  71, 137,  27,  45, 100, 
+     19, 239,  86, 197, 137,   0, 
       0,   0,  47,  76, 105, 110, 
     107,  73, 110, 102, 111,   0, 
      47, 110,  97, 109, 101, 115, 

+ 19 - 19
UIVertexShader.h

@@ -119,10 +119,10 @@ ret
 
 const BYTE UIVertexShader[] =
 {
-     68,  88,  66,  67, 134,   8, 
-    245, 230, 181, 235, 236,  38, 
-     86, 233, 124, 199,   8, 145, 
-    108, 165,   1,   0,   0,   0, 
+     68,  88,  66,  67, 248, 132, 
+    114, 150, 134,  87,  43, 137, 
+    106, 208,  68, 239, 161,  92, 
+     78,  84,   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, 
-     73, 146, 118,  92,   1,   0, 
-      0,   0, 242, 233, 193, 126, 
-     96, 183,  77,  71, 180,  88, 
-    177, 188,   4, 214, 189,  55, 
+    115, 208, 119,  92,   1,   0, 
+      0,   0, 180,  24, 238, 137, 
+    214, 102,   7,  72, 140, 217, 
+    238, 110,  86,  86, 195, 139, 
       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, 178, 148,  15, 102, 
-    161, 206, 212,   1,   1,   0, 
+      0,   0, 248,  57, 192,   9, 
+     95, 207, 212,   1,   1,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
@@ -2934,13 +2934,13 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   1,   0, 
       0,   0,   0,   0,   0,   0, 
     196,   3,   0,   0,  32,   0, 
-      0,  96,   0,   0, 189,  55, 
+      0,  96,   0,   0, 195, 139, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   2,   0,   9,   0, 
      80,   5,   0,   0,   0,   0, 
       0,   0, 236,   2,   0,   0, 
-      1,   0,   0,   0,  56, 121, 
-      0,   3,   0,   0,   0,   0, 
+      1,   0,   0,   0, 248, 122, 
+    169,   3,   0,   0,   0,   0, 
       0,   0,   0,   0,  84, 101, 
     120, 116, 117, 114, 101,  86, 
     101, 114, 116, 101, 120,  83, 
@@ -2950,7 +2950,7 @@ const BYTE UIVertexShader[] =
       1,   0,   0,   0,   0,   0, 
       0,   0, 196,   3,   0,   0, 
      32,   0,   0,  96,   0,   0, 
-    189,  55,   0,   0,   0,   0, 
+    195, 139,   0,   0,   0,   0, 
       0,   0,   0,   0,   2,   0, 
       2,   0,   7,   0,   0,   0, 
       0,   0,   1,   0, 255, 255, 
@@ -3006,11 +3006,11 @@ const BYTE UIVertexShader[] =
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0,   0,   0, 
       0,   0,   0,   0, 148,  46, 
-     49,   1,  73, 146, 118,  92, 
-      1,   0,   0,   0, 242, 233, 
-    193, 126,  96, 183,  77,  71, 
-    180,  88, 177, 188,   4, 214, 
-    189,  55, 138,   0,   0,   0, 
+     49,   1, 115, 208, 119,  92, 
+      1,   0,   0,   0, 180,  24, 
+    238, 137, 214, 102,   7,  72, 
+    140, 217, 238, 110,  86,  86, 
+    195, 139, 138,   0,   0,   0, 
      47,  76, 105, 110, 107,  73, 
     110, 102, 111,   0,  47, 110, 
      97, 109, 101, 115,   0,  47,