Bug 90183 - Slideshow with OpenGL gives me a blank screen
Summary: Slideshow with OpenGL gives me a blank screen
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-Presentation (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-24 18:55 UTC by Hugo Costelha
Modified: 2022-01-05 15:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Costelha 2004-09-24 18:55:04 UTC
Version:           0.0.cvs20040920-3 (using KDE KDE 3.3.0)
Installed from:    SuSE RPMs
OS:                Linux

Whenever I use OpenGL under digikam to see a slideshow of the photos, I get a complete white screen (whatever transition effect I use). The slideshow proceeds, and eventually it ends, but all I saw was a complete white screen.

I'm using XOrg 6.8.0 and glxinfo indicates that I have direct rendering enabled.

Congratulations for the great program.
Comment 1 Renchi Raju 2004-09-29 23:42:05 UTC
sounds like a broken driver. are other opengl apps running fine?
Comment 2 Hugo Costelha 2004-09-30 11:54:53 UTC
Well, I tried glxgears, lbreakout and armagetron and all work fine, so I think the other opengl apps are funning fine.
Comment 3 Renchi Raju 2004-09-30 18:20:54 UTC
can you try a little test? i have put up a small test program at this link:
http://pooh.tam.uiuc.edu/opengltest.tar.gz

steps to follow:
tar zxvf opengltest.tar.gz
cd opengltest
qmake -project
qmake
make
./opengltest

let me know what you get. 
Comment 4 Hugo Costelha 2004-09-30 18:31:25 UTC
First let me just say that I really apreciate you effort on this.

I did just that, but it failed during the compilation time. I got the following when doing 'make':

g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall  -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/include -I/usr/lib/qt3/include -o glwidget.o glwidget.cpp
g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall  -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/include -I/usr/lib/qt3/include -o main.o main.cpp
g++  -o opengltest glwidget.o main.o    -L/usr/lib/ -L/usr/lib/qt3/lib/ -L/usr/X11R6/lib/ -lqt-mt -lXext -lX11 -lm
glwidget.o(.text+0x22): In function `GLWidget::resizeGL(int, int)':
: undefined reference to `glViewport'
glwidget.o(.text+0x2e): In function `GLWidget::resizeGL(int, int)':
: undefined reference to `glMatrixMode'
glwidget.o(.text+0x5e): In function `GLWidget::paintGL()':
: undefined reference to `glDisable'
glwidget.o(.text+0x6a): In function `GLWidget::paintGL()':
: undefined reference to `glClear'
glwidget.o(.text+0x6f): In function `GLWidget::paintGL()':
: undefined reference to `glLoadIdentity'
glwidget.o(.text+0x7b): In function `GLWidget::paintGL()':
: undefined reference to `glMatrixMode'
glwidget.o(.text+0x80): In function `GLWidget::paintGL()':
: undefined reference to `glLoadIdentity'
glwidget.o(.text+0x8c): In function `GLWidget::paintGL()':
: undefined reference to `glMatrixMode'
glwidget.o(.text+0x91): In function `GLWidget::paintGL()':
: undefined reference to `glLoadIdentity'
glwidget.o(.text+0x9d): In function `GLWidget::paintGL()':
: undefined reference to `glMatrixMode'
glwidget.o(.text+0xa2): In function `GLWidget::paintGL()':
: undefined reference to `glLoadIdentity'
glwidget.o(.text+0xbd): In function `GLWidget::paintGL()':
: undefined reference to `glBindTexture'
glwidget.o(.text+0xc9): In function `GLWidget::paintGL()':
: undefined reference to `glBegin'
glwidget.o(.text+0xdd): In function `GLWidget::paintGL()':
: undefined reference to `glColor4f'
glwidget.o(.text+0xe9): In function `GLWidget::paintGL()':
: undefined reference to `glTexCoord2f'
glwidget.o(.text+0xf9): In function `GLWidget::paintGL()':
: undefined reference to `glVertex3f'
glwidget.o(.text+0x105): In function `GLWidget::paintGL()':
: undefined reference to `glTexCoord2f'
glwidget.o(.text+0x115): In function `GLWidget::paintGL()':
: undefined reference to `glVertex3f'
glwidget.o(.text+0x121): In function `GLWidget::paintGL()':
: undefined reference to `glTexCoord2f'
glwidget.o(.text+0x131): In function `GLWidget::paintGL()':
: undefined reference to `glVertex3f'
glwidget.o(.text+0x13d): In function `GLWidget::paintGL()':
: undefined reference to `glTexCoord2f'
glwidget.o(.text+0x14d): In function `GLWidget::paintGL()':
: undefined reference to `glVertex3f'
glwidget.o(.text+0x17b): In function `GLWidget::initializeGL()':
: undefined reference to `glEnable'
glwidget.o(.text+0x199): In function `GLWidget::initializeGL()':
: undefined reference to `glClearColor'
glwidget.o(.text+0x1a5): In function `GLWidget::initializeGL()':
: undefined reference to `glEnable'
glwidget.o(.text+0x1ba): In function `GLWidget::initializeGL()':
: undefined reference to `glBlendFunc'
glwidget.o(.text+0x1c4): In function `GLWidget::initializeGL()':
: undefined reference to `glClearDepth'
glwidget.o(.text+0x276): In function `GLWidget::initializeGL()':
: undefined reference to `glGenTextures'
glwidget.o(.text+0x28f): In function `GLWidget::initializeGL()':
: undefined reference to `glBindTexture'
glwidget.o(.text+0x2e2): In function `GLWidget::initializeGL()':
: undefined reference to `glTexImage2D'
glwidget.o(.text+0x300): In function `GLWidget::initializeGL()':
: undefined reference to `glTexParameteri'
glwidget.o(.text+0x31e): In function `GLWidget::initializeGL()':
: undefined reference to `glTexParameteri'
glwidget.o(.text+0x34): In function `GLWidget::resizeGL(int, int)':
: undefined reference to `glLoadIdentity'
glwidget.o(.text+0x159): In function `GLWidget::paintGL()':
: undefined reference to `glEnd'
collect2: ld returned 1 exit status
make: *** [opengltest] Error 1

What could be the problem?
Just to let you know in case it matters, I have QT 3.3.3-15 given by SUSE's rpms.


Comment 5 Renchi Raju 2004-09-30 18:41:47 UTC
for some reason, the -lGL flag didn't get picked up by your qmake even though its specified in the .pro file.

after you run make, manually link the exe with (note: below has to be one line):

g++  -o opengltest glwidget.o main.o    -L/usr/lib/ -L/usr/lib/qt3/lib/ -L/usr/X11R6/lib/ -lqt-mt -lXext -lX11 -lGL -lm 
Comment 6 Hugo Costelha 2004-09-30 21:33:12 UTC
Well, know it compiled and I was able to run the program. The results was the same as in the slideshow: I got a full whie screen. Dows it mean that the problem is mine?
Comment 7 Renchi Raju 2004-09-30 21:51:19 UTC
i'm still suspecting a broken driver. xorg 6.8 is still a bit experimental, isn't it. i have updated the code and put up a new tarball at the link i posted earlier. please try again and mail me the console messages that you get. 
Comment 8 Hugo Costelha 2004-09-30 22:26:26 UTC
I get the following messages:

Max allowed texture size: 512
Current width & height: 1024, 1024
GL_INVALID_VALUE


Just one additional note: If I ommit the 'qmake -project' in those steps you gave, the all compilation process runs fine. I get no linking errors in that case.
Comment 9 Renchi Raju 2004-09-30 22:38:47 UTC
perfect. i know what the problem is. one last test for you(tarball updated).
you are right about skipping the qmake -project
Comment 10 Hugo Costelha 2004-09-30 22:49:42 UTC
Now I got the following:

QImage::convertDepth: Image is a null image
Max allowed texture size: 512
Current width & height: -1073746688, -1073746688
GL_INVALID_VALUE
Comment 11 Renchi Raju 2004-09-30 23:32:00 UTC
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();
 }