Jump to content
  • Advertisement
Sign in to follow this  
Decrius

OpenGL OpenGL application?

This topic is 4533 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, Is it possible to make an application (with menubar, statusbar, toolbar and borders in field + additional buttons left and right) with OpenGL? I want to make some kind of a editor with 4 screens + grid, where you see the world in front, from top, and from left or right side (2D), and an 3D view of everything where you can fly through. With API, GUI, Win32...what ever its called...I can make a window + menu (and status bar and toolbar and borders probably). And with OpenGL I can make the windows...where you can see the world. Can I put them both in one application? OpenGL and API/GUI/Win32? I haven't the faintest idea how to make something like that. Or is there any simple application like that + source code? Couldn't find it... Anyways, thanks for any reply. Decrius

Share this post


Link to post
Share on other sites
Advertisement
On Windows, you can make the GUI part using Win32 controls, and then the OpenGL part in a sub-window (it just attaches to any HWND; not necessarily a top-level HWND when you create the GL context).

On other platforms, it varies, but typically you use the native toolset for widgets.

OpenGL does not define any windowing system primitives -- it's only a rendering API. If you want a portable solution, then you either have to implement menus and buttons yourself in OpenGL, and use GLUT for your windowing and mousing, OR you can use a widget set already implemented (such as CEGUI), OR you can use a portable "native" control toolset such as wxWindows.

I hope this answers the question.

Share this post


Link to post
Share on other sites
Yes, thank you.

I have the window now + OpenGL in the middle. However, the toolbars background is white insteed of grey/whatever, and the status bar is the wrong style, its with borders now, and I want it with fading color from light grey to darker grey...however this isn't an OpenGL problem. Newxt problem is that the openGL part just displays in the whole window (he even shows it under the tool and status bar, because the top and bottom of the triangle is covered by the status and toolbar). How to give the x and y coordinates to opengl, so opengl knows where to start displaying?

Thank anyways,

Decrius

Share this post


Link to post
Share on other sites
Recently, somebody had the same problem.

Topic

I used panels for different OpenGL 'windows'.
Hope you find some answers.

[Edited by - Kwak on April 22, 2006 11:11:57 AM]

Share this post


Link to post
Share on other sites
Alright, thank you, look likes the application you made is similiar to what I want to make :), I'm wondering too, how you made your costum load, save, save as picture in the menu :), you can give me that piece of code too?

Decrius

Share this post


Link to post
Share on other sites
With borland c++ builder, you don't have to type any code for creating menus, buttons, pictures,... unless you want to create them during runtime (but then i set the buttons i dont use invisible, since there are not that much buttons anyway).

So i can't really help you out with the code.
I can tell you this though:

You have to create a ImageList (win32)
set the properties Width and Height to 16 (size of icon in menu)
add the images to the ImageList (I don't know how you have to program that).

Then for the MainMenu set the Image propertie to the name of your ImageList.
For the MenuItem, set the ImageIndex propertie to the index of the picture you want.

Share this post


Link to post
Share on other sites
Borland isn't free, is it? Code::Blocks and Dev-C++ is almost the same...

You don't have the code? Or you don't want to give it to someone else? Btw, the part with the grid, thats OpenGL too?

Decrius

Thanks however :D

Share this post


Link to post
Share on other sites
Quote:
Borland isn't free, is it?

Nope Borland isn't free. There is a trial version of the enterprise edition, and they have also a free compiler, but you cant make the forms visually.

Quote:
You don't have the code?

I created the form by dragging buttons etc... Borland c++ Builder wrote much of the code itself. This code is delphi however, so i don't think you can use it.

Quote:
Or you don't want to give it to someone else?

I'm just an amateur programmer struggling to get the buttons on the form. There is just no point in holding the code for myself. => You can have it

Quote:
Btw, the part with the grid, thats OpenGL too?

Kwak is proud to present his OpenGl DrawGrid code :)

I have put the code here: (KwakCreator Windows 06b.rar)
KwakCreator v0.001 Beta: source code

I sincerely hope you can use it!

[Edited by - Kwak on April 22, 2006 11:11:50 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!