Changeset c94a699 in opengl-game


Ignore:
Timestamp:
Jun 22, 2018, 3:20:13 AM (6 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
5527206
Parents:
c3c3158
Message:

Fix rendering of textured objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • new-game.cpp

    rc3c3158 rc94a699  
    362362      1.0f, 0.0f, 0.0f,
    363363   };
    364    obj.texcoords = {
    365       1.0f, 1.0f,
    366       0.0f, 1.0f,
    367       0.0f, 0.0f,
    368       1.0f, 1.0f,
    369       0.0f, 0.0f,
    370       1.0f, 0.0f
    371    };
     364   obj.texcoords = { 0.0f };
    372365   obj.selected_colors = {
    373366      0.0f, 1.0f, 0.0f,
     
    396389       0.5f, -0.5f,  0.0f,
    397390   };
    398    obj.colors = {
    399       1.0f, 0.0f, 0.0f,
    400       0.0f, 0.0f, 1.0f,
    401       0.0f, 1.0f, 0.0f,
    402       0.0f, 1.0f, 0.0f,
    403       0.0f, 0.0f, 1.0f,
    404       1.0f, 0.0f, 0.0f,
    405    };
     391   obj.colors = { 0.0f };
    406392   obj.texcoords = {
    407393      1.0f, 1.0f,
     
    15011487         it = objects.erase(it);
    15021488      } else {
    1503          points_buffer_size += it->points.size() * sizeof(GLfloat);
    1504          textures_buffer_size += it->texcoords.size() * sizeof(GLfloat);
     1489         points_buffer_size += it->num_points * sizeof(GLfloat) * 3;
     1490         textures_buffer_size += it->num_points * sizeof(GLfloat) * 2;
    15051491         ubo_buffer_size += 16 * sizeof(GLfloat);
    15061492         model_mat_idx_buffer_size += it->num_points * sizeof(GLuint);
Note: See TracChangeset for help on using the changeset viewer.