LAGameStudio / apolune

Lost Astronaut's Game Creation Framework: A massive 1800+ class 1400 file extravaganza of OpenGL, WinAPI, OpenAL and many other features, written in Visual Studio for over a decade!

Home Page:http://lagamestudio.github.io/apolune

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[DOC] Consider dropping the word framework and specify the versions of standards / libaries that are used.

timostrating opened this issue · comments

First of all thanks for sharing. I personally really appreciate it that you have open sourced this code. I really hope more people would do that.

But now that you have open sourced it I would like to argue for 2 changes to the documentation of this codebase.

1: Make it clear what you mean with framework. When i'm looking at this code I see a lot and a lot of examples / implementations. https://github.com/LAGameStudio/apolune/blob/trunk/Apolune/SpherizeShader.h Is such a file where a lot of choises are already made for you and there are many many more files where domain knowledge is hardcoded into files. I would personally describe a framework as a set of principles / implementations that one can change to its own preference. In my opinion this released set of code would not fall in that description. My advice would be to drop the word framework for just the project name or for "lookup" or "example".

2: The readme states clearly that OpenGL and OpenAL and many other things are used but most of the time the specific version that is used is missing. So for example is openAL 1.0 or 1.1 used. OpenGL 3.1 is used with the commend (for widest support) but all the code is written using the old fixed function pipeline so using a higher version is also not possible.

commented

Thanks for caring enough about this project to open an issue.

Part 1:

"Framework" refers to the filter "Framework" in the project filters, and all sub-filters (folders). It is a framework because it in and of itself is not an application, but rather an "encyclopedia" or "library" of features one can draw on when building parts of their "Application"

"Application" refers to the filter "Application" in the project filters. This is where you should organized your custom windows, and it is where the "Application" implementation for Apolune (the game it comes with) is stored. It is also the part that is accessed through the entrypoint established in Load.cpp (explained in MyFirstWindow.h video)

Part 2:

OpenAL: The version can be discovered in the DLLs folder, and also by browsing the includes that are also part of the package in the libdeps folder. I'm pretty sure it is 1.1 since 1.0 does not work anymore and I had to upgrade.

OpenGL: I'm in the process of editing a rather long video where I go through the code and begin to explain the various layerings. Regarding the use of fixed function pipeline: the Framework does not use the fixed function pipeline exclusively (you are referring to "Immediate Mode", ie glVertex), it actually implements a wide variety of OpenGL versions because I manually created the bindings. I used Fixed Function in a few places, usually in debugging or data inspection features, but the main graphics features do not use these older call styles (glVertex/glBegin/glEnd) .. to state "all the code is written using the old fixed function pipeline" is just simply not true.

Only in version OpenGL 3.2 are these functions actually removed, since we use 3.1 compatibility context, we have them and use them in a few areas. Please keep in mind you do not ask OpenGL to "be" a certain version, you can merely test for a minimum version. It is up to the developer to choose what bindings to use. Note that if you look at the history of this project and match it up with the history of OpenGL (https://www.khronos.org/opengl/wiki/History_of_OpenGL) you can see that this project started around the time of OpenGL 3.0 when Fixed Function was still available, and I targeted 3.1 compatibility mode. Also, since it was Windows, I had to manually bind all of the functions, since the version of GL.h that floats around with Windows in 2010 era only supported functions from OpenGL 1.1 and I believe that has continued to this day.

An extensive amount of shader-based drawing routines are now bound to the legacy functions (Stretch*, Pivoted* et al) in the Art.h layer, and Art2d.h contains all of the geometry caching features that support those calls.

For example, I have implemented the viewport stack in Art2d.h and elsewhere I have implemented my own scissor stack management. There are FBO and VBO implementations. Admittedly, the FBO feature is one of the first "advanced" OpenGL features I implemented, so it may have some older fixed function calls mixed in with other more modern approaches.

Just seeing some fixed function calls does not mean it is all written that way. Those fixed function calls are probably for debugging, or represent older code from 12 years ago that is being preserved so that code written back then still works (Empire in the Sky was written back then). Also, "fixed function" is implemented using the same technology as a compiled shader, its just obviously less efficient since it is called from the CPU-side, and is less optimizable by the server-side (GPU).

And, in some rare cases, deprecated functionality of OpenGL won't work properly (like in the case of Display Lists, which many manufacturers simply don't include anymore)

Note also Fixed Function really only went away (but yet, it is still there!) around 2013/2014, for example: https://gamedevelopment.tutsplus.com/articles/the-end-of-fixed-function-rendering-pipelines-and-how-to-move-on--cms-21469

Proposed resolution:

I will add "OpenAL 1.1" to the Readme if that satisfies your request for documentation?

commented

Closing due to inactivity.