PDA

View Full Version : Ques.about GUI for OpenGL rendering engine



manati
12-09-2009, 12:24 AM
Please advice how to make 3d rendering App with GUI look and functionality a bit similar to Google Earth (layers,menus and pop-up windows...etc.)

My specific questions:

1.Is it usually Visual Studio C++ MDI Application with MFC?
2.If yes,then the window for drawing is Win API window or MFC window?

3.Has anyone done something like this in Borland Builder?
I know it's not recommended to use Borland's VCL controls with OpenGL since this combination doesn't work well together.

Thanks in advance

Ilian Dinev
12-09-2009, 12:39 AM
1. Try to refrain from MDI as a start
2. Doesn't matter. MFC is C++ convenience wrapper of WinAPI
3. BorlandC++ stdlibs could be using their own custom drawing of buttons/frames inside OS-provided Win32 windows. If that's the case, you can expect problems that may be more visible with Vista and Win7. There are ways to counter it - you just need an OS-provided window handle as a control/frame.

manati
12-09-2009, 12:57 AM
... If that's the case, you can expect problems that may be more visible with Vista and Win7. There are ways to counter it - you just need an OS-provided window handle as a control/frame.

That is the case...So I'm using OS window currently,but the problem is all the GUI controls like pop-up windows,menus,combo boxes,checkboxes - to create them "on the fly" (using OS API ) is a lot of work...
I wonder what is the standard solution for a such OpenGL framework in industry?
Is there any similar open source application available to look for an example?

Thanks again

yooyo
12-09-2009, 02:40 AM
Assume that 3D opengl view is just another control like Button, EditBox, ListBox, CheckBox, etc..
To draw anything using OpenGL you need rendering context. Tu create rendering contex you need device context (DC). To get DC you need HWND (window handle).

So.. choose any framework you like, create custom control, implement your own OnCreate, OnPaint, mouse and keyboard messages and use OpenGL in it.

There is a many UI frameworks.. MFC, WTL, .NET, QT, WinX, wxWidgets, ... Some of them have built in OpenGL contol (QT, wxWidgets, WinX), for other there is a free class library addons (like Tao for .NET, AtlOpenGL.h for WTL, ...).

But.. if you want UI INSIDE openGL view, then you can forget all above UI frameworks and take look on GLUI, GIGI, FLTK, ...

manati
12-09-2009, 04:10 AM
There is a many UI frameworks.. MFC, WTL, .NET, QT, WinX, wxWidgets, ... Some of them have built in OpenGL contol (QT, wxWidgets, WinX), for other there is a free class library addons (like Tao for .NET, AtlOpenGL.h for WTL, ...).

But.. if you want UI INSIDE openGL view, then you can forget all above UI frameworks and take look on GLUI, GIGI, FLTK, ...


Thank you so much, after looking on those frameworks - QT, wxWidgets, WinX - it was exactly what I was looking for...