Feature #3606

Make WGLWidget interface as identical as possible to Qt's QGLWidget

Added by Prasad Dixit about 8 years ago. Updated about 8 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


In Qt's QGLWidget, I can use native OpenGL calls such as glClearColor(...) in addition to qglClearColor. I can always use native OpenGL code from other projects and paste it in my sub class of QGLWidget and it works like a charm.

Not the case with Wt's WGLWidget. I need to use enable() instead of glEnable(), depthClamp() instead of glDepthClamp(). For a small project makin gthis changes is fine. But for a large project it can be a colossal waste of time.

I am working on porting a desktop application written in C/Qt/OpenGL to an equivalent web application using Wt. The changes I need to make to code has been pain point in porting to Wt.

I request you to keep interface of WGLWidget identical to Qt's QGLWidget and there should be no need to rename functions from glxxxXXX to xxxXXX for it to compile with Qt. In ideal case a simple search and replace of Qt with Wt and say qxxx with wxxxx should do the 95% job.

BTW, I love what you are doing with Wt. It is a great tool, especially if you have large Qt based code which you need to port to a web application.


WGLWidgetWrapper.h (26.7 KB) WGLWidgetWrapper.h Prasad Dixit, 11/11/2014 12:40 AM

Also available in: Atom PDF