summaryrefslogtreecommitdiffstats
path: root/src/GalOgl.cpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-11-17 06:59:16 +0100
committerLaG1924 <lag1924@gmail.com>2021-11-17 06:59:16 +0100
commit513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc (patch)
treea54c7a24e93b96c8ba8fce248f4fcc60a44924d8 /src/GalOgl.cpp
parentChanged section rendering to Gal (diff)
downloadAltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.tar
AltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.tar.gz
AltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.tar.bz2
AltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.tar.lz
AltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.tar.xz
AltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.tar.zst
AltCraft-513fe5ebe3f59aa8d85d9517db9fe0bfa531d3dc.zip
Diffstat (limited to '')
-rw-r--r--src/GalOgl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GalOgl.cpp b/src/GalOgl.cpp
index 0452cab..5643b4d 100644
--- a/src/GalOgl.cpp
+++ b/src/GalOgl.cpp
@@ -392,6 +392,9 @@ public:
virtual void Render(size_t offset = 0, size_t count = -1) override {
GLenum vertexMode;
switch (primitive) {
+ case Primitive::Line:
+ vertexMode = GL_LINES;
+ break;
case Primitive::Triangle:
vertexMode = GL_TRIANGLES;
break;
@@ -820,9 +823,7 @@ public:
GLint location = glGetAttribLocation(program, name.c_str());
if (location < 0) {
- glDeleteProgram(program);
LOG(ERROR) << "Vertex attribute name \"" << name << "\" not found in shader";
- throw std::runtime_error("Invalid attribute");
}
size_t attribSize = GalTypeGetSize(type);