Finally cubemap is working
This commit is contained in:
1 parent
ef92c70ae8
commit
84ee2dc70c
16 files changed
+399
-99
No files matched your search
@@ -20,6 +20,48 @@
|
||||
namespace SE
|
||||
{
|
||||
|
||||
class VBOHolder {
|
||||
GLuint Buffer;
|
||||
|
||||
public:
|
||||
VBOHolder();
|
||||
|
||||
VBOHolder(const VBOHolder& v) = delete;
|
||||
|
||||
VBOHolder& operator=(const VBOHolder& v) = delete;
|
||||
|
||||
~VBOHolder();
|
||||
|
||||
GLuint getBuffer();
|
||||
};
|
||||
|
||||
class VAOHolder {
|
||||
GLuint vao;
|
||||
|
||||
public:
|
||||
VAOHolder();
|
||||
|
||||
VAOHolder(const VAOHolder& v) = delete;
|
||||
|
||||
VAOHolder& operator=(const VAOHolder& v) = delete;
|
||||
|
||||
~VAOHolder();
|
||||
|
||||
GLuint getBuffer();
|
||||
};
|
||||
|
||||
struct VertexDataStruct
|
||||
{
|
||||
std::vector<vec3> PositionData;
|
||||
std::vector<vec2> TexCoordData;
|
||||
|
||||
std::shared_ptr<VAOHolder> vao;
|
||||
std::shared_ptr<VBOHolder> positionVBO;
|
||||
std::shared_ptr<VBOHolder> texCoordVBO;
|
||||
|
||||
void RefreshVBO();
|
||||
};
|
||||
|
||||
struct T2DQuad
|
||||
{
|
||||
vec3 VertexCoord[4];
|
||||
@@ -58,6 +100,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef TARGET_WIN32
|
||||
|
||||
class VBOObject //Must stay in shared ptr only!
|
||||
@@ -75,6 +118,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
void DrawVertexDataStruct(const VertexDataStruct& vertexDataStruct);
|
||||
|
||||
class TTriangleList : public TTriangleListAncestor //Implementation differs for Windows and Android
|
||||
{
|
||||
|
||||
@@ -33,6 +33,11 @@ protected:
|
||||
cardinal BkgTexID;
|
||||
std::string BkgShaderName;
|
||||
|
||||
float FogBeginDistance;
|
||||
float FogEndDistance;
|
||||
vec4 FogColor;
|
||||
|
||||
|
||||
void CalcCamPosVec();
|
||||
|
||||
virtual void DrawQuad(const T2DQuad& quad) = 0;
|
||||
@@ -52,6 +57,7 @@ public:
|
||||
void SetPerspectiveProjectionMatrix(float angle, float aspect, float zNear, float zFar);
|
||||
void PushPerspectiveProjectionMatrix(float angle, float aspect, float zNear, float zFar);
|
||||
|
||||
void SetGLCamAngleView();
|
||||
void SetGLCamView();
|
||||
void SetGlIdentityView();
|
||||
void SetGlPosXView();
|
||||
@@ -86,6 +92,14 @@ public:
|
||||
void SetBackgroundShader(const std::string& shaderName) { BkgShaderName = shaderName; }
|
||||
|
||||
void DrawBackground();
|
||||
|
||||
float GetFogBeginDistance();
|
||||
float GetFogEndDistance();
|
||||
vec4 GetFogColor();
|
||||
|
||||
|
||||
void SetFogBeginDistance(float distance);
|
||||
void SetFogEndDistance(float distance);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -22,11 +22,6 @@ protected:
|
||||
bool IsCameraTransparentToLand; //To make it work you must setup LandToCalcCollision
|
||||
TSimpleLandClass* LandToCalcCollision;
|
||||
|
||||
float FogBeginDistance;
|
||||
float FogEndDistance;
|
||||
vec4 FogColor;
|
||||
|
||||
|
||||
//Other data:
|
||||
|
||||
float ShadowClampValue;
|
||||
@@ -44,10 +39,7 @@ public:
|
||||
|
||||
float GetShadowClampValue();
|
||||
void SetShadowClampValue(float shadowClampValue);
|
||||
|
||||
float GetFogBeginDistance();
|
||||
float GetFogEndDistance();
|
||||
vec4 GetFogColor();
|
||||
|
||||
|
||||
void DrawTriangleList(const TTriangleList& triangleList);
|
||||
|
||||
|
||||
Reference in new issue
Block a user