Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


syskrank

Member Since 31 Mar 2014
Offline Last Active Apr 05 2015 04:02 AM

#5157359 What to use for an OpenGL-based game engine.

Posted by syskrank on 01 June 2014 - 11:07 AM


I think I'll just write the system in my comparability layer then using the OS API

 

Hello, fellow engine creator :)

I would strongly suggest you to stick to either Qt, or to something like wxWidgets or GTK.  Don't listen to those, who saying that 'everything is garbage, write your own OS/GPU API/ UI system', they're only partially right :)  Or you will end up creating your own GUI library, learning OS-level API, and will not learn about game engine programming :) Anyways...

 

I have some experience with Qt within application involving graphics and realtime data processing (not 3D though, but hey, it's realtime with threading :)) ) and I can say that it has everything you need: a set of widgets of all sorts, threading, UI editor, IDE ( if you prefer ) and even a special widget to which you can give your OpenGL rendering stuff.

Most likely I'm going to stick to Qt with my own OpenGL-driven engine project :)

 

And one more advice - it's better for you to learn first the hard part - OpenGL, GLSL, script language integration, software architecture and game engine creation process itself. In my opinion it's preferable over first attempts to create your toolset, level editor or whatever.  

How it was mentioned above - grab some windowing library ( SDL2/GLFW ) and go on trying :) You can even create switchable system with various windowing backends.

 

Anyways, good luck, will wait for amazing screenshots from you :)

 

P.S.

Try to avoid OS-level API, if you want to keep it cross-platform. Better - not use them at all, or pack 'em carefully with macros invocations or configurable build system.




#5144678 Managing OpenGL Resources

Posted by syskrank on 06 April 2014 - 02:04 AM

Sorry, I'm not gonna answer your question tongue.png

But can you point me to some books or articles about that 'value/reference semantics' stuff ?

Or maybe I do not understand you correctly. What is a recource handler in your situation and what it does ?

 

P.S.

Your constructor seems like  a useless lambda monstrocity. It makes eyes bleed.  You can't tell what it does at the first glance. Please, don't do like that :) C++ 11 is cool, but it's should be used not for the sake of the C++ 11 itself.

 

Also, if you're going to manage your RAM usage, I'd recommend to you not to use some automatics and smart/shared pointers at all, but to implement your own memory management mechanics, it will give you more flexibility and control over what's going on.

 

Do you really need to destroy your Shader object when it goes out of scope? Or it's more handy to load needed shaders, use them system-wise, and free memory manually after you're completely sure, that you'll not gonna use them at all ?

 

edit:

For resource pooling, I think, it's an effective approach to use your wrapper classes as the resources themselves + use standart containers with custom memory allocators and some memory counting structure for debugging.  Depends on what you've meant by 'classes dedicated to managing resource pools'.

 

edit2:

Hope this would be more constructive.




PARTNERS