#pragma optimize("",off)
| 304 | |
| 305 | // #pragma optimize("",off) |
| 306 | void Graphics::framebufferColorTexture2D(TextureRef t, int mipmap_level) { |
| 307 | /*if(Textures::Instance()->IsCompressed(t)){ |
| 308 | Textures::Instance()->Uncompress(t); |
| 309 | }*/ |
| 310 | PROFILER_ENTER(g_profiler_ctx, "EnsureInVRAM"); |
| 311 | Textures::Instance()->EnsureInVRAM(t); |
| 312 | PROFILER_LEAVE(g_profiler_ctx); |
| 313 | CHECK_GL_ERROR(); |
| 314 | GLuint tex = Textures::Instance()->returnTexture(t); |
| 315 | LOGS << "Binding gl texture " << tex << " to framebuffer" << std::endl; |
| 316 | if (!t.valid()) { |
| 317 | LOGE << "Not valid..." << std::endl; |
| 318 | } |
| 319 | // if(!glIsTexture(tex)){ |
| 320 | // LOGE << "Not a texture..." << std::endl; |
| 321 | // } |
| 322 | PROFILER_ENTER(g_profiler_ctx, "glFramebufferTexture2D"); |
| 323 | glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, mipmap_level); |
| 324 | PROFILER_LEAVE(g_profiler_ctx); |
| 325 | CHECK_GL_ERROR(); |
| 326 | } |
| 327 | // #pragma optimize("",on) |
| 328 | |
| 329 | void Graphics::genRenderbuffers(GLuint* rb) { |
no test coverage detected