mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Changed to reflect moving and renaming the *.fs and *.vs shader files.
This commit is contained in:
@@ -54,9 +54,9 @@ Game::~Game()
|
||||
void Game::Init()
|
||||
{
|
||||
// load shaders
|
||||
ResourceManager::LoadShader("shaders/sprite.vs", "shaders/sprite.frag", nullptr, "sprite");
|
||||
ResourceManager::LoadShader("shaders/particle.vs", "shaders/particle.frag", nullptr, "particle");
|
||||
ResourceManager::LoadShader("shaders/post_processing.vs", "shaders/post_processing.frag", nullptr, "postprocessing");
|
||||
ResourceManager::LoadShader("sprite.vs", "sprite.fs", nullptr, "sprite");
|
||||
ResourceManager::LoadShader("particle.vs", "particle.fs", nullptr, "particle");
|
||||
ResourceManager::LoadShader("post_processing.vs", "post_processing.fs", nullptr, "postprocessing");
|
||||
// configure shaders
|
||||
glm::mat4 projection = glm::ortho(0.0f, static_cast<float>(this->Width), static_cast<float>(this->Height), 0.0f, -1.0f, 1.0f);
|
||||
ResourceManager::GetShader("sprite").Use().SetInteger("sprite", 0);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
TextRenderer::TextRenderer(unsigned int width, unsigned int height)
|
||||
{
|
||||
// load and configure shader
|
||||
this->TextShader = ResourceManager::LoadShader("shaders/text.vs", "shaders/text.frag", nullptr, "text");
|
||||
this->TextShader = ResourceManager::LoadShader("text_2d.vs", "text_2d.fs", nullptr, "text");
|
||||
this->TextShader.SetMatrix4("projection", glm::ortho(0.0f, static_cast<float>(width), static_cast<float>(height), 0.0f), true);
|
||||
this->TextShader.SetInteger("text", 0);
|
||||
// configure VAO/VBO for texture quads
|
||||
|
||||
Reference in New Issue
Block a user