Component that manages and renders a sky sphere or skybox in the scene. It handles the mesh, textures, shaders, and rendering logic for the sky.
SkySphereComponent(Actor* pOwner, bool isSphere, std::vector<std::string> textures, ShaderProgram* pProgram);
Constructor of a skysphere component.
IsSphere is used to change wether it renders a skybox or a skysphere.
Textures are the path of the texture files.
By default isSphere is set to false, textures to {}, and shaderprogram to nullptr.
virtual void SetMesh(Mesh& pMesh);
Sets the mesh to use.
void SetTextureIndex(unsigned int pTextureIndex);
Sets the index of the texture to use.
inline Mesh* GetMesh() const;
Returns the mesh.
void SetShaderProgram(ShaderProgram pShaderProgram);
Sets the shader program used for rendering
inline ShaderProgram& GetShaderProgram();
Returns the shader program.
inline CubeTextureMap& GetCubeMap();
Returns the cubemap.
inline unsigned int& GetTextureIndex();
Returns the texture index.
inline VertexArray* GetVao() const;
Returns the VAO.
inline GLenum& GetTextureType();
Returns the textureType (if it's a cubemap or just a texture2D)
void SetTiling(Vector2D pTiling);
Sets the tiling factor for the sky texture.