Changeset aaf27cd in opengl-game


Ignore:
Timestamp:
Dec 6, 2020, 2:50:38 AM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl, master
Children:
e68d549
Parents:
670c09a
Message:

In OpenGLReference, fix an OpenGL error when adding new objects

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r670c09a raaf27cd  
    1919Debug/
    2020Release/
     21.vscode/
    2122
    2223include/
  • new-game.cpp

    r670c09a raaf27cd  
    21692169
    21702170   for (map<string, AttribInfo>::iterator it = smg.attribs.begin(); it != smg.attribs.end(); it++) {
    2171       glBindBuffer(GL_ARRAY_BUFFER, it->second.buffer);
    2172 
    21732171      switch (it->second.attribType) {
    21742172         case AttribType::POINT_VARYING:
     2173            glBindBuffer(GL_ARRAY_BUFFER, it->second.buffer);
    21752174            glBufferSubData(GL_ARRAY_BUFFER, obj.vertex_vbo_offset * GLsizeof(it->second.type) * it->second.size,
    21762175               obj.num_points * GLsizeof(it->second.type) * it->second.size, getVectorAttribPtr(obj, it->second.fieldOffset));
    21772176            break;
    21782177         case AttribType::OBJECT_VARYING:
     2178            glBindBuffer(GL_ARRAY_BUFFER, it->second.buffer);
    21792179            for (unsigned int i = 0; i < obj.num_points; i++) {
    21802180               glBufferSubData(GL_ARRAY_BUFFER, (obj.vertex_vbo_offset + i) * GLsizeof(it->second.type) * it->second.size,
Note: See TracChangeset for help on using the changeset viewer.