| 132 | } |
| 133 | |
| 134 | void LightProbeCollection::Init() { |
| 135 | if (cube_map_fbo == INVALID_FRAMEBUFFER) { |
| 136 | Graphics::Instance()->genFramebuffers(&cube_map_fbo, "light_probe_cube_map"); |
| 137 | } |
| 138 | if (!cube_map.valid()) { |
| 139 | cube_map = Textures::Instance()->makeCubemapTexture(128, 128, GL_RGBA16F, GL_RGBA, Textures::MIPMAPS); |
| 140 | } |
| 141 | Textures::Instance()->SetTextureName(cube_map, "Light Probe Collection Cubemap"); |
| 142 | probe_model_id = Models::Instance()->loadModel(HardcodedPaths::paths[HardcodedPaths::kLightProbe]); |
| 143 | if (!light_probes.empty()) { |
| 144 | tet_mesh_needs_update = true; |
| 145 | } |
| 146 | light_probe_texture_buffer_id = -1; |
| 147 | light_probe_buffer_object_id = -1; |
| 148 | grid_texture_buffer_id = -1; |
| 149 | grid_buffer_object_id = -1; |
| 150 | } |
| 151 | |
| 152 | void LightProbeCollection::Dispose() { |
| 153 | Graphics::Instance()->deleteFramebuffer(&cube_map_fbo); |
nothing calls this directly
no test coverage detected