Skip to content

Commit

Permalink
feat: add reflection pass (#72)
Browse files Browse the repository at this point in the history
* feat: add reflection pass

#65

Signed-off-by: Michael Pollind <[email protected]>

* feat: add back reflection pass

Signed-off-by: Michael Pollind <[email protected]>

* feat: add illumination pass

Signed-off-by: Michael Pollind <[email protected]>

* feat: update vcpkg

Signed-off-by: Michael Pollind <[email protected]>

* feat: fix build errors

Signed-off-by: Michael Pollind <[email protected]>

---------

Signed-off-by: Michael Pollind <[email protected]>
  • Loading branch information
pollend authored Sep 6, 2023
1 parent 9b3af45 commit 47becbf
Show file tree
Hide file tree
Showing 13 changed files with 2,717 additions and 2,096 deletions.
17 changes: 11 additions & 6 deletions HPL2/include/graphics/RenderList.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "graphics/Enum.h"
#include <graphics/GraphicsTypes.h>
#include <span>
#include <array>

namespace hpl {

Expand All @@ -36,20 +37,25 @@ namespace hpl {
cRenderList();
~cRenderList();

[[deprecated("use BeginAndReset")]]
void Setup(float afFrameTime, cFrustum *apFrustum);
[[deprecated("Use BeginAndReset")]]
void Clear();

void AddObject(iRenderable *apObject);

[[deprecated("Use End")]]
void Compile(tRenderListCompileFlag aFlags);

bool ArrayHasObjects(eRenderListType aType);

std::span<iRenderable*> GetRenderableItems(eRenderListType aType);
std::span<iRenderable*> GetOcclusionQueryItems();
std::span<cFogArea*> GetFogAreas();
std::span<iLight*> GetLights();

void Clear();
void BeginAndReset(float frameTime, cFrustum* frustum);
void End(tRenderListCompileFlag aFlags);

iLight* GetLight(int alIdx){ return m_lights[alIdx];}
int GetLightNum(){ return(int)m_lights.size();}
Expand All @@ -67,8 +73,8 @@ namespace hpl {
iRenderable* GetTransObject(int alIdx){ return m_transObjects[alIdx];}

private:
float m_frameTime;
cFrustum* m_frustum;
float m_frameTime = 0.0f;
cFrustum* m_frustum = nullptr;

std::vector<iRenderable*> m_occlusionQueryObjects;
std::vector<iRenderable*> m_solidObjects;
Expand All @@ -77,8 +83,7 @@ namespace hpl {
std::vector<iRenderable*> m_illumObjects;
std::vector<iLight*> m_lights;
std::vector<cFogArea*> m_fogAreas;

tRenderableVec m_sortedArrays[eRenderListType_LastEnum];
std::array<std::vector<iRenderable*>,eRenderListType_LastEnum> m_sortedArrays;
};

//---------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion HPL2/include/graphics/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ namespace hpl {
friend class cRenderSettings;
public:

iRenderer(const tString& asName, cGraphics *apGraphics,cResources* apResources, int alNumOfProgramComboModes);
iRenderer(const tString& asName, cGraphics *apGraphics,cResources* apResources);
virtual ~iRenderer();

// plan to just use the single draw call need to call BeginRendering to setup state
Expand Down
Loading

0 comments on commit 47becbf

Please sign in to comment.