Caelum Graphics System Code
High-efficiency minimalist C++ wrapper for OpenGL 4.3
Status: Pre-Alpha
Brought to you by:
william-kappler
Caelum Graphics System (CGS), Pre-Release Development Version (unnumbered) // PURPOSE AND GENERAL USAGE ===================================================== The Caelum Graphics System is a minimalist C++ wrapper for modern OpenGL (4.3+). CGS' leading design principles is that are no "advanced" or "basic" users of an API, only those seeking to fully utilize the functionality provided with the minimal effort and boilerplate. As a result, CGS offers easily-accessible APIs for operations considered "advanced" by many graphics engines. CGS' core features include: * Fully customized GLSL shader pipelines. There is no fixed-function. Period. * Supports uniform blocks with an intuitive wrapper, making it easier to share information across objects and shaders. * Compositing framework for post-processing, multiple rendering, and procedural generation. * The ability to directly read and write to textures through an accessible interface with minimal overhead. * No internal assumptions about your mesh or texture data structure. You are free to define your vertex attributes how you like. Even position is optional, a useful feature for dynamically generated geometry. * Built-in support for reading and writing PNG and HDR images (among others). * A minimalist object-relationship scene graph. CGS is still under active development; there are known stubbed features and (likely) many bugs. These are being addressed with during parallel development with other projects utilizing CGS. // BUILDING ====================================================================== CGS can be built either directly into your program or as a library. In either case, it has the following dependencies: * OpenGL 4.3+ hardware and drivers * GLEW and GLUT (eg, freeglut) * SDL2 - used for window initialization (may be removed in the future) If building on Windows, it is strongly suggested you obtain these via MSYS2: < http://msys2.github.io/ >. OpenGL will be provided by your video drivers (AMD, Nvidia, Intel, etc.), so ensure those are up to date. Most modern hardware can support 4.3 and higher, but may not be available in older drivers. CGS is only officially supported for GCC compilers. It may, however, work for any other with the proper configuration. C++17 support is required. == Build into Project == The suggested way (currently) to use CGS is to build it directly into your project (game/product/whatever). To do this: 1. Add CGS's sources (src) and headers (inc) to your build. 2. Add the path to CGS' dependencies to your link search paths. 3. Add CGS's dependencies to your link. (On Windows + MSYS2, these are: "glew32 glu32 opengl32 SDL2main SDL2 freeimage". Note that the "32" is there even if you are using mingw64 via MSYS2; its a naming convention referring to "Win32". 32 bit vs 64 bit linking is controlled via the library search paths.) 4. Build your project normally. == Build as Library == 1. Update the provided CMakeLists.txt: - With your system include and library paths to where the dependencies reside (System_Include_Path and System_Library_Path) - With any platform-specifc compiler flags ("-mwin32" is REQUIRED for MSYS2) - Adjust Special_CXX_Flags to your liking 2. Run cmake and build CGS (With MSYS2, use: 'cmake -G "MSYS Makefiles"') 3. Link CGS to your program as you would any other library. You may also need to link your program directly to GLEW and GLUT for some functionality currently. 4. Ensure you place the CGS library somewhere your program will find it at runtime. On Windows, the best place is usually the same directory as the EXE. Currently supported/tested systems: * Windows 7 64 bit * ... // CONTACT ======================================================================= Official Repo: https://sourceforge.net/projects/caelum-graphics-system/ Please email me if you have any questions or concerns at < wekapple@ncsu.edu >. // LICENSE ======================================================================= CGS is licensed under the extremely permissive ISC license, which is essentially a less wordy MIT license. See LICENSE for the proper project-wide license terms. Note, however, that some CGS dependencies might have different (and more restrictive) licenses. The ISC license allows effectively unrestricted usage of the source in any manner, open or closed, as long as the license is included in the distribution of anything using what the license applies to (such as your game, engine, product, etc.). How to handle the location of the license notice for MIT/BSD-like licenses is often a point of confusion. I will say I am not particularly concerned with how or where you include it in projects utilizing CGS, nor is any particular location required by the license, but I suggest one of the following: * The credits scroll * A document distributed with your program (README, manual, etc.) * The "about" dialog/page * A "licenses" or similar console command for CLI programs * Inclusion of CGS sources with the project Because the wording of the license might be confusing if merely included on its own (it might imply your program is distributed under it as well), I suggest prefixing CGS's ISC license for clarity, as is done by Mozilla. For example: This program uses the Caelum Graphics System, distributed under the ISC license: Copyright (c) 2015-2021, William Kappler Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. The above likely holds for other MIT/BSD like licenses, but do not consider this legal advice.