Skip to content

Commit

Permalink
Fix compilation on arm systems.
Browse files Browse the repository at this point in the history
Also disabled the whole questionable GL memory test for non-debug builds.
  • Loading branch information
gzotti committed May 2, 2018
1 parent ce9d908 commit 3cd21ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/StelMainView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1431,16 +1431,20 @@ void StelMainView::doScreenshot(void)
{
context->functions()->initializeOpenGLFunctions();
//qDebug() << "initializeOpenGLFunctions()...";
#ifndef Q_OS_MAC
// TODO: Investigate this further when GL memory issues should appear.
// Make sure we have enough free GPU memory!
#ifndef NDEBUG
#ifdef GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX
GLint freeGLmemory;
context->functions()->glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &freeGLmemory);
qCDebug(mainview)<<"Free GPU memory:" << freeGLmemory << "kB -- we ask for " << customScreenshotWidth*customScreenshotHeight*8 / 1024 <<"kB";
#endif
#ifdef GL_RENDERBUFFER_FREE_MEMORY_ATI
GLint freeGLmemoryAMD[4];
context->functions()->glGetIntegerv(GL_RENDERBUFFER_FREE_MEMORY_ATI, freeGLmemoryAMD);
qCDebug(mainview)<<"Free GPU memory (AMD version):" << (uint)freeGLmemoryAMD[1]/1024 << "+" << (uint)freeGLmemoryAMD[3]/1024 << " of " << (uint)freeGLmemoryAMD[0]/1024 << "+" << (uint)freeGLmemoryAMD[2]/1024 << "kB -- we ask for " << customScreenshotWidth*customScreenshotHeight*8 / 1024 <<"kB";
#endif

#endif
GLint texSize,viewportSize[2],rbSize;
context->functions()->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &texSize);
context->functions()->glGetIntegerv(GL_MAX_VIEWPORT_DIMS, viewportSize);
Expand Down

0 comments on commit 3cd21ae

Please sign in to comment.