Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, May 2007
should Q_USE_DIRECTPAINTER be defined?


Message 1 in thread

Hi ,
I have solved  the problem.Thank you.
I   use the include and lib of gles  and  egl  from the www.khronos.org and make some changes according to powervr.
Now I meet the trouble that:
qgl_qws.cpp: In member function ‘virtual bool QGLWidget::event(QEvent*)’:
qgl_qws.cpp:552: error: ‘class QGLWidgetPrivate’ has no member named ‘currentWindowSurface’
make: *** [.obj/release-shared-emb-x86/qgl_qws.o] Error 1

I change the qgl_qws.cpp: line 50
#define Q_USE_QEGL
//#define Q_USE_DIRECTPAINTER
delete the comment above.
Then It becomes ok.

I do not know if it is ok to add the #define Q_USE_DIRECTPAINTER
can you help me?


---- Original Message ----
From:H?vard_Wall
To:qtopia-interest@xxxxxxxxxxxxx
Subject:Re:
Date:07-05-20 23:31:28

On Sunday 20 May 2007 13:33:11 ip4347@xxxxxxxx wrote:
> Hi:
>  
> I use suse linux 10.0 for i586 ,with gcc 4.1.2 to compile qtopia core 4.3
> beta with opengl model. I configure with -embedded x86 and -opengl but meet
> the problem as below:  
> g++ -c -pipe -g -fno-exceptions -O2 -fvisibility=hidden
> -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED
> -DQT_BUILD_OPENGL_LIB -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS
> -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_NO_FREETYPE -DQT_NO_DEBUG -DQT_GUI_LIB
> -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
> -I../../mkspecs/qws/linux-x86-g++ -I. -I../../include/QtCore
> -I../../include/QtCore -I../../include/QtGui -I../../include/QtGui
> -I../../include -I../../include/QtOpenGL -I.moc/release-shared-emb-x86
> -I.uic/release-shared-emb-x86 -o .obj/release-shared-emb-x86/qgl.o qgl.cpp
>
> qgl_p.h:321: error: expected initializer before ‘*’ token
> gmake[1]: *** [.obj/release-shared-emb-x86/qgl.o] Error 1
> gmake[1]: Leaving directory
> `/opt/qtopiacore4.3/qtopia-core-opensource-src-4.3.0rc1/src/opengl' gmake:
> *** [sub-opengl-make_default-ordered] Error 2
>
> I am not sure whether the gcc is suitable.

Hi,
gcc-4.1.2 should be just fine.
It looks like a missing forward declaration in the header file.
Try inserting

class QOpenGLPaintEngine;

some place before line 321 in qgl_p.h

Hope this helps,
--
 [ signature omitted ] 
Message 2 in thread

On Monday 21 May 2007 16:40:18 ip4347@xxxxxxxx wrote:
> Hi ,
> I have solved  the problem.Thank you.
> I   use the include and lib of gles  and  egl 
> from the www.khronos.org and make some changes according to powervr. Now I
> meet the trouble that:
> qgl_qws.cpp: In member function âvirtual bool QGLWidget::event(QEvent*)â:
> qgl_qws.cpp:552: error: âclass QGLWidgetPrivateâ has no member named
> âcurrentWindowSurfaceâ make: *** [.obj/release-shared-emb-x86/qgl_qws.o]
> Error 1
>
> I change the qgl_qws.cpp: line 50
> #define Q_USE_QEGL
> //#define Q_USE_DIRECTPAINTER
> delete the comment above.
> Then It becomes ok.
>
> I do not know if it is ok to add the #define Q_USE_DIRECTPAINTER
> can you help me?
>

Hi,

The OpenGL ES integration framework has changed a bit since the release 
candidate. In Qtopia Core 4.3.0 line 552 in qgl_qws.cpp will be dead code and 
should not be compiled (Q_USE_EGLWINDOWSURFACE will be defined). 

Instead of hacking in qgl_qws.cpp the recommended way of creating a OpenGL 
integration will be to create a screen driver plugin. This will be documented 
with an example in 4.3.0 but unfortunately this wasn't included in the 
release candidate.

I propose that you download a snapshot of qtopia-core from 
ftp://ftp.trolltech.com/qt/snapshots and take a look at the example driver 
documented in doc/html/qtopiacore-ahigl.html

Hope this helps,
HÃvard Wall

--
 [ signature omitted ]