Browse Source

Fehler behoben

Kolja Strohm 5 years ago
parent
commit
6c5df0fa6a
1 changed files with 6 additions and 6 deletions
  1. 6 6
      DX11GraphicsApi.cpp

+ 6 - 6
DX11GraphicsApi.cpp

@@ -517,7 +517,7 @@ void DirectX11::initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fu
 void DirectX11::update()
 {
     if( pointLights )
-        pointLights->release();
+        pointLights = (DX11StructuredBuffer *)pointLights->release();
     if( vertexBuffer )
         vertexBuffer = (DX11Buffer *)vertexBuffer->release();
     if( indexBuffer )
@@ -644,9 +644,9 @@ void DirectX11::renderObject( Model3D * zObj )
         pixelShader->füllConstBuffer( (char *)matirialBuffer, 1, sizeof( float ) * 3 );
     unsigned int offset = 0;
     unsigned int es = (unsigned)vertexBuffer->getElementLength();
-    ID3D11Buffer * vBuffer = vertexBuffer->zBuffer();
+    ID3D11Buffer *vBuffer = vertexBuffer->zBuffer();
     d3d11Context->IASetVertexBuffers( 0, 1, &vBuffer, &es, &offset );
-    Model3DTextur * zTextur = zObj->zTextur();
+    Model3DTextur *zTextur = zObj->zTextur();
     int ind = 0;
     for( auto i = zObj->zModelData()->getPolygons(); i; i++ )
     {
@@ -654,7 +654,7 @@ void DirectX11::renderObject( Model3D * zObj )
         indexBuffer->setLength( sizeof( int ) * i->indexAnz );
         indexBuffer->copieren();
         Textur *t = zTextur->zPolygonTextur( ind );
-        if( t &&t->brauchtUpdate() )
+        if( t && t->brauchtUpdate() )
             t->updateTextur();
         DXGI_FORMAT f = DXGI_FORMAT_R32_UINT;
         if( indexBuffer->getElementLength() == 2 )
@@ -699,7 +699,7 @@ bool DirectX11::isInFrustrum( const Vec3< float > & pos, float radius, float *di
             return 0;
     }
     if( dist )
-        * dist = kamPos.abstand( pos );
+        *dist = kamPos.abstand( pos );
     return 1;
 }
 
@@ -860,7 +860,7 @@ Textur *DirectX11::createOrGetTextur( const char *name, Bild * b )
 typedef HRESULT( *CreateDXGIFactory2Function )( UINT, REFIID, void ** );
 
 typedef HRESULT( *D3D11CreateDeviceFunction )( IDXGIAdapter *, D3D_DRIVER_TYPE, HMODULE, UINT, D3D_FEATURE_LEVEL *,
-                                               UINT, UINT, ID3D11Device **, D3D_FEATURE_LEVEL *, ID3D11DeviceContext ** );
+                                               UINT, UINT, ID3D11Device * *, D3D_FEATURE_LEVEL *, ID3D11DeviceContext * * );
 
 bool DirectX11::isAvailable()
 {