We only uses one depth buffer now
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
class DrawFinalPass
|
||||
{
|
||||
public:
|
||||
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass);
|
||||
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass, GLuint* depthBuffer);
|
||||
~DrawFinalPass() { }
|
||||
void InitializeTextures();
|
||||
void InitializeFrameBuffers();
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
GLuint m_SceneTexture;
|
||||
GLuint m_BloomTextureLowRes;
|
||||
GLuint m_SceneTextureLowRes;
|
||||
GLuint m_DepthBuffer;
|
||||
GLuint* m_DepthBuffer;
|
||||
GLuint m_DepthBufferLowRes;
|
||||
GLuint m_CubeMapTexture;
|
||||
|
||||
|
||||
@@ -33,15 +33,6 @@ public:
|
||||
~Texture2D();
|
||||
};
|
||||
|
||||
class Texture2DMultiSample : public ResourceType<GL_TEXTURE_2D_MULTISAMPLE>
|
||||
{
|
||||
public:
|
||||
Texture2DMultiSample(GLuint* resourceHandle, GLenum attachment)
|
||||
: ResourceType(resourceHandle, attachment) { };
|
||||
|
||||
~Texture2DMultiSample();
|
||||
};
|
||||
|
||||
class RenderBuffer : public ResourceType<GL_RENDERBUFFER>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -28,15 +28,13 @@ public:
|
||||
const ShaderProgram& PickingProgram() const { return *m_PickingProgram; }
|
||||
//const std::unordered_map<glm::ivec2, EntityID>& PickingColorsToEntity() const { return m_PickingColorsToEntity; }
|
||||
GLuint PickingTexture() const { return m_PickingTexture; }
|
||||
GLuint DepthBuffer() const { return m_DepthBuffer; }
|
||||
GLuint* DepthBuffer() { return &m_DepthBuffer; }
|
||||
const FrameBuffer& PickingBuffer() const { return m_PickingBuffer; }
|
||||
|
||||
|
||||
PickData Pick(glm::vec2 screenCoord);
|
||||
|
||||
private:
|
||||
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type) const;
|
||||
|
||||
EventBroker* m_EventBroker;
|
||||
|
||||
const IRenderer* m_Renderer;
|
||||
|
||||
@@ -24,6 +24,8 @@ public:
|
||||
bool StencilFunc(GLenum func, GLint ref, GLuint mask);
|
||||
bool StencilMask(GLuint mask);
|
||||
bool DepthMask(GLboolean flag);
|
||||
bool DepthFunc(GLenum func);
|
||||
bool AlphaFunc(GLenum func, GLclampf thresholder);
|
||||
|
||||
private:
|
||||
std::vector<std::function<void(void)>> m_ResetFunctions;
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace CommonFunctions
|
||||
{
|
||||
Texture* LoadTexture(std::string path, bool threaded);
|
||||
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type);
|
||||
void GenerateMultiSampleTexture(GLuint* texture, int numSamples, glm::vec2 dimensions, GLint internalFormat);
|
||||
void GenerateMipMapTexture(GLuint* texture, GLenum wrapping, glm::vec2 dimensions, GLint format, GLenum type, GLint numMipMaps);
|
||||
void DeleteTexture(GLuint* texture);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user