]> git.localhorst.tv Git - blank.git/blobdiff - src/model.cpp
don't push block normals to GPU
[blank.git] / src / model.cpp
index 125d57aefcd16d7f7e7291229bf999879610d5d4..62a90e554837ee18cf2fa66552e66020a8e6e7c4 100644 (file)
@@ -166,23 +166,6 @@ void BlockModel::Update(const Buffer &buf) {
                nullptr        // offset
        );
 
-#ifndef NDEBUG
-       if (buf.normals.size() < buf.vertices.size()) {
-               std::cerr << "BlockModel: not enough normals!" << std::endl;
-       }
-#endif
-       glBindBuffer(GL_ARRAY_BUFFER, handle[ATTRIB_NORMAL]);
-       glBufferData(GL_ARRAY_BUFFER, buf.normals.size() * sizeof(glm::vec3), buf.normals.data(), GL_STATIC_DRAW);
-       glEnableVertexAttribArray(ATTRIB_NORMAL);
-       glVertexAttribPointer(
-               ATTRIB_NORMAL, // location (for shader)
-               3,             // size
-               GL_FLOAT,      // type
-               GL_FALSE,      // normalized
-               0,             // stride
-               nullptr        // offset
-       );
-
 #ifndef NDEBUG
        if (buf.lights.size() < buf.vertices.size()) {
                std::cerr << "BlockModel: not enough lights!" << std::endl;