Changeset 1f81ecc in opengl-game for vulkan-game.hpp
- Timestamp:
- Apr 19, 2020, 3:06:51 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 3950236
- Parents:
- 237cbec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.hpp
r237cbec r1f81ecc 233 233 float spawnRate_asteroid = 0.5; 234 234 float lastSpawn_asteroid; 235 236 unsigned int leftLaserIdx = -1; 237 238 unsigned int rightLaserIdx = -1; 235 239 236 240 bool initWindow(int width, int height, unsigned char guiFlags); … … 265 269 void createSyncObjects(); 266 270 271 void addLaser(vec3 start, vec3 end, vec3 color, float width); 272 void translateLaser(size_t index, const vec3& translation); 273 267 274 // TODO: Since addObject() returns a reference to the new object now, 268 275 // stop using objects.back() to access the object that was just created … … 277 284 void updateObject(vector<SceneObject<VertexType, SSBOType>>& objects, 278 285 GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline, size_t index); 286 287 template<class VertexType, class SSBOType> 288 void updateObjectVertices(GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline, 289 SceneObject<VertexType, SSBOType>& obj, size_t index); 279 290 280 291 template<class VertexType> … … 327 338 328 339 SceneObject<VertexType, SSBOType>& obj = objects.back(); 329 centerObject(obj); 340 341 if (!is_same_v<VertexType, LaserVertex>) { 342 centerObject(obj); 343 } 330 344 331 345 bool storageBufferResized = pipeline.addObject(obj.vertices, obj.indices, obj.ssbo, … … 366 380 } 367 381 382 template<class VertexType, class SSBOType> 383 void VulkanGame::updateObjectVertices(GraphicsPipeline_Vulkan<VertexType, SSBOType>& pipeline, 384 SceneObject<VertexType, SSBOType>& obj, size_t index) { 385 pipeline.updateObjectVertices(index, obj.vertices, this->commandPool, this->graphicsQueue); 386 } 387 368 388 template<class VertexType> 369 389 vector<VertexType> VulkanGame::addVertexNormals(vector<VertexType> vertices) {
Note:
See TracChangeset
for help on using the changeset viewer.