woomy
This commit is contained in:
parent
f54d0df92e
commit
d29f25bc86
2 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,10 @@ void setColor(float r, float g, float b, SDL_Window* window) {
|
||||||
SDL_GL_SwapWindow(window);
|
SDL_GL_SwapWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setupOrthoMode() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
using namespace sosc;
|
using namespace sosc;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef SOSC_SHADER_TEST_H
|
#ifndef SOSC_SHADER_TEST_H
|
||||||
#define SOSC_SHADER_TEST_H
|
#define SOSC_SHADER_TEST_H
|
||||||
|
|
||||||
|
#include <SDL.h>
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
|
@ -20,7 +21,7 @@ public:
|
||||||
|
|
||||||
int width, height;
|
int width, height;
|
||||||
SDL_GetWindowSize(window, &width, &height);
|
SDL_GetWindowSize(window, &width, &height);
|
||||||
auto orthoMatrix = glm::ortho(0, width, height, 0);
|
glm::mat4 orthoMatrix = glm::ortho(0, width, height, 0);
|
||||||
glUniformMatrix4fv(
|
glUniformMatrix4fv(
|
||||||
(*this)[ORTHO_MATRIX], 1, GL_FALSE, glm::value_ptr(orthoMatrix)
|
(*this)[ORTHO_MATRIX], 1, GL_FALSE, glm::value_ptr(orthoMatrix)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue