Jump to content
  • Advertisement
Sign in to follow this  
Shamino

Where Do I begin, GUI programming?

This topic is 4553 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

Okay, so I've been working on a game engine for a while now, 2 monthsish or so.. I need to create an editor to supplement more creation of content.. For this I need gui's, what can I use that is portable and can like, hold an openGL window inside of it?

Share this post


Link to post
Share on other sites
Advertisement
FLTK (Fast-Light Toolkit) is a good one that can have openGl windows (through GLUT). It's very easy to use (check out the demo programs) and I have found it to be pretty good. Another option would be to use the win32 API (or MFC) with the WGL functions.

Share this post


Link to post
Share on other sites
I get errors when trying to compile FLTK example programs (the Simple OGL one on the How-To list).

Mainly issues having to do with the GL header file, it works in my own projects, why not with FLTK?

Can anyone point me into something a little coherant than the websites startup faq, it sucks.

Share this post


Link to post
Share on other sites
I am not sure if OpenGL can render to any windows control, but perhaps a windows form will work with some controls?

Share this post


Link to post
Share on other sites
Hi, I can't say I know about them, I have been looking for what I need with gui too.
I found that QT and wxWidgets are portable and can hold OpenGL windows in them. They may be a a bit heavy though, more lightweight is cegui.

Share this post


Link to post
Share on other sites
I did my own GUI for my game, and it wasn't that hard, but really rewarding for getting my C++ skills better. If you are looking for some OpenGL based GUI, take a search through forums, there are plenty results you are going to find.

Share this post


Link to post
Share on other sites
Quote:
Original post by Shamino
I get errors when trying to compile FLTK example programs ... Mainly issues having to do with the GL header file, it works in my own projects, why not with FLTK?


Try including <windows.h> before including <gl/GL.h> The gl header file uses some stuff in windows.h so even if your code is cross-platform, the gl header file is not. That should fix that.

As for a GUI, I heavily reccomend wxWidgets. It can be a pain to set up (you have to compile it yourself), but once you get it going, it's a pleasure to work with. And it supports gl canvas's.

Good Luck

Share this post


Link to post
Share on other sites
Alright, so I included windows.h in there, cleared up most of the errors, now I think I'm getting fltk library errors..


------ Build started: Project: OpenGL Window, Configuration: Debug Win32 ------
Compiling...
Example.cpp
Linking...
Example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Fl_Window::~Fl_Window(void)" (??1Fl_Window@@UAE@XZ) referenced in function __unwindfunclet$??0Fl_Gl_Window@@QAE@HHHHPBD@Z$0
Example.obj : error LNK2019: unresolved external symbol "private: void __thiscall Fl_Gl_Window::init(void)" (?init@Fl_Gl_Window@@AAEXXZ) referenced in function "public: __thiscall Fl_Gl_Window::Fl_Gl_Window(int,int,int,int,char const *)" (??0Fl_Gl_Window@@QAE@HHHHPBD@Z)
Example.obj : error LNK2019: unresolved external symbol "public: __thiscall Fl_Window::Fl_Window(int,int,int,int,char const *)" (??0Fl_Window@@QAE@HHHHPBD@Z) referenced in function "public: __thiscall Fl_Gl_Window::Fl_Gl_Window(int,int,int,int,char const *)" (??0Fl_Gl_Window@@QAE@HHHHPBD@Z)
Example.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Fl_Window::draw(void)" (?draw@Fl_Window@@MAEXXZ)
Example.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall Fl_Window::handle(int)" (?handle@Fl_Window@@UAEHH@Z)
Example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::resize(int,int,int,int)" (?resize@Fl_Gl_Window@@UAEXHHHH@Z)
Example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::flush(void)" (?flush@Fl_Gl_Window@@UAEXXZ)
Example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::show(void)" (?show@Fl_Gl_Window@@UAEXXZ)
Example.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Fl_Gl_Window::hide(void)" (?hide@Fl_Gl_Window@@UAEXXZ)
Example.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall Fl_Gl_Window::draw_overlay(void)" (?draw_overlay@Fl_Gl_Window@@EAEXXZ)
Example.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Fl_Gl_Window::~Fl_Gl_Window(void)" (??1Fl_Gl_Window@@UAE@XZ) referenced in function "public: virtual void * __thiscall Fl_Gl_Window::`scalar deleting destructor'(unsigned int)" (??_GFl_Gl_Window@@UAEPAXI@Z)
Example.obj : error LNK2019: unresolved external symbol "public: void __thiscall Fl_Widget::redraw(void)" (?redraw@Fl_Widget@@QAEXXZ) referenced in function "private: virtual void __thiscall MyGlWindow::resize(int,int,int,int)" (?resize@MyGlWindow@@EAEXHHHH@Z)
Example.obj : error LNK2019: unresolved external symbol "public: static int __cdecl Fl::run(void)" (?run@Fl@@SAHXZ) referenced in function _main
Example.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall Fl_Window::show(void)" (?show@Fl_Window@@UAEXXZ) referenced in function _main
Example.obj : error LNK2019: unresolved external symbol "public: __thiscall Fl_Window::Fl_Window(int,int,char const *)" (??0Fl_Window@@QAE@HHPBD@Z) referenced in function _main
C:\Documents and Settings\Jonathan\My Documents\Visual Studio 2005\Projects\OpenGL Window\Debug\OpenGL Window.exe : fatal error LNK1120: 15 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Jonathan\My Documents\Visual Studio 2005\Projects\OpenGL Window\OpenGL Window\Debug\BuildLog.htm"
OpenGL Window - 16 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



Now this is probably a problem on my part in terms of the setup, I kinda just took the fltk include files and included them, I dunno what else to do, help?

Share this post


Link to post
Share on other sites
Change your project settings...make the project a
'Multi-threaded Debug DLL (/MDd)'

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I'd just go with wxWidgets. It's much easier to use than MFC, and is much easier to go cross-platform with (if you were ever thinking of that). Also, if you're intending to make a complicated GUI, you can also get wxGlade, a nice free WYSIWYG GUI design tool that allows you to generate wxWidgets GUI code, so you don't have to know all the gritty details of the API.

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!