Skybox
This commit is contained in:
12
core/Shaders/SkyboxShader.cpp
Normal file
12
core/Shaders/SkyboxShader.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "SkyboxShader.h"
|
||||
#include "skybox.vert.h"
|
||||
#include "skybox.frag.h"
|
||||
|
||||
SkyboxShader::SkyboxShader() : Shader(skybox_vert, skybox_frag) {}
|
||||
|
||||
void SkyboxShader::UpdateSkybox(Skybox skybox) {
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP, skybox.id);
|
||||
}
|
||||
|
||||
Name SkyboxShader::GetName() const { return "Skybox Shader"; }
|
||||
14
core/Shaders/SkyboxShader.h
Normal file
14
core/Shaders/SkyboxShader.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef SKYBOXSHADER_H
|
||||
#define SKYBOXSHADER_H
|
||||
|
||||
#include "Shader.h"
|
||||
#include "Skybox.h"
|
||||
|
||||
class SkyboxShader : public Shader {
|
||||
public:
|
||||
SkyboxShader();
|
||||
Name GetName() const;
|
||||
void UpdateSkybox(Skybox skybox);
|
||||
};
|
||||
|
||||
#endif /* SKYBOXSHADER_H */
|
||||
Reference in New Issue
Block a user