PDA

View Full Version : A 2D-OPENGL viewer and c++ frameworks ?



tonnot
02-14-2011, 06:33 AM
I'm thinking about develop a 2D viewer for my vector and raster data (lines, poligons, text and images).
(later I suposse that I can use my work to extend to 3D)
My question is related with c++ frameworks.
Can I use de glut api without any more ?
I'm using QT, is it better than I use the QTopengl own api?

I'm thinking in the future, I'd like my code can be used using another c++ ide.

I hope you understand my doubts
Thanks

Rosario Leonardi
02-14-2011, 02:40 PM
Probably I didn't understand the question.. but if you want to reuse your code you can't just simply make you class framework independent? The framework create the context, sometime load the images.. these task are not related with drawing lines and show images. I'm missing something?

nickels
02-15-2011, 08:24 AM
Having used both, I would suggest trying wxWidgets over Qt.
Its mutliplatform and free. But the best part is the open source code; helps debugging some issues.
They have a good GLCanvas implementation and some opengl sample programs.
(p.s. there are both python and C++ interfaces to the library; you probably want the C++ version).

Actually, similar to the suggestion above; do you forsee needing other gui elements, such as menus, dialogs, etc?? If so, wxWidgets is good. If you just want a game window, something full screen, for instance, maybe you should just use Win32 or X windows or, better, yet take a look at the quake source code and create a minimal library that runs cross platform!!