Skip to content

Commit

Permalink
Merge pull request #116 from OSS-Cosmic/feature/replace-RendererDefer…
Browse files Browse the repository at this point in the history
…red-with-RendererDeferred2

feat: replace cRendererDeferred with cRendererDeferred2
  • Loading branch information
pollend authored Jan 8, 2024
2 parents d7e2d64 + 793e4a7 commit e10811f
Show file tree
Hide file tree
Showing 15 changed files with 2,701 additions and 8,147 deletions.
34 changes: 34 additions & 0 deletions HPL2/include/graphics/RangeSubsetAlloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#pragma once

#include <cstdint>

namespace hpl::graphics {

struct RangeSubsetAlloc {
public:
struct RangeSubset {
uint32_t m_start = 0;
uint32_t m_end = 0;
inline uint32_t size() {
return m_end - m_start;
}
};
RangeSubsetAlloc(uint32_t& index)
: m_index(index)
, m_start(index) {
}
uint32_t Increment() {
return (m_index++);
}
RangeSubset End() {
uint32_t start = m_start;
m_start = m_index;
return RangeSubset{ start, m_index };
}

private:
uint32_t& m_index;
uint32_t m_start;
};

} // namespace hpl::graphics
24 changes: 0 additions & 24 deletions HPL2/include/graphics/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,6 @@ namespace hpl {
class RenderCallbackMessage;
class iRenderer;

namespace rendering::detail {


// bool IsRenderableNodeIsVisible(iRenderableContainerNode* apNode, std::span<cPlanef> clipPlanes);
// bool IsObjectIsVisible(iRenderable* object, tRenderableFlag neededFlags, std::span<cPlanef> clipPlanes = {});

// void WalkAndPrepareRenderList(iRenderableContainer* container,cFrustum* frustum, std::function<void(iRenderable*)> handler, tRenderableFlag renderableFlag);

// void UpdateRenderListWalkAllNodesTestFrustumAndVisibility(
// cRenderList* apRenderList,
// cFrustum* frustum,
// iRenderableContainerNode* apNode,
// std::span<cPlanef> clipPlanes,
// tRenderableFlag neededFlags);

// void UpdateRenderListWalkAllNodesTestFrustumAndVisibility(
// cRenderList* apRenderList,
// cFrustum* frustum,
// iRenderableContainer* apContainer,
// std::span<cPlanef> clipPlanes,
// tRenderableFlag neededFlags);
}

class cRenderSettings
{
public:
Expand Down Expand Up @@ -187,7 +164,6 @@ namespace hpl {
bool abSendFrameBufferToPostEffects, bool abAtStartOfRendering=true);
cResources* mpResources;

float mfCurrentFrameTime;
cRenderSettings *mpCurrentSettings;

static int mlRenderFrameCount;
Expand Down
Loading

0 comments on commit e10811f

Please sign in to comment.