This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
generated from tannergooding/new-repo
-
Notifications
You must be signed in to change notification settings - Fork 3
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
30 changed files
with
326,264 additions
and
16 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/usr/bin/env python3 | ||
# -*- encoding utf-8 -*- | ||
# Licensed to the .NET Foundation under one or more agreements. | ||
# The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
from genheaders import * | ||
|
||
buildList.clear() | ||
buildList.append( | ||
CGeneratorOptions( | ||
filename="../../../include/glcompat/gl.h", # output file name | ||
apiname="gl", # profile name | ||
profile="compatibility", # core/compatibility/common | ||
versions=allVersions, # include all versions in output | ||
emitversions=allVersions, # emit all of the included versions | ||
defaultExtensions="gl", # include all gl extensions | ||
addExtensions=None, # also include these extensions (none) | ||
removeExtensions=None, # but don't include these extensions (none) | ||
prefixText=prefixStrings + glExtPlatformStrings, # prefix the header with this text | ||
genFuncPointers=False, # generate function pointer typedefs? | ||
protectFile=protectFile, # protect against multiple includes? | ||
protectFeature=protectFeature, # protect against multiple feature definitions? | ||
protectProto=False, # protect against multiple typedef definitiosn? | ||
protectProtoStr="GL_GLEXT_PROTOTYPES", # if we're protecting against multiple typedefs, what define should we use? | ||
apicall="GLAPI ", # calling convention macro prefix | ||
apientry="APIENTRY ", # function typedef prefix | ||
apientryp="APIENTRYP ", # function pointer typedef prefix | ||
) | ||
) | ||
buildList.append( | ||
CGeneratorOptions( | ||
filename="../../../include/glcore/gl.h", # output file name | ||
apiname="gl", # profile name | ||
profile="core", # core/compatibility/common | ||
versions=allVersions, # include all versions in output | ||
emitversions=allVersions, # emit all of the included versions | ||
defaultExtensions="glcore", # include all gl extensions | ||
addExtensions=None, # also include these extensions (none) | ||
removeExtensions=None, # but don't include these extensions (none) | ||
prefixText=prefixStrings + glExtPlatformStrings, # prefix the header with this text | ||
genFuncPointers=False, # generate function pointer typedefs? | ||
protectFile=protectFile, # protect against multiple includes? | ||
protectFeature=protectFeature, # protect against multiple feature definitions? | ||
protectProto=False, # protect against multiple typedef definitiosn? | ||
protectProtoStr="GL_GLEXT_PROTOTYPES", # if we're protecting against multiple typedefs, what define should we use? | ||
apicall="GLAPI ", # calling convention macro prefix | ||
apientry="APIENTRY ", # function typedef prefix | ||
apientryp="APIENTRYP ", # function pointer typedef prefix | ||
) | ||
) | ||
buildList.append( | ||
CGeneratorOptions( | ||
filename="../../../include/gles1/gl.h", # output file name | ||
apiname="gles1", # profile name | ||
profile="common", # core/compatibility/common | ||
versions=allVersions, # include all versions in output | ||
emitversions=allVersions, # emit all of the included versions | ||
defaultExtensions="gles1", # include all gl extensions | ||
addExtensions=None, # also include these extensions (none) | ||
removeExtensions=None, # but don't include these extensions (none) | ||
prefixText=prefixStrings | ||
+ gles1PlatformStrings | ||
+ apiEntryPrefixStrings, # prefix the header with this text | ||
genFuncPointers=False, # generate function pointer typedefs? | ||
protectFile=protectFile, # protect against multiple includes? | ||
protectFeature=protectFeature, # protect against multiple feature definitions? | ||
protectProto=False, # protect against multiple typedef definitiosn? | ||
protectProtoStr="GL_GLEXT_PROTOTYPES", # if we're protecting against multiple typedefs, what define should we use? | ||
apicall="GL_API ", | ||
apientry="GL_APIENTRY ", | ||
apientryp="GL_APIENTRYP ", | ||
) | ||
) | ||
buildList.append( | ||
CGeneratorOptions( | ||
filename="../../../include/gles2/gl.h", # output file name | ||
apiname="gles2", # profile name | ||
profile="common", # core/compatibility/common | ||
versions=gles2onlyPat, # include all versions in output | ||
emitversions=allVersions, # emit all of the included versions | ||
defaultExtensions="gles2", # include all gl extensions | ||
addExtensions=None, # also include these extensions (none) | ||
removeExtensions=None, # but don't include these extensions (none) | ||
prefixText=prefixStrings | ||
+ gles2PlatformStrings | ||
+ apiEntryPrefixStrings, # prefix the header with this text | ||
genFuncPointers=False, # generate function pointer typedefs? | ||
protectFile=protectFile, # protect against multiple includes? | ||
protectFeature=protectFeature, # protect against multiple feature definitions? | ||
protectProto=False, # protect against multiple typedef definitiosn? | ||
protectProtoStr="GL_GLEXT_PROTOTYPES", # if we're protecting against multiple typedefs, what define should we use? | ||
apicall="GL_APICALL ", | ||
apientry="GL_APIENTRY ", | ||
apientryp="GL_APIENTRYP ", | ||
) | ||
) | ||
for genOpts in buildList: | ||
diag = open("gen.log", "w") | ||
gen = COutputGenerator(errFile=sys.stderr, warnFile=sys.stderr, diagFile=diag) | ||
reg = Registry() | ||
tree = etree.parse(regFilename) | ||
reg.loadElementTree(tree) | ||
reg.setGenerator(gen) | ||
reg.apiGen(genOpts) | ||
diag.close() |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@../settings.rsp | ||
@../remap.rsp | ||
--exclude | ||
__gl_gl_h_ | ||
WIN32_LEAN_AND_MEAN | ||
--file | ||
opengl-gl.h | ||
--methodClassName | ||
GL | ||
--namespace | ||
Silk.NET.OpenGL | ||
--output | ||
../../../../sources/OpenGL/glcompat/gl | ||
--test-output | ||
../../../../tests/OpenGL/glcompat/gl | ||
--traverse | ||
../../../include/glcompat/gl.h |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Ported from the OpenGL headers and corresponding dependencies. | ||
// Original source is Copyright 2013-2020 The Khronos Group Inc. Licensed under the MIT license. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <glcompat/gl.h> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@../settings.rsp | ||
@../remap.rsp | ||
--exclude | ||
__gl_gl_h_ | ||
WIN32_LEAN_AND_MEAN | ||
--file | ||
opengl-gl.h | ||
--methodClassName | ||
GL | ||
--namespace | ||
Silk.NET.OpenGL | ||
--output | ||
../../../../sources/OpenGL/glcore/gl | ||
--test-output | ||
../../../../tests/OpenGL/glcore/gl | ||
--traverse | ||
../../../include/glcore/gl.h |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Ported from the OpenGL Core Profile headers and corresponding dependencies. | ||
// Original source is Copyright 2013-2020 The Khronos Group Inc. Licensed under the MIT license. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <glcore/gl.h> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@../settings.rsp | ||
@../remap.rsp | ||
--exclude | ||
__gles1_gl_h_ | ||
WIN32_LEAN_AND_MEAN | ||
--file | ||
opengl-gl.h | ||
--methodClassName | ||
GL | ||
--namespace | ||
Silk.NET.OpenGL | ||
--output | ||
../../../../sources/OpenGL/gles1/gl | ||
--test-output | ||
../../../../tests/OpenGL/gles1/gl | ||
--traverse | ||
../../../include/gles1/gl.h |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Ported from the OpenGLES 1.0 headers and corresponding dependencies. | ||
// Original source is Copyright 2013-2020 The Khronos Group Inc. Licensed under the MIT license. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <gles1/gl.h> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@../settings.rsp | ||
@../remap.rsp | ||
--exclude | ||
__gles2_gl_h_ | ||
WIN32_LEAN_AND_MEAN | ||
--file | ||
opengl-gl.h | ||
--methodClassName | ||
GL | ||
--namespace | ||
Silk.NET.OpenGL | ||
--output | ||
../../../../sources/OpenGL/gles2/gl | ||
--test-output | ||
../../../../tests/OpenGL/gles2/gl | ||
--traverse | ||
../../../include/gles2/gl.h |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Ported from the OpenGLES 2.0+ headers and corresponding dependencies. | ||
// Original source is Copyright 2013-2020 The Khronos Group Inc. Licensed under the MIT license. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <gles2/gl.h> |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--remap | ||
TODO_ADD_REMAPPINGS=HERE |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@../../common.rsp | ||
--define-macro | ||
TODO_DEFINE_MACROS=HERE | ||
--headerFile | ||
header.txt | ||
--include-directory | ||
../../../submodules/opengl/api | ||
../../../submodules/egl/api | ||
../../../include | ||
--with-callconv | ||
*=Winapi | ||
--with-librarypath | ||
*=opengl |
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Runtime.CompilerServices; | ||
using Silk.NET.Core.Loader; | ||
|
||
namespace Silk.NET.OpenGL; | ||
|
||
partial class GL(INativeContext nativeContext) : IDisposable | ||
{ | ||
public partial class DllImport | ||
{ | ||
static DllImport() => LoaderInterface.RegisterHook(Assembly.GetExecutingAssembly) | ||
} | ||
|
||
public partial class ThisThread : IGL.Static<ThisThread> | ||
{ | ||
public static ThreadLocal<IGL> Underlying { get; } = | ||
new(static () => new StaticWrapper<DllImport>()); | ||
|
||
public static void MakeCurrent(IGL ctx) => Underlying.Value = ctx; | ||
} | ||
|
||
public static IGL Create() => new StaticWrapper<DllImport>(); | ||
|
||
public static IGL Create(INativeContext ctx) => new GL(ctx); | ||
|
||
/// <inheritdoc/> | ||
public void Dispose() => nativeContext.Dispose(); | ||
} |
Oops, something went wrong.