MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / finishFrame

Method finishFrame

source/application/StarRenderer_opengl.cpp:643–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643void OpenGlRenderer::finishFrame() {
644 flushImmediatePrimitives();
645 // Make sure that the immediate render buffer doesn't needlessly lock texutres
646 // from being compressed.
647 List<RenderPrimitive> empty;
648 m_immediateRenderBuffer->set(empty);
649
650 filter(m_liveTextureGroups, [](auto const& p) {
651 unsigned const CompressionsPerFrame = 1;
652
653 if (!p.unique() || p->textureAtlasSet.totalTextures() > 0) {
654 p->textureAtlasSet.compressionPass(CompressionsPerFrame);
655 return true;
656 }
657
658 return false;
659 });
660
661 // Blit if another shader hasn't
662 glBindFramebuffer(GL_FRAMEBUFFER, 0);
663
664 if (DebugEnabled)
665 logGlErrorSummary("OpenGL errors this frame");
666}
667
668OpenGlRenderer::GlTextureAtlasSet::GlTextureAtlasSet(unsigned atlasNumCells)
669 : TextureAtlasSet(16, atlasNumCells) {}

Callers 1

runMethod · 0.80

Calls 5

filterFunction · 0.85
totalTexturesMethod · 0.80
compressionPassMethod · 0.80
setMethod · 0.45
uniqueMethod · 0.45

Tested by

no test coverage detected