[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 90183] Slideshow with OpenGL gives me a blank screen
From: Renchi Raju <renchi () pooh ! tam ! uiuc ! edu>
Date: 2004-09-30 21:32:03
Message-ID: 20040930213203.3188.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=90183
renchi pooh tam uiuc edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From renchi pooh tam uiuc edu 2004-09-30 23:32 -------
CVS commit by pahlibar:
check for max texture value allowed before generating the textures. one user had
a rather low texture size of 512. fixed problem over priv mail conversation.
CCMAIL: 90183-done bugs kde org
M +20 -2 slideshowgl.cpp 1.9
--- kdeextragear-libs-1/kipi-plugins/slideshow/slideshowgl.cpp #1.8:1.9
@ -50,6 +50,6 @ SlideShowGL::SlideShowGL(const QStringLi
resize(QApplication::desktop()->size());
- width_ = QMIN( 1024, 1 << (int)ceil(log((float)width())/log((float)2)) );
- height_ = QMIN( 1024, 1 << (int)ceil(log((float)height())/log((float)2)) );
+ width_ = 64;
+ height_ = 64;
// --------------------------------------------------
@ -119,4 +119,22 @ void SlideShowGL::initializeGL()
glClearDepth(1.0f);
+ // get the maximum texture value.
+ GLint maxTexVal;
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTexVal);
+
+ // allow only maximum texture value of 1024. anything bigger and things slow down
+ maxTexVal = QMIN(1024, maxTexVal);
+
+ width_ = QApplication::desktop()->width();
+ height_ = QApplication::desktop()->height();
+
+ width_ = 1 << (int)ceil(log((float)width_)/log((float)2)) ;
+ height_ = 1 << (int)ceil(log((float)height_)/log((float)2));
+
+ width_ = QMIN( maxTexVal, width_ );
+ height_ = QMIN( maxTexVal, height_ );
+
+ // load the first image
+
loadImage();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic