not need this
This commit is contained in:
1 parent
1ba2538baf
commit
bfdaef5643
7 files changed
+404
-437
No files matched your search
@@ -9,8 +9,6 @@
|
||||
|
||||
#include "include/Render/SalmonRender/BackgroundCubemap.h"
|
||||
|
||||
#include "include/Render/RenderInterface.h"
|
||||
|
||||
#include "include/Render/SalmonRender/Cameras.h"
|
||||
|
||||
namespace SE
|
||||
@@ -18,9 +16,20 @@ namespace SE
|
||||
|
||||
|
||||
|
||||
class TSalmonRendererInterface : public TRendererInterface
|
||||
class TSalmonRendererInterface
|
||||
{
|
||||
protected:
|
||||
|
||||
int ScreenWidth;
|
||||
int ScreenHeight;
|
||||
|
||||
float MatrixWidth;
|
||||
float MatrixHeight;
|
||||
|
||||
mat4 ProjectionModelviewMatrix;
|
||||
|
||||
std::stack<mat4> ProjectionMatrixStack;
|
||||
std::stack<mat4> ModelviewMatrixStack;
|
||||
|
||||
mat4 CamModelViewMatrix;
|
||||
mat4 CamInversedModelViewMatrix;
|
||||
@@ -29,7 +38,11 @@ protected:
|
||||
|
||||
vec3 CamPos; //Do not change - call CalcCamPos instead
|
||||
|
||||
|
||||
virtual void TryEnableVertexAttribArrays();
|
||||
virtual void TryDisableVertexAttribArrays();
|
||||
virtual void DrawQuad(const T2DQuad& quad) = 0;
|
||||
|
||||
public:
|
||||
|
||||
TCamera Camera;
|
||||
@@ -48,6 +61,31 @@ public:
|
||||
|
||||
virtual void SetUniforms();
|
||||
|
||||
virtual int GetScreenWidth();
|
||||
virtual int GetScreenHeight();
|
||||
|
||||
virtual float GetMatrixWidth();
|
||||
virtual float GetMatrixHeight();
|
||||
|
||||
virtual void SetMatrixWidth(float matrixWidth);
|
||||
virtual void SetMatrixHeight(float matrixHeight);
|
||||
|
||||
virtual void PushMatrix();
|
||||
virtual void LoadIdentity();
|
||||
virtual void TranslateMatrix(const vec3& p);
|
||||
virtual void ScaleMatrix(float scale);
|
||||
virtual void ScaleMatrix(const vec3& scale);
|
||||
virtual void RotateMatrix(const vec4& q);
|
||||
virtual void PushSpecialMatrix(const mat4& m);
|
||||
virtual void PopMatrix();
|
||||
|
||||
virtual void SetProjectionMatrix(float width, float height);
|
||||
virtual void PushProjectionMatrix(float width, float height);
|
||||
virtual void PopProjectionMatrix();
|
||||
|
||||
virtual void SetFrameViewport(const std::string& frameName);
|
||||
virtual void SetFullScreenViewport();
|
||||
|
||||
void SetPerspectiveFullScreenViewport();
|
||||
void SetOrthoFullScreenViewport();
|
||||
|
||||
@@ -76,6 +114,16 @@ public:
|
||||
void BeginDrawToDepthBufferGlobal(std::string& globalBufferName);
|
||||
void BeginDrawToDepthBufferLocal(std::string& localBufferName);
|
||||
void EndDrawToDepthBuffer();
|
||||
|
||||
virtual void PushShader(const std::string& shaderName);
|
||||
virtual void PopShader();
|
||||
|
||||
virtual void DrawRect(const vec2& p1, const vec2& p2);
|
||||
virtual void DrawRect(const vec2& p1, const vec2& p2, const vec2& t1, const vec2& t2);
|
||||
virtual void DrawTriangleList(const TTriangleList& triangleList) = 0;
|
||||
|
||||
void DrawFrameFullScreen(const std::string& frameName);
|
||||
void DrawFramePartScreen(const std::string& frameName, vec2 posFrom, vec2 posTo); //To draw water. posFrom and posTo goes from 0 to 1
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user