Changeset b05e2b5 in opengl-game for new-game.cpp
- Timestamp:
- Mar 22, 2019, 5:45:02 PM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- a926b79
- Parents:
- de53394
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
rde53394 rb05e2b5 200 200 GLuint* texcoords_vbo, 201 201 GLuint* normals_vbo, 202 GLuint* time_vbo,203 GLuint* velocity_vbo,204 202 GLuint* ubo, 205 203 GLuint* model_mat_idx_vbo); … … 212 210 GLuint texcoords_vbo, 213 211 GLuint normals_vbo, 214 GLuint time_vbo,215 GLuint velocity_vbo,216 212 GLuint ubo, 217 213 GLuint model_mat_idx_vbo); … … 491 487 texcoords_vbo, 492 488 normals_vbo, 493 time_vbo,494 velocity_vbo,495 489 ubo, 496 490 model_mat_idx_vbo; … … 501 495 &texcoords_vbo, 502 496 &normals_vbo, 503 &time_vbo,504 &velocity_vbo,505 497 &ubo, 506 498 &model_mat_idx_vbo); … … 635 627 defineModelGroupUniform(modelGroups[TYPE_EXPLOSION], "proj", ATTRIB_UNIFORM, 636 628 1, UNIFORM_MATRIX_4F, value_ptr(proj_mat)); 637 // Still need to do the model mat 638 639 initModelGroupAttribs(modelGroups[TYPE_EXPLOSION]); 640 641 glBindBuffer(GL_ARRAY_BUFFER, velocity_vbo); 642 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL); 643 644 glBindBuffer(GL_ARRAY_BUFFER, time_vbo); 645 glVertexAttribPointer(1, 1, GL_FLOAT, GL_FALSE, 0, NULL); 629 630 initModelGroupAttribs(modelGroups[TYPE_EXPLOSION]); 646 631 647 632 cam_pos = vec3(0.0f, 0.0f, 2.0f); … … 703 688 texcoords_vbo, 704 689 normals_vbo, 705 time_vbo,706 velocity_vbo,707 690 ubo, 708 691 model_mat_idx_vbo); … … 2137 2120 GLuint* texcoords_vbo, 2138 2121 GLuint* normals_vbo, 2139 GLuint* time_vbo,2140 GLuint* velocity_vbo,2141 2122 GLuint* ubo, 2142 2123 GLuint* model_mat_idx_vbo) { … … 2152 2133 *normals_vbo = 0; 2153 2134 glGenBuffers(1, normals_vbo); 2154 2155 *velocity_vbo = 0;2156 glGenBuffers(1, velocity_vbo);2157 2158 *time_vbo = 0;2159 glGenBuffers(1, time_vbo);2160 2135 2161 2136 *ubo = 0; … … 2173 2148 GLuint texcoords_vbo, 2174 2149 GLuint normals_vbo, 2175 GLuint time_vbo,2176 GLuint velocity_vbo,2177 2150 GLuint ubo, 2178 2151 GLuint model_mat_idx_vbo) { … … 2204 2177 // to move this code out of here 2205 2178 2206 glBindBuffer(GL_ARRAY_BUFFER, velocity_vbo);2179 glBindBuffer(GL_ARRAY_BUFFER, modelGroups[TYPE_EXPLOSION].attribs["v_i"].buffer); 2207 2180 glBufferData(GL_ARRAY_BUFFER, sizeof(vv), vv, GL_STATIC_DRAW); 2208 2181 2209 glBindBuffer(GL_ARRAY_BUFFER, time_vbo);2182 glBindBuffer(GL_ARRAY_BUFFER, modelGroups[TYPE_EXPLOSION].attribs["start_time"].buffer); 2210 2183 glBufferData(GL_ARRAY_BUFFER, sizeof(vt), vt, GL_STATIC_DRAW); 2211 2184
Note:
See TracChangeset
for help on using the changeset viewer.