aboutsummaryrefslogtreecommitdiffstats
path: root/yage/render/rectangle.cpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-05-18 19:56:58 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-05-18 19:56:58 +0100
commit41d0c68c9fadea552002613f0f62433c3858d0a2 (patch)
tree32fe3c8615c0226e38ae3faea52412a7ada8d0b8 /yage/render/rectangle.cpp
parent5c4c0ca30911b5129b32142b430bb6be1baf0e47 (diff)
downloadYAGE-41d0c68c9fadea552002613f0f62433c3858d0a2.tar.gz
YAGE-41d0c68c9fadea552002613f0f62433c3858d0a2.zip
Deleting and cleaning up repository
Diffstat (limited to 'yage/render/rectangle.cpp')
-rw-r--r--yage/render/rectangle.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/yage/render/rectangle.cpp b/yage/render/rectangle.cpp
deleted file mode 100644
index f48f79db..00000000
--- a/yage/render/rectangle.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/** ---------------------------------------------------------------------------
- * @file: rectangle.cpp
- *
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
- * MIT License, see LICENSE file for more details.
- * ----------------------------------------------------------------------------
- */
-
-#include "rectangle.h"
-
-#include "../data/vertex.h"
-
-#include <glad/glad.h>
-
-#include <cstddef>
-
-namespace yage
-{
-
-Rectangle::Rectangle(glm::vec4 position) : position_(position) {}
-
-void Rectangle::render() const
-{
- // create vertex array
- GLuint rect_vao, rect_vbo;
-
- // bind vertex array object
- glGenVertexArrays(1, &rect_vao);
- glBindVertexArray(rect_vao);
-
- // bind vertex buffer object
- glGenBuffers(1, &rect_vbo);
- glBindBuffer(GL_ARRAY_BUFFER, rect_vbo);
-
- // enable vertex attribute arrays
- glEnableVertexAttribArray(0);
- glEnableVertexAttribArray(1);
-
- // set the vertex attribute pointers
- glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex),
- (void *)offsetof(Vertex, position));
-
- glBindVertexArray(0);
-}
-
-} // namepsace yage