[Kde-imaging] [Bug 90183] Slideshow with OpenGL gives me a blank
screen
Renchi Raju
renchi at pooh.tam.uiuc.edu
Thu Sep 30 23:32:02 CEST 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
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();
}
More information about the Kde-imaging
mailing list