Skip to content

Commit

Permalink
Revert "Code Cleanup & Fixes"
Browse files Browse the repository at this point in the history
This reverts commit eb3ad3a.
  • Loading branch information
kirides committed Jul 3, 2021
1 parent 48fa550 commit 09908f2
Show file tree
Hide file tree
Showing 18 changed files with 273 additions and 668 deletions.
3 changes: 1 addition & 2 deletions D3D11Engine/BaseAntTweakBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ void BaseAntTweakBar::InitTextureSettingsBar() {

std::string enumDef = "";

static std::set<zCTexture*> emptyTextures;
const std::set<zCTexture*>& frameTextures = emptyTextures;
const std::set<zCTexture*>& frameTextures = Engine::GraphicsEngine->GetFrameTextures();
if ( !frameTextures.size() ) {
return;
}
Expand Down
3 changes: 3 additions & 0 deletions D3D11Engine/BaseGraphicsEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ class BaseGraphicsEngine {
/** Returns the data of the backbuffer */
virtual void GetBackbufferData( byte** data, int& pixelsize ) {}

/** Returns the textures drawn this frame */
virtual const std::set<zCTexture*>& GetFrameTextures() { static auto empty = std::set<zCTexture*>(); return empty; }

/** Draws a fullscreenquad, copying the given texture to the viewport */
virtual void DrawQuad( INT2 position, INT2 size ) {}

Expand Down
5 changes: 4 additions & 1 deletion D3D11Engine/D3D11Effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ XRESULT D3D11Effect::DrawRain() {
// Disable depth-write
state.DepthState.DepthWriteEnabled = false;
state.DepthState.SetDirty();
state.DepthState.DepthBufferCompareFunc = GothicDepthBufferStateInfo::DEFAULT_DEPTH_COMP_STATE;

// Disable culling
state.RasterizerState.CullMode = GothicRasterizerStateInfo::CM_CULL_NONE;
Expand Down Expand Up @@ -256,6 +257,8 @@ XRESULT D3D11Effect::DrawRain() {
// Reset this
e->GetContext()->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );
e->GetContext()->GSSetShader( nullptr, 0, 0 );

e->SetDefaultStates();
return XR_SUCCESS;
}

Expand Down Expand Up @@ -404,4 +407,4 @@ HRESULT LoadTextureArray( Microsoft::WRL::ComPtr<ID3D11Device1> pd3dDevice, Micr
LE( pd3dDevice->CreateShaderResourceView( *ppTex2D, &SRVDesc, ppSRV ) );

return hr;
}
}
131 changes: 0 additions & 131 deletions D3D11Engine/D3D11Engine.vcxproj

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions D3D11Engine/D3D11Engine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,6 @@
<ClInclude Include="zQuat.h">
<Filter>ZenGin\Classes</Filter>
</ClInclude>
<ClInclude Include="GothicMemoryLocations1_12f.h">
<Filter>ZenGin</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
Expand Down
Loading

0 comments on commit 09908f2

Please sign in to comment.