mirror of https://github.com/mosra/magnum.git
Browse Source
Added README, extension list, patch required for it to work on GL 2.1 and the generated files.pull/23/head
5 changed files with 5979 additions and 0 deletions
@ -0,0 +1,16 @@
|
||||
OpenGL header and extension loader is generated using [glLoadGen](https://bitbucket.org/alfonse/glloadgen), |
||||
preferrably from tip of the development branch, currently `2.0`. For it to work |
||||
flawlessly on OpenGL 2.1 and simultaenously not containing all that pre-core |
||||
stuff, you need to patch it with included `glloadgen.patch`, which will then |
||||
force it to use pre-3.0 `glGetString(GL_EXTENSIONS)` even if we request OpenGL |
||||
4.4. Otherwise it would use `glGetStringi(GL_EXTENSIONS, i)`, which is not |
||||
available on OpenGL 2.1 and extension loading will fail on these systems. |
||||
|
||||
See `extensions.txt` for a list of requested non-core extensions. Copy the file |
||||
into glLoadGen directory and generate the files using Lua: |
||||
|
||||
lua LoadGen.lua -style=pointer_c -indent=space -spec=gl -version=4.4 -profile=core -extfile=extensions.txt magnum |
||||
|
||||
Then copy generated `gl_magnum.c` and `gl_magnum.h` to this directory. You may |
||||
want to remove trailing spaces to make the diff cleaner. Be sure to check the |
||||
diff for suspicious changes. |
||||
@ -0,0 +1,12 @@
|
||||
// The following output is taken from `magnum-info` with removed `GL_` |
||||
// suffixes. Only vendor extensions are needed, everything else is pulled in |
||||
// with OpenGL 4.4. |
||||
|
||||
AMD_vertex_shader_layer |
||||
AMD_shader_trinary_minmax |
||||
ARB_robustness |
||||
ATI_texture_mirror_once |
||||
EXT_texture_filter_anisotropic |
||||
EXT_texture_mirror_clamp |
||||
EXT_direct_state_access |
||||
GREMEDY_string_marker |
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@
|
||||
diff --git a/modules/Specs.lua b/modules/Specs.lua
|
||||
index df4f5d5..95e0b97 100644
|
||||
--- a/modules/Specs.lua
|
||||
+++ b/modules/Specs.lua
|
||||
@@ -116,9 +116,9 @@ function glx_spec.GetExtStringParamList(enumResolve) return "display, screen" en
|
||||
-- Function name used to get an extension string.
|
||||
-- Enumerator name used to get an extension string.
|
||||
function gl_spec.GetIndexedExtStringFunc(options)
|
||||
- if(tonumber(options.version) >= 3.0) then
|
||||
- return {"GetIntegerv", "NUM_EXTENSIONS", "GetStringi", "EXTENSIONS"}
|
||||
- end
|
||||
+-- if(tonumber(options.version) >= 3.0) then
|
||||
+-- return {"GetIntegerv", "NUM_EXTENSIONS", "GetStringi", "EXTENSIONS"}
|
||||
+-- end
|
||||
return nil
|
||||
end
|
||||
function wgl_spec.GetIndexedExtStringFunc(options) return nil end
|
||||
Loading…
Reference in new issue