View Full Version : Engines

02-05-2001, 09:37 AM
What level of abstraction should have an opengl game engine? How it should be structured?

Michael Steinberg
02-06-2001, 05:18 AM
You should only see 1% or less OpenGL code. Few OpenGL code is good OpenGL code...
You should be file input dependant. You should have many independent subsystem (where you would see logical differences: Sound system, Window System, Particel System, Camera Spline system) etc. Don't design the game to be hard coded, don't hardcode windows in it, make it all customizable. Use your own ASSERT (which can help quite a lot), make some variables changeable from within engine (for artists), use easy scriptes where possible. This way you don't need as many run-see the error-quite-change code-compile-rerun steps.

Michael Steinberg
02-06-2001, 05:19 AM
Well, after thinking about it, it should be far less than 1%...

02-09-2001, 10:43 AM
Hi Mik! http://www.opengl.org/discussion_boards/ubb/smile.gif

You say there should be far less tahn 1% of OpenGL Code in it.. but somwhere, there must be the calls to OpenGL? Do you mean they shsould be encapsulated, e.g. in C++ Classes?

Michael Steinberg
02-09-2001, 02:08 PM
Well, I rather meant calls to OpenGL like glDrawArrays and all that array stuff, that do much with less function overhead. Optimize your input data to the max and use simple OpenGL calls which can be optimized best.

02-12-2001, 04:35 AM

the best it should be that the rendering core of the engine to be independent of the 3D library you use (OpenGl or DirectX). Ideally it is to be OS independant (the source) but is pretty hard.


Michael Steinberg
02-12-2001, 07:12 AM
So why bother about DirectX (Direct 3D for instance) if you want to be platform independent? However I saw an DirectX "emulator" for linux....