-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
Welcome to the opengl_old library. | ||
# OpenGL Bindings FAQ | ||
|
||
- OpenGL functions are renamed as follows: `glFunctionName` -> `gl::functionName` | ||
- Constant definitions keep the same name but are converted to C3 constants: `#define GL_FALSE 0` -> `const GL_FALSE = 0;` | ||
- Fixed length types are converted to the corresponding C3 types: `uint32_t` -> `int` | ||
- Variable length types are converted to the corresponding standard library compatibility types: `int` -> `CInt` | ||
- If a C typedef corresponds to a unique type that expects a subset of values it keeps the same name and gets converted to C3: `GLenum` -> `GLenum` | ||
- all `const char *` sequences are converted to `ZString` | ||
|
||
# Older OpenGL Versions | ||
|
||
- All older versions of OpenGL are supported. | ||
- By default the most recent version is used. | ||
- The specific version used can be set as follows: | ||
```C3 | ||
module opengl; | ||
const GL_VERSION = 33; | ||
``` | ||
- The `GL_VERSION` is just the desired opengl version without the decimal point (so version 1.0 becomes 10, and 4.5 becomes 45) | ||
- Once the version is set only the functions and definitions from that version can be used. The only exception is anything defined in opengl.c3i as global. |