feat: added FullscreenQuad
This commit is contained in:
6
main.cpp
6
main.cpp
@@ -1,6 +1,7 @@
|
||||
#include <GL/glew.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <cstdio>
|
||||
#include "FullScreenQuad.hpp"
|
||||
|
||||
float vertices[] = {
|
||||
-0.5f, -0.5f, 0.0f,
|
||||
@@ -129,6 +130,8 @@ int main(int argc, char** argv) {
|
||||
unsigned int shaderProgramm = compShader();
|
||||
unsigned int VAO = initVAO();
|
||||
|
||||
FullScreenQuad fsq{};
|
||||
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
processInput(window);
|
||||
@@ -143,6 +146,9 @@ int main(int argc, char** argv) {
|
||||
|
||||
glBindVertexArray(VAO);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||
glBindVertexArray(fsq.getVAO());
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
|
||||
/* Poll for and process events */
|
||||
glfwPollEvents();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user