Initial commit.
This commit is contained in:
commit
a01a885927
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userprefs
|
||||||
|
*.sln.docstates
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
|
50
PortableGL.SDL/PortableGL.SDL.csproj
Normal file
50
PortableGL.SDL/PortableGL.SDL.csproj
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>10.0.0</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{18DBD03F-D276-421D-BF64-EC2DB40BFDCD}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>PortableGL.SDL</RootNamespace>
|
||||||
|
<AssemblyName>PortableGL.SDL</AssemblyName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>..\bin</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ConsolePause>false</ConsolePause>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>..\bin</OutputPath>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ConsolePause>false</ConsolePause>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="SDL2#">
|
||||||
|
<HintPath>..\libs\SDL2-CS\SDL2#.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SDLGL20.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\PortableGL\PortableGL.csproj">
|
||||||
|
<Project>{8C271551-9F6D-4657-965E-2D321698048C}</Project>
|
||||||
|
<Name>PortableGL</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
6
PortableGL.SDL/Properties/AssemblyInfo.cs
Normal file
6
PortableGL.SDL/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: AssemblyTitle("PortableGL.SDL")]
|
||||||
|
[assembly: AssemblyDescription("PortableGL SDL2-CS backend.")]
|
||||||
|
[assembly: AssemblyProduct("PortableGL.SDL")]
|
||||||
|
[assembly: AssemblyVersion("0.1")]
|
719
PortableGL.SDL/SDLGL20.cs
Normal file
719
PortableGL.SDL/SDLGL20.cs
Normal file
|
@ -0,0 +1,719 @@
|
||||||
|
using System;
|
||||||
|
using OpenTK.Graphics.OpenGL;
|
||||||
|
|
||||||
|
namespace PortableGL.SDL
|
||||||
|
{
|
||||||
|
public class SDLGL20 : GL20
|
||||||
|
{
|
||||||
|
public override void glActiveTexture(int texture)
|
||||||
|
{
|
||||||
|
GL.ActiveTexture((TextureUnit)texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glAttachShader(int program, int shader)
|
||||||
|
{
|
||||||
|
GL.AttachShader(program, shader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBindAttribLocation(int program, int index, string name)
|
||||||
|
{
|
||||||
|
GL.BindAttribLocation(program, index, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBindBuffer(int target, int buffer)
|
||||||
|
{
|
||||||
|
GL.BindBuffer((BufferTarget)target, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBindFramebuffer(int target, int framebuffer)
|
||||||
|
{
|
||||||
|
GL.BindFramebuffer((FramebufferTarget)target, framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBindRenderbuffer(int target, int renderbuffer)
|
||||||
|
{
|
||||||
|
GL.BindRenderbuffer((RenderbufferTarget)target, renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBindTexture(int target, int texture)
|
||||||
|
{
|
||||||
|
GL.BindTexture((TextureTarget)target, texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBlendColor(float red, float green, float blue, float alpha)
|
||||||
|
{
|
||||||
|
GL.BlendColor(red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBlendEquation(int mode)
|
||||||
|
{
|
||||||
|
GL.BlendEquation((BlendEquationMode)mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBlendEquationSeparate(int modeRGB, int modeAlpha)
|
||||||
|
{
|
||||||
|
GL.BlendEquationSeparate((BlendEquationMode)modeRGB, (BlendEquationMode)modeAlpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBlendFunc(int sfactor, int dfactor)
|
||||||
|
{
|
||||||
|
GL.BlendFunc((BlendingFactorSrc)sfactor, (BlendingFactorDest)dfactor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha)
|
||||||
|
{
|
||||||
|
GL.BlendFuncSeparate((BlendingFactorSrc)srcRGB, (BlendingFactorDest)dstRGB, (BlendingFactorSrc)srcAlpha, (BlendingFactorDest)dstAlpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBufferData(int target, int size, IntPtr data, int usage)
|
||||||
|
{
|
||||||
|
GL.BufferData((BufferTarget)target, (IntPtr)size, data, (BufferUsageHint)usage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glBufferSubData(int target, int offset, int size, IntPtr data)
|
||||||
|
{
|
||||||
|
GL.BufferSubData((BufferTarget)target, (IntPtr)offset, (IntPtr)size, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int glCheckFramebufferStatus(int target)
|
||||||
|
{
|
||||||
|
return (int)GL.CheckFramebufferStatus((FramebufferTarget)target);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glClear(int mask)
|
||||||
|
{
|
||||||
|
GL.Clear((ClearBufferMask)mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glClearColor(float red, float green, float blue, float alpha)
|
||||||
|
{
|
||||||
|
GL.ClearColor(red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glClearDepthf(float depth)
|
||||||
|
{
|
||||||
|
GL.ClearDepth(depth);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glClearStencil(int s)
|
||||||
|
{
|
||||||
|
GL.ClearStencil(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glColorMask(bool red, bool green, bool blue, bool alpha)
|
||||||
|
{
|
||||||
|
GL.ColorMask(red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glCompileShader(int shader)
|
||||||
|
{
|
||||||
|
GL.CompileShader(shader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntPtr data)
|
||||||
|
{
|
||||||
|
GL.CompressedTexImage2D((TextureTarget)target, level, (PixelInternalFormat)internalformat, width, height, border, imageSize, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntPtr data)
|
||||||
|
{
|
||||||
|
GL.CompressedTexSubImage2D((TextureTarget)target, level, xoffset, yoffset, width, height, (PixelFormat)format, imageSize, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border)
|
||||||
|
{
|
||||||
|
GL.CopyTexImage2D((TextureTarget)target, level, (PixelInternalFormat)internalformat, x, y, width, height, border);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
GL.CopyTexSubImage2D((TextureTarget)target, level, xoffset, yoffset, x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int glCreateProgram()
|
||||||
|
{
|
||||||
|
return GL.CreateProgram();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int glCreateShader(int shaderType)
|
||||||
|
{
|
||||||
|
return GL.CreateShader((ShaderType)shaderType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glCullFace(int mode)
|
||||||
|
{
|
||||||
|
GL.CullFace((CullFaceMode)mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glDeleteBuffers(int n, IntPtr buffers)
|
||||||
|
{
|
||||||
|
GL.DeleteBuffers(n, (int*)buffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glDeleteFramebuffers(int n, IntPtr framebuffers)
|
||||||
|
{
|
||||||
|
GL.DeleteFramebuffers(n, (int*)framebuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDeleteProgram(int program)
|
||||||
|
{
|
||||||
|
GL.DeleteProgram(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glDeleteRenderbuffers(int n, IntPtr renderbuffers)
|
||||||
|
{
|
||||||
|
GL.DeleteRenderbuffers(n, (int*)renderbuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDeleteShader(int shader)
|
||||||
|
{
|
||||||
|
GL.DeleteShader(shader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glDeleteTextures(int n, IntPtr textures)
|
||||||
|
{
|
||||||
|
GL.DeleteTextures(n, (int*)textures);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDepthFunc(int func)
|
||||||
|
{
|
||||||
|
GL.DepthFunc((DepthFunction)func);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDepthMask(bool flag)
|
||||||
|
{
|
||||||
|
GL.DepthMask(flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDepthRangef(float nearVal, float farVal)
|
||||||
|
{
|
||||||
|
GL.DepthRange(nearVal, farVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDetachShader(int program, int shader)
|
||||||
|
{
|
||||||
|
GL.DetachShader(program, shader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDisable(int cap)
|
||||||
|
{
|
||||||
|
GL.Disable((EnableCap)cap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDisableVertexAttribArray(int index)
|
||||||
|
{
|
||||||
|
GL.DisableVertexAttribArray(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDrawArrays(int mode, int first, int count)
|
||||||
|
{
|
||||||
|
GL.DrawArrays((BeginMode)mode, first, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glDrawElements(int mode, int count, int type, IntPtr indices)
|
||||||
|
{
|
||||||
|
GL.DrawElements((BeginMode)mode, count, (DrawElementsType)type, indices);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glEnable(int cap)
|
||||||
|
{
|
||||||
|
GL.Enable((EnableCap)cap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glEnableVertexAttribArray(int index)
|
||||||
|
{
|
||||||
|
GL.EnableVertexAttribArray(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glFinish()
|
||||||
|
{
|
||||||
|
GL.Finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glFlush()
|
||||||
|
{
|
||||||
|
GL.Flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer)
|
||||||
|
{
|
||||||
|
GL.FramebufferRenderbuffer((FramebufferTarget)target, (FramebufferAttachment)attachment, (RenderbufferTarget)renderbuffertarget, renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level)
|
||||||
|
{
|
||||||
|
GL.FramebufferTexture2D((FramebufferTarget)target, (FramebufferAttachment)attachment, (TextureTarget)textarget, texture, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glFrontFace(int mode)
|
||||||
|
{
|
||||||
|
GL.FrontFace((FrontFaceDirection)mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGenBuffers(int n, IntPtr buffers)
|
||||||
|
{
|
||||||
|
GL.GenBuffers(n, (int*)buffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGenFramebuffers(int n, IntPtr framebuffers)
|
||||||
|
{
|
||||||
|
GL.GenFramebuffers(n, (int*)framebuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGenRenderbuffers(int n, IntPtr renderbuffers)
|
||||||
|
{
|
||||||
|
GL.GenRenderbuffers(n, (int*)renderbuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGenTextures(int n, IntPtr textures)
|
||||||
|
{
|
||||||
|
GL.GenTextures(n, (int*)textures);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glGenerateMipmap(int target)
|
||||||
|
{
|
||||||
|
GL.GenerateMipmap((GenerateMipmapTarget)target);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetboolv(int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetBoolean((GetPName)pname, (bool*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetFloatv(int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetFloat((GetPName)pname, (float*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetIntegerv(int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetInteger((GetPName)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetActiveAttrib(int program, int index, int bufSize, IntPtr length, IntPtr size, IntPtr type, System.Text.StringBuilder name)
|
||||||
|
{
|
||||||
|
GL.GetActiveAttrib(program, index, bufSize, (int*)length, (int*)size, (ActiveAttribType*)type, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetActiveUniform(int program, int index, int bufSize, IntPtr length, IntPtr size, IntPtr type, System.Text.StringBuilder name)
|
||||||
|
{
|
||||||
|
GL.GetActiveUniform(program, index, bufSize, (int*)length, (int*)size, (ActiveUniformType*)type, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetAttachedShaders(int program, int maxCount, IntPtr count, IntPtr shaders)
|
||||||
|
{
|
||||||
|
GL.GetAttachedShaders(program, maxCount, (int*)count, (int*)shaders);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int glGetAttribLocation(int program, string name)
|
||||||
|
{
|
||||||
|
return GL.GetAttribLocation(program, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetBufferParameteriv(int target, int value, IntPtr data)
|
||||||
|
{
|
||||||
|
GL.GetBufferParameter((BufferTarget)target, (BufferParameterName)value, (int*)data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int glGetError()
|
||||||
|
{
|
||||||
|
return (int)GL.GetError();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetFramebufferAttachmentParameter((FramebufferTarget)target, (FramebufferAttachment)attachment, (FramebufferParameterName)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetProgramInfoLog(int program, int maxLength, IntPtr length, System.Text.StringBuilder infoLog)
|
||||||
|
{
|
||||||
|
GL.GetProgramInfoLog(program, maxLength, (int*)length, infoLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetProgramiv(int program, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetProgram(program, (ProgramParameter)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetRenderbufferParameteriv(int target, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetRenderbufferParameter((RenderbufferTarget)target, (RenderbufferParameterName)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetShaderInfoLog(int shader, int maxLength, IntPtr length, System.Text.StringBuilder infoLog)
|
||||||
|
{
|
||||||
|
GL.GetShaderInfoLog(shader, maxLength, (int*)length, infoLog);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetShaderPrecisionFormat(int shaderType, int precisionType, IntPtr range, IntPtr precision)
|
||||||
|
{
|
||||||
|
GL.GetShaderPrecisionFormat((ShaderType)shaderType, (ShaderPrecisionType)precisionType, (int*)range, (int*)precision);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetShaderSource(int shader, int maxLength, IntPtr length, System.Text.StringBuilder source)
|
||||||
|
{
|
||||||
|
GL.GetShaderSource(shader, maxLength, (int*)length, source);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetShaderiv(int shader, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetShader(shader, (ShaderParameter)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string glGetString(int name)
|
||||||
|
{
|
||||||
|
return GL.GetString((StringName)name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetTexParameterfv(int target, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetTexParameter((TextureTarget)target, (GetTextureParameter)pname, (float*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetTexParameteriv(int target, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetTexParameter((TextureTarget)target, (GetTextureParameter)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetUniformfv(int program, int location, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetUniform(program, location, (float*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetUniformiv(int program, int location, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetUniform(program, location, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int glGetUniformLocation(int program, string name)
|
||||||
|
{
|
||||||
|
return GL.GetUniformLocation(program, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetVertexAttribfv(int index, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetVertexAttrib(index, (VertexAttribParameter)pname, (float*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetVertexAttribiv(int index, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.GetVertexAttrib(index, (VertexAttribParameter)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glGetVertexAttribPointerv(int index, int pname, IntPtr pointer)
|
||||||
|
{
|
||||||
|
GL.GetVertexAttribPointer(index, (VertexAttribPointerParameter)pname, pointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glHint(int target, int mode)
|
||||||
|
{
|
||||||
|
GL.Hint((HintTarget)target, (HintMode)mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsBuffer(int buffer)
|
||||||
|
{
|
||||||
|
return GL.IsBuffer(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsEnabled(int cap)
|
||||||
|
{
|
||||||
|
return GL.IsEnabled((EnableCap)cap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsFramebuffer(int framebuffer)
|
||||||
|
{
|
||||||
|
return GL.IsFramebuffer(framebuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsProgram(int program)
|
||||||
|
{
|
||||||
|
return GL.IsProgram(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsRenderbuffer(int renderbuffer)
|
||||||
|
{
|
||||||
|
return GL.IsRenderbuffer(renderbuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsShader(int shader)
|
||||||
|
{
|
||||||
|
return GL.IsShader(shader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool glIsTexture(int texture)
|
||||||
|
{
|
||||||
|
return GL.IsTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glLineWidth(float width)
|
||||||
|
{
|
||||||
|
GL.LineWidth(width);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glLinkProgram(int program)
|
||||||
|
{
|
||||||
|
GL.LinkProgram(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glPixelStorei(int pname, int param)
|
||||||
|
{
|
||||||
|
GL.PixelStore((PixelStoreParameter)pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glPolygonOffset(float factor, float units)
|
||||||
|
{
|
||||||
|
GL.PolygonOffset(factor, units);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glReadPixels(int x, int y, int width, int height, int format, int type, IntPtr pixels)
|
||||||
|
{
|
||||||
|
GL.ReadPixels(x, y, width, height, (PixelFormat)format, (PixelType)type, pixels);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glReleaseShaderCompiler()
|
||||||
|
{
|
||||||
|
GL.ReleaseShaderCompiler();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glRenderbufferStorage(int target, int internalformat, int width, int height)
|
||||||
|
{
|
||||||
|
GL.RenderbufferStorage((RenderbufferTarget)target, (RenderbufferStorage)internalformat, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glSampleCoverage(float value, bool invert)
|
||||||
|
{
|
||||||
|
GL.SampleCoverage(value, invert);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glScissor(int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
GL.Scissor(x, y, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glShaderBinary(int n, IntPtr shaders, int binaryformat, IntPtr binary, int length)
|
||||||
|
{
|
||||||
|
GL.ShaderBinary(n, (int*)shaders, (BinaryFormat)binaryformat, binary, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glShaderSource(int shader, int count, string[] str, IntPtr length)
|
||||||
|
{
|
||||||
|
GL.ShaderSource(shader, count, str, (int*)length);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glStencilFunc(int func, int reference, int mask)
|
||||||
|
{
|
||||||
|
GL.StencilFunc((StencilFunction)func, reference, mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glStencilFuncSeparate(int face, int func, int reference, int mask)
|
||||||
|
{
|
||||||
|
GL.StencilFuncSeparate((Version20)face, (StencilFunction)func, reference, mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glStencilMask(int mask)
|
||||||
|
{
|
||||||
|
GL.StencilMask(mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glStencilMaskSeparate(int face, int mask)
|
||||||
|
{
|
||||||
|
GL.StencilMaskSeparate((StencilFace)face, mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glStencilOp(int sfail, int dpfail, int dppass)
|
||||||
|
{
|
||||||
|
GL.StencilOp((StencilOp)sfail, (StencilOp)dpfail, (StencilOp)dppass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass)
|
||||||
|
{
|
||||||
|
GL.StencilOpSeparate((StencilFace)face, (StencilOp)sfail, (StencilOp)dpfail, (StencilOp)dppass);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntPtr data)
|
||||||
|
{
|
||||||
|
GL.TexImage2D((TextureTarget)target, level, (PixelInternalFormat)internalformat, width, height, border, (PixelFormat)format, (PixelType)type, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glTexParameterf(int target, int pname, float param)
|
||||||
|
{
|
||||||
|
GL.TexParameter((TextureTarget)target, (TextureParameterName)pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glTexParameterfv(int target, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.TexParameter((TextureTarget)target, (TextureParameterName)pname, (float*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glTexParameteri(int target, int pname, int param)
|
||||||
|
{
|
||||||
|
GL.TexParameter((TextureTarget)target, (TextureParameterName)pname, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glTexParameteriv(int target, int pname, IntPtr parameters)
|
||||||
|
{
|
||||||
|
GL.TexParameter((TextureTarget)target, (TextureParameterName)pname, (int*)parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntPtr data)
|
||||||
|
{
|
||||||
|
GL.TexSubImage2D((TextureTarget)target, level, xoffset, yoffset, width, height, (PixelFormat)format, (PixelType)type, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform1f(int location, float v0)
|
||||||
|
{
|
||||||
|
GL.Uniform1(location, v0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform1fv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform1(location, count, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform1i(int location, int v0)
|
||||||
|
{
|
||||||
|
GL.Uniform1(location, v0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform1iv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform1(location, count, (int*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform2f(int location, float v0, float v1)
|
||||||
|
{
|
||||||
|
GL.Uniform2(location, v0, v1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform2fv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform2(location, count, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform2i(int location, int v0, int v1)
|
||||||
|
{
|
||||||
|
GL.Uniform2(location, v0, v1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform2iv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform2(location, count, (int*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform3f(int location, float v0, float v1, float v2)
|
||||||
|
{
|
||||||
|
GL.Uniform3(location, v0, v1, v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform3fv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform3(location, count, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform3i(int location, int v0, int v1, int v2)
|
||||||
|
{
|
||||||
|
GL.Uniform3(location, v0, v1, v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform3iv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform3(location, count, (int*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform4f(int location, float v0, float v1, float v2, float v3)
|
||||||
|
{
|
||||||
|
GL.Uniform4(location, v0, v1, v2, v3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform4fv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform4(location, count, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUniform4i(int location, int v0, int v1, int v2, int v3)
|
||||||
|
{
|
||||||
|
GL.Uniform4(location, v0, v1, v2, v3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniform4iv(int location, int count, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.Uniform4(location, count, (int*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniformMatrix2fv(int location, int count, bool transpose, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix2(location, count, transpose, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniformMatrix3fv(int location, int count, bool transpose, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix3(location, count, transpose, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glUniformMatrix4fv(int location, int count, bool transpose, IntPtr value)
|
||||||
|
{
|
||||||
|
GL.UniformMatrix4(location, count, transpose, (float*)value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glUseProgram(int program)
|
||||||
|
{
|
||||||
|
GL.UseProgram(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glValidateProgram(int program)
|
||||||
|
{
|
||||||
|
GL.ValidateProgram(program);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glVertexAttrib1f(int index, float v0)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib1(index, v0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glVertexAttrib1fv(int index, IntPtr v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib1(index, (float*)v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glVertexAttrib2f(int index, float v0, float v1)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib2(index, v0, v1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glVertexAttrib2fv(int index, IntPtr v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib2(index, (float*)v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glVertexAttrib3f(int index, float v0, float v1, float v2)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib3(index, v0, v1, v2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glVertexAttrib3fv(int index, IntPtr v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib3(index, (float*)v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glVertexAttrib4f(int index, float v0, float v1, float v2, float v3)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib4(index, v0, v1, v2, v3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override unsafe void glVertexAttrib4fv(int index, IntPtr v)
|
||||||
|
{
|
||||||
|
GL.VertexAttrib4(index, (float*)v);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glVertexAttribPointer(int index, int size, int type, bool normalized, int stride, IntPtr pointer)
|
||||||
|
{
|
||||||
|
GL.VertexAttribPointer(index, size, (VertexAttribPointerType)type, normalized, stride, pointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void glViewport(int x, int y, int width, int height)
|
||||||
|
{
|
||||||
|
GL.Viewport(x, y, width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
26
PortableGL.sln
Normal file
26
PortableGL.sln
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortableGL.SDL", "PortableGL.SDL\PortableGL.SDL.csproj", "{18DBD03F-D276-421D-BF64-EC2DB40BFDCD}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PortableGL", "PortableGL\PortableGL.csproj", "{8C271551-9F6D-4657-965E-2D321698048C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{18DBD03F-D276-421D-BF64-EC2DB40BFDCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{18DBD03F-D276-421D-BF64-EC2DB40BFDCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{18DBD03F-D276-421D-BF64-EC2DB40BFDCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{18DBD03F-D276-421D-BF64-EC2DB40BFDCD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8C271551-9F6D-4657-965E-2D321698048C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8C271551-9F6D-4657-965E-2D321698048C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8C271551-9F6D-4657-965E-2D321698048C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8C271551-9F6D-4657-965E-2D321698048C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
|
StartupItem = PortableGL.SDL\PortableGL.SDL.csproj
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
484
PortableGL/GL20.cs
Normal file
484
PortableGL/GL20.cs
Normal file
|
@ -0,0 +1,484 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace PortableGL
|
||||||
|
{
|
||||||
|
public abstract partial class GL20
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
|
||||||
|
public const int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
|
||||||
|
public const int GL_ACTIVE_ATTRIBUTES = 0x8B89;
|
||||||
|
public const int GL_ACTIVE_TEXTURE = 0x84E0;
|
||||||
|
public const int GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
|
||||||
|
public const int GL_ACTIVE_UNIFORMS = 0x8B86;
|
||||||
|
public const int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
|
||||||
|
public const int GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
|
||||||
|
public const int GL_ALPHA = 0x1906;
|
||||||
|
public const int GL_ALPHA_BITS = 0x0D55;
|
||||||
|
public const int GL_ALWAYS = 0x0207;
|
||||||
|
public const int GL_ARRAY_BUFFER = 0x8892;
|
||||||
|
public const int GL_ARRAY_BUFFER_BINDING = 0x8894;
|
||||||
|
public const int GL_ATTACHED_SHADERS = 0x8B85;
|
||||||
|
public const int GL_BACK = 0x0405;
|
||||||
|
public const int GL_BLEND = 0x0BE2;
|
||||||
|
public const int GL_BLEND_COLOR = 0x8005;
|
||||||
|
public const int GL_BLEND_DST_ALPHA = 0x80CA;
|
||||||
|
public const int GL_BLEND_DST_RGB = 0x80C8;
|
||||||
|
public const int GL_BLEND_EQUATION = 0x8009;
|
||||||
|
public const int GL_BLEND_EQUATION_ALPHA = 0x883D;
|
||||||
|
public const int GL_BLEND_EQUATION_RGB = 0x8009;
|
||||||
|
public const int GL_BLEND_SRC_ALPHA = 0x80CB;
|
||||||
|
public const int GL_BLEND_SRC_RGB = 0x80C9;
|
||||||
|
public const int GL_BLUE_BITS = 0x0D54;
|
||||||
|
public const int GL_BOOL = 0x8B56;
|
||||||
|
public const int GL_BOOL_VEC2 = 0x8B57;
|
||||||
|
public const int GL_BOOL_VEC3 = 0x8B58;
|
||||||
|
public const int GL_BOOL_VEC4 = 0x8B59;
|
||||||
|
public const int GL_BUFFER_SIZE = 0x8764;
|
||||||
|
public const int GL_BUFFER_USAGE = 0x8765;
|
||||||
|
public const int GL_BYTE = 0x1400;
|
||||||
|
public const int GL_CCW = 0x0901;
|
||||||
|
public const int GL_CLAMP_TO_EDGE = 0x812F;
|
||||||
|
public const int GL_COLOR_ATTACHMENT0 = 0x8CE0;
|
||||||
|
public const int GL_COLOR_BUFFER_BIT = 0x00004000;
|
||||||
|
public const int GL_COLOR_CLEAR_VALUE = 0x0C22;
|
||||||
|
public const int GL_COLOR_WRITEMASK = 0x0C23;
|
||||||
|
public const int GL_COMPILE_STATUS = 0x8B81;
|
||||||
|
public const int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
|
||||||
|
public const int GL_CONSTANT_ALPHA = 0x8003;
|
||||||
|
public const int GL_CONSTANT_COLOR = 0x8001;
|
||||||
|
public const int GL_COVERAGE_BUFFER_BIT_NV = 0x8000;
|
||||||
|
public const int GL_CULL_FACE = 0x0B44;
|
||||||
|
public const int GL_CULL_FACE_MODE = 0x0B45;
|
||||||
|
public const int GL_CURRENT_PROGRAM = 0x8B8D;
|
||||||
|
public const int GL_CURRENT_VERTEX_ATTRIB = 0x8626;
|
||||||
|
public const int GL_CW = 0x0900;
|
||||||
|
public const int GL_DECR = 0x1E03;
|
||||||
|
public const int GL_DECR_WRAP = 0x8508;
|
||||||
|
public const int GL_DELETE_STATUS = 0x8B80;
|
||||||
|
public const int GL_DEPTH_ATTACHMENT = 0x8D00;
|
||||||
|
public const int GL_DEPTH_BITS = 0x0D56;
|
||||||
|
public const int GL_DEPTH_BUFFER_BIT = 0x00000100;
|
||||||
|
public const int GL_DEPTH_CLEAR_VALUE = 0x0B73;
|
||||||
|
public const int GL_DEPTH_COMPONENT = 0x1902;
|
||||||
|
public const int GL_DEPTH_COMPONENT16 = 0x81A5;
|
||||||
|
public const int GL_DEPTH_FUNC = 0x0B74;
|
||||||
|
public const int GL_DEPTH_RANGE = 0x0B70;
|
||||||
|
public const int GL_DEPTH_TEST = 0x0B71;
|
||||||
|
public const int GL_DEPTH_WRITEMASK = 0x0B72;
|
||||||
|
public const int GL_DITHER = 0x0BD0;
|
||||||
|
public const int GL_DONT_CARE = 0x1100;
|
||||||
|
public const int GL_DST_ALPHA = 0x0304;
|
||||||
|
public const int GL_DST_COLOR = 0x0306;
|
||||||
|
public const int GL_DYNAMIC_DRAW = 0x88E8;
|
||||||
|
public const int GL_ELEMENT_ARRAY_BUFFER = 0x8893;
|
||||||
|
public const int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
|
||||||
|
public const int GL_EQUAL = 0x0202;
|
||||||
|
public const int GL_ES_VERSION_2_0 = 1;
|
||||||
|
public const int GL_EXTENSIONS = 0x1F03;
|
||||||
|
public const int GL_FALSE = 0;
|
||||||
|
public const int GL_FASTEST = 0x1101;
|
||||||
|
public const int GL_FIXED = 0x140C;
|
||||||
|
public const int GL_FLOAT = 0x1406;
|
||||||
|
public const int GL_FLOAT_MAT2 = 0x8B5A;
|
||||||
|
public const int GL_FLOAT_MAT3 = 0x8B5B;
|
||||||
|
public const int GL_FLOAT_MAT4 = 0x8B5C;
|
||||||
|
public const int GL_FLOAT_VEC2 = 0x8B50;
|
||||||
|
public const int GL_FLOAT_VEC3 = 0x8B51;
|
||||||
|
public const int GL_FLOAT_VEC4 = 0x8B52;
|
||||||
|
public const int GL_FRAGMENT_SHADER = 0x8B30;
|
||||||
|
public const int GL_FRAMEBUFFER = 0x8D40;
|
||||||
|
public const int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
|
||||||
|
public const int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
|
||||||
|
public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
|
||||||
|
public const int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
|
||||||
|
public const int GL_FRAMEBUFFER_BINDING = 0x8CA6;
|
||||||
|
public const int GL_FRAMEBUFFER_COMPLETE = 0x8CD5;
|
||||||
|
public const int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
|
||||||
|
public const int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
|
||||||
|
public const int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
|
||||||
|
public const int GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
|
||||||
|
public const int GL_FRONT = 0x0404;
|
||||||
|
public const int GL_FRONT_AND_BACK = 0x0408;
|
||||||
|
public const int GL_FRONT_FACE = 0x0B46;
|
||||||
|
public const int GL_FUNC_ADD = 0x8006;
|
||||||
|
public const int GL_FUNC_REVERSE_SUBTRACT = 0x800B;
|
||||||
|
public const int GL_FUNC_SUBTRACT = 0x800A;
|
||||||
|
public const int GL_GENERATE_MIPMAP = 0x8191;
|
||||||
|
public const int GL_GENERATE_MIPMAP_HINT = 0x8192;
|
||||||
|
public const int GL_GEQUAL = 0x0206;
|
||||||
|
public const int GL_GREATER = 0x0204;
|
||||||
|
public const int GL_GREEN_BITS = 0x0D53;
|
||||||
|
public const int GL_HIGH_FLOAT = 0x8DF2;
|
||||||
|
public const int GL_HIGH_INT = 0x8DF5;
|
||||||
|
public const int GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
|
||||||
|
public const int GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
|
||||||
|
public const int GL_INCR = 0x1E02;
|
||||||
|
public const int GL_INCR_WRAP = 0x8507;
|
||||||
|
public const int GL_INFO_LOG_LENGTH = 0x8B84;
|
||||||
|
public const int GL_INT = 0x1404;
|
||||||
|
public const int GL_INT_VEC2 = 0x8B53;
|
||||||
|
public const int GL_INT_VEC3 = 0x8B54;
|
||||||
|
public const int GL_INT_VEC4 = 0x8B55;
|
||||||
|
public const int GL_INVALID_ENUM = 0x0500;
|
||||||
|
public const int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506;
|
||||||
|
public const int GL_INVALID_OPERATION = 0x0502;
|
||||||
|
public const int GL_INVALID_VALUE = 0x0501;
|
||||||
|
public const int GL_INVERT = 0x150A;
|
||||||
|
public const int GL_KEEP = 0x1E00;
|
||||||
|
public const int GL_LEQUAL = 0x0203;
|
||||||
|
public const int GL_LESS = 0x0201;
|
||||||
|
public const int GL_LINE_LOOP = 0x0002;
|
||||||
|
public const int GL_LINE_STRIP = 0x0003;
|
||||||
|
public const int GL_LINE_WIDTH = 0x0B21;
|
||||||
|
public const int GL_LINEAR = 0x2601;
|
||||||
|
public const int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
|
||||||
|
public const int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
|
||||||
|
public const int GL_LINES = 0x0001;
|
||||||
|
public const int GL_LINK_STATUS = 0x8B82;
|
||||||
|
public const int GL_LOW_FLOAT = 0x8DF0;
|
||||||
|
public const int GL_LOW_INT = 0x8DF3;
|
||||||
|
public const int GL_LUMINANCE = 0x1909;
|
||||||
|
public const int GL_LUMINANCE_ALPHA = 0x190A;
|
||||||
|
public const int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
|
||||||
|
public const int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
|
||||||
|
public const int GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
|
||||||
|
public const int GL_MAX_RENDERBUFFER_SIZE = 0x84E8;
|
||||||
|
public const int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872;
|
||||||
|
public const int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
|
||||||
|
public const int GL_MAX_TEXTURE_SIZE = 0x0D33;
|
||||||
|
public const int GL_MAX_TEXTURE_UNITS = 0x84E2;
|
||||||
|
public const int GL_MAX_VARYING_VECTORS = 0x8DFC;
|
||||||
|
public const int GL_MAX_VERTEX_ATTRIBS = 0x8869;
|
||||||
|
public const int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
|
||||||
|
public const int GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
|
||||||
|
public const int GL_MAX_VIEWPORT_DIMS = 0x0D3A;
|
||||||
|
public const int GL_MEDIUM_FLOAT = 0x8DF1;
|
||||||
|
public const int GL_MEDIUM_INT = 0x8DF4;
|
||||||
|
public const int GL_MIRRORED_REPEAT = 0x8370;
|
||||||
|
public const int GL_NEAREST = 0x2600;
|
||||||
|
public const int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
|
||||||
|
public const int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
|
||||||
|
public const int GL_NEVER = 0x0200;
|
||||||
|
public const int GL_NICEST = 0x1102;
|
||||||
|
public const int GL_NO_ERROR = 0;
|
||||||
|
public const int GL_NONE = 0;
|
||||||
|
public const int GL_NOTEQUAL = 0x0205;
|
||||||
|
public const int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
|
||||||
|
public const int GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9;
|
||||||
|
public const int GL_ONE = 1;
|
||||||
|
public const int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004;
|
||||||
|
public const int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002;
|
||||||
|
public const int GL_ONE_MINUS_DST_ALPHA = 0x0305;
|
||||||
|
public const int GL_ONE_MINUS_DST_COLOR = 0x0307;
|
||||||
|
public const int GL_ONE_MINUS_SRC_ALPHA = 0x0303;
|
||||||
|
public const int GL_ONE_MINUS_SRC_COLOR = 0x0301;
|
||||||
|
public const int GL_OUT_OF_MEMORY = 0x0505;
|
||||||
|
public const int GL_PACK_ALIGNMENT = 0x0D05;
|
||||||
|
public const int GL_POINTS = 0x0000;
|
||||||
|
public const int GL_POLYGON_OFFSET_FACTOR = 0x8038;
|
||||||
|
public const int GL_POLYGON_OFFSET_FILL = 0x8037;
|
||||||
|
public const int GL_POLYGON_OFFSET_UNITS = 0x2A00;
|
||||||
|
public const int GL_RED_BITS = 0x0D52;
|
||||||
|
public const int GL_RENDERBUFFER = 0x8D41;
|
||||||
|
public const int GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53;
|
||||||
|
public const int GL_RENDERBUFFER_BINDING = 0x8CA7;
|
||||||
|
public const int GL_RENDERBUFFER_BLUE_SIZE = 0x8D52;
|
||||||
|
public const int GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54;
|
||||||
|
public const int GL_RENDERBUFFER_GREEN_SIZE = 0x8D51;
|
||||||
|
public const int GL_RENDERBUFFER_HEIGHT = 0x8D43;
|
||||||
|
public const int GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
|
||||||
|
public const int GL_RENDERBUFFER_RED_SIZE = 0x8D50;
|
||||||
|
public const int GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55;
|
||||||
|
public const int GL_RENDERBUFFER_WIDTH = 0x8D42;
|
||||||
|
public const int GL_RENDERER = 0x1F01;
|
||||||
|
public const int GL_REPEAT = 0x2901;
|
||||||
|
public const int GL_REPLACE = 0x1E01;
|
||||||
|
public const int GL_RGB = 0x1907;
|
||||||
|
public const int GL_RGB565 = 0x8D62;
|
||||||
|
public const int GL_RGB5_A1 = 0x8057;
|
||||||
|
public const int GL_RGBA = 0x1908;
|
||||||
|
public const int GL_RGBA4 = 0x8056;
|
||||||
|
public const int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
|
||||||
|
public const int GL_SAMPLE_BUFFERS = 0x80A8;
|
||||||
|
public const int GL_SAMPLE_COVERAGE = 0x80A0;
|
||||||
|
public const int GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
|
||||||
|
public const int GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
|
||||||
|
public const int GL_SAMPLER_2D = 0x8B5E;
|
||||||
|
public const int GL_SAMPLER_CUBE = 0x8B60;
|
||||||
|
public const int GL_SAMPLES = 0x80A9;
|
||||||
|
public const int GL_SCISSOR_BOX = 0x0C10;
|
||||||
|
public const int GL_SCISSOR_TEST = 0x0C11;
|
||||||
|
public const int GL_SHADER_BINARY_FORMATS = 0x8DF8;
|
||||||
|
public const int GL_SHADER_COMPILER = 0x8DFA;
|
||||||
|
public const int GL_SHADER_SOURCE_LENGTH = 0x8B88;
|
||||||
|
public const int GL_SHADER_TYPE = 0x8B4F;
|
||||||
|
public const int GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
|
||||||
|
public const int GL_SHORT = 0x1402;
|
||||||
|
public const int GL_SRC_ALPHA = 0x0302;
|
||||||
|
public const int GL_SRC_ALPHA_SATURATE = 0x0308;
|
||||||
|
public const int GL_SRC_COLOR = 0x0300;
|
||||||
|
public const int GL_STATIC_DRAW = 0x88E4;
|
||||||
|
public const int GL_STENCIL_ATTACHMENT = 0x8D20;
|
||||||
|
public const int GL_STENCIL_BACK_FAIL = 0x8801;
|
||||||
|
public const int GL_STENCIL_BACK_FUNC = 0x8800;
|
||||||
|
public const int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
|
||||||
|
public const int GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
|
||||||
|
public const int GL_STENCIL_BACK_REF = 0x8CA3;
|
||||||
|
public const int GL_STENCIL_BACK_VALUE_MASK = 0x8CA4;
|
||||||
|
public const int GL_STENCIL_BACK_WRITEMASK = 0x8CA5;
|
||||||
|
public const int GL_STENCIL_BITS = 0x0D57;
|
||||||
|
public const int GL_STENCIL_BUFFER_BIT = 0x00000400;
|
||||||
|
public const int GL_STENCIL_CLEAR_VALUE = 0x0B91;
|
||||||
|
public const int GL_STENCIL_FAIL = 0x0B94;
|
||||||
|
public const int GL_STENCIL_FUNC = 0x0B92;
|
||||||
|
public const int GL_STENCIL_INDEX = 0x1901;
|
||||||
|
public const int GL_STENCIL_INDEX8 = 0x8D48;
|
||||||
|
public const int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
|
||||||
|
public const int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
|
||||||
|
public const int GL_STENCIL_REF = 0x0B97;
|
||||||
|
public const int GL_STENCIL_TEST = 0x0B90;
|
||||||
|
public const int GL_STENCIL_VALUE_MASK = 0x0B93;
|
||||||
|
public const int GL_STENCIL_WRITEMASK = 0x0B98;
|
||||||
|
public const int GL_STREAM_DRAW = 0x88E0;
|
||||||
|
public const int GL_SUBPIXEL_BITS = 0x0D50;
|
||||||
|
public const int GL_TEXTURE = 0x1702;
|
||||||
|
public const int GL_TEXTURE0 = 0x84C0;
|
||||||
|
public const int GL_TEXTURE1 = 0x84C1;
|
||||||
|
public const int GL_TEXTURE10 = 0x84CA;
|
||||||
|
public const int GL_TEXTURE11 = 0x84CB;
|
||||||
|
public const int GL_TEXTURE12 = 0x84CC;
|
||||||
|
public const int GL_TEXTURE13 = 0x84CD;
|
||||||
|
public const int GL_TEXTURE14 = 0x84CE;
|
||||||
|
public const int GL_TEXTURE15 = 0x84CF;
|
||||||
|
public const int GL_TEXTURE16 = 0x84D0;
|
||||||
|
public const int GL_TEXTURE17 = 0x84D1;
|
||||||
|
public const int GL_TEXTURE18 = 0x84D2;
|
||||||
|
public const int GL_TEXTURE19 = 0x84D3;
|
||||||
|
public const int GL_TEXTURE2 = 0x84C2;
|
||||||
|
public const int GL_TEXTURE20 = 0x84D4;
|
||||||
|
public const int GL_TEXTURE21 = 0x84D5;
|
||||||
|
public const int GL_TEXTURE22 = 0x84D6;
|
||||||
|
public const int GL_TEXTURE23 = 0x84D7;
|
||||||
|
public const int GL_TEXTURE24 = 0x84D8;
|
||||||
|
public const int GL_TEXTURE25 = 0x84D9;
|
||||||
|
public const int GL_TEXTURE26 = 0x84DA;
|
||||||
|
public const int GL_TEXTURE27 = 0x84DB;
|
||||||
|
public const int GL_TEXTURE28 = 0x84DC;
|
||||||
|
public const int GL_TEXTURE29 = 0x84DD;
|
||||||
|
public const int GL_TEXTURE3 = 0x84C3;
|
||||||
|
public const int GL_TEXTURE30 = 0x84DE;
|
||||||
|
public const int GL_TEXTURE31 = 0x84DF;
|
||||||
|
public const int GL_TEXTURE4 = 0x84C4;
|
||||||
|
public const int GL_TEXTURE5 = 0x84C5;
|
||||||
|
public const int GL_TEXTURE6 = 0x84C6;
|
||||||
|
public const int GL_TEXTURE7 = 0x84C7;
|
||||||
|
public const int GL_TEXTURE8 = 0x84C8;
|
||||||
|
public const int GL_TEXTURE9 = 0x84C9;
|
||||||
|
public const int GL_TEXTURE_2D = 0x0DE1;
|
||||||
|
public const int GL_TEXTURE_BINDING_2D = 0x8069;
|
||||||
|
public const int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP = 0x8513;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
|
||||||
|
public const int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
|
||||||
|
public const int GL_TEXTURE_MAG_FILTER = 0x2800;
|
||||||
|
public const int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
|
||||||
|
public const int GL_TEXTURE_MIN_FILTER = 0x2801;
|
||||||
|
public const int GL_TEXTURE_WRAP_S = 0x2802;
|
||||||
|
public const int GL_TEXTURE_WRAP_T = 0x2803;
|
||||||
|
public const int GL_TRIANGLE_FAN = 0x0006;
|
||||||
|
public const int GL_TRIANGLE_STRIP = 0x0005;
|
||||||
|
public const int GL_TRIANGLES = 0x0004;
|
||||||
|
public const int GL_TRUE = 1;
|
||||||
|
public const int GL_UNPACK_ALIGNMENT = 0x0CF5;
|
||||||
|
public const int GL_UNSIGNED_BYTE = 0x1401;
|
||||||
|
public const int GL_UNSIGNED_INT = 0x1405;
|
||||||
|
public const int GL_UNSIGNED_SHORT = 0x1403;
|
||||||
|
public const int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
|
||||||
|
public const int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
|
||||||
|
public const int GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
|
||||||
|
public const int GL_VALIDATE_STATUS = 0x8B83;
|
||||||
|
public const int GL_VENDOR = 0x1F00;
|
||||||
|
public const int GL_VERSION = 0x1F02;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
|
||||||
|
public const int GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
|
||||||
|
public const int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642;
|
||||||
|
public const int GL_VERTEX_SHADER = 0x8B31;
|
||||||
|
public const int GL_VIEWPORT = 0x0BA2;
|
||||||
|
public const int GL_ZERO = 0;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Methods
|
||||||
|
|
||||||
|
public abstract void glActiveTexture(int texture);
|
||||||
|
public abstract void glAttachShader(int program, int shader);
|
||||||
|
|
||||||
|
public abstract void glBindAttribLocation(int program, int index, string name);
|
||||||
|
public abstract void glBindBuffer(int target, int buffer);
|
||||||
|
public abstract void glBindFramebuffer(int target, int framebuffer);
|
||||||
|
public abstract void glBindRenderbuffer(int target, int renderbuffer);
|
||||||
|
public abstract void glBindTexture(int target, int texture);
|
||||||
|
public abstract void glBlendColor(float red, float green, float blue, float alpha);
|
||||||
|
public abstract void glBlendEquation(int mode);
|
||||||
|
public abstract void glBlendEquationSeparate(int modeRGB, int modeAlpha);
|
||||||
|
public abstract void glBlendFunc(int sfactor, int dfactor);
|
||||||
|
public abstract void glBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);
|
||||||
|
public abstract void glBufferData(int target, int size, IntPtr data, int usage);
|
||||||
|
public abstract void glBufferSubData(int target, int offset, int size, IntPtr data);
|
||||||
|
|
||||||
|
public abstract int glCheckFramebufferStatus(int target);
|
||||||
|
public abstract void glClear(int mask);
|
||||||
|
public abstract void glClearColor(float red, float green, float blue, float alpha);
|
||||||
|
public abstract void glClearDepthf(float depth);
|
||||||
|
public abstract void glClearStencil(int s);
|
||||||
|
public abstract void glColorMask(bool red, bool green, bool blue, bool alpha);
|
||||||
|
public abstract void glCompileShader(int shader);
|
||||||
|
public abstract void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntPtr data);
|
||||||
|
public abstract void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntPtr data);
|
||||||
|
public abstract void glCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border);
|
||||||
|
public abstract void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height);
|
||||||
|
public abstract int glCreateProgram();
|
||||||
|
public abstract int glCreateShader(int shaderType);
|
||||||
|
public abstract void glCullFace(int mode);
|
||||||
|
|
||||||
|
public abstract void glDeleteBuffers(int n, IntPtr buffers);
|
||||||
|
public abstract void glDeleteFramebuffers(int n, IntPtr framebuffers);
|
||||||
|
public abstract void glDeleteProgram(int program);
|
||||||
|
public abstract void glDeleteRenderbuffers(int n, IntPtr renderbuffers);
|
||||||
|
public abstract void glDeleteShader(int shader);
|
||||||
|
public abstract void glDeleteTextures(int n, IntPtr textures);
|
||||||
|
public abstract void glDepthFunc(int func);
|
||||||
|
public abstract void glDepthMask(bool flag);
|
||||||
|
public abstract void glDepthRangef(float nearVal, float farVal);
|
||||||
|
public abstract void glDetachShader(int program, int shader);
|
||||||
|
public abstract void glDisable(int cap);
|
||||||
|
public abstract void glDisableVertexAttribArray(int index);
|
||||||
|
public abstract void glDrawArrays(int mode, int first, int count);
|
||||||
|
public abstract void glDrawElements(int mode, int count, int type, IntPtr indices);
|
||||||
|
|
||||||
|
public abstract void glEnable(int cap);
|
||||||
|
public abstract void glEnableVertexAttribArray(int index);
|
||||||
|
|
||||||
|
public abstract void glFinish();
|
||||||
|
public abstract void glFlush();
|
||||||
|
public abstract void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer);
|
||||||
|
public abstract void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level);
|
||||||
|
public abstract void glFrontFace(int mode);
|
||||||
|
|
||||||
|
public abstract void glGenBuffers(int n, IntPtr buffers);
|
||||||
|
public abstract void glGenFramebuffers(int n, IntPtr framebuffers);
|
||||||
|
public abstract void glGenRenderbuffers(int n, IntPtr renderbuffers);
|
||||||
|
public abstract void glGenTextures(int n, IntPtr textures);
|
||||||
|
public abstract void glGenerateMipmap(int target);
|
||||||
|
public abstract void glGetboolv(int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetFloatv(int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetIntegerv(int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetActiveAttrib(int program, int index, int bufSize, IntPtr length, IntPtr size, IntPtr type, System.Text.StringBuilder name);
|
||||||
|
public abstract void glGetActiveUniform(int program, int index, int bufSize, IntPtr length, IntPtr size, IntPtr type, System.Text.StringBuilder name);
|
||||||
|
public abstract void glGetAttachedShaders(int program, int maxCount, IntPtr count, IntPtr shaders);
|
||||||
|
public abstract int glGetAttribLocation(int program, string name);
|
||||||
|
public abstract void glGetBufferParameteriv(int target, int value, IntPtr data);
|
||||||
|
public abstract int glGetError();
|
||||||
|
public abstract void glGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetProgramInfoLog(int program, int maxLength, IntPtr length, System.Text.StringBuilder infoLog);
|
||||||
|
public abstract void glGetProgramiv(int program, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetRenderbufferParameteriv(int target, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetShaderInfoLog(int shader, int maxLength, IntPtr length, System.Text.StringBuilder infoLog);
|
||||||
|
public abstract void glGetShaderPrecisionFormat(int shaderType, int precisionType, IntPtr range, IntPtr precision);
|
||||||
|
public abstract void glGetShaderSource(int shader, int maxLength, IntPtr length, System.Text.StringBuilder source);
|
||||||
|
public abstract void glGetShaderiv(int shader, int pname, IntPtr parameters);
|
||||||
|
public abstract string glGetString(int name);
|
||||||
|
public abstract void glGetTexParameterfv(int target, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetTexParameteriv(int target, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetUniformfv(int program, int location, IntPtr parameters);
|
||||||
|
public abstract void glGetUniformiv(int program, int location, IntPtr parameters);
|
||||||
|
public abstract int glGetUniformLocation(int program, string name);
|
||||||
|
public abstract void glGetVertexAttribfv(int index, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetVertexAttribiv(int index, int pname, IntPtr parameters);
|
||||||
|
public abstract void glGetVertexAttribPointerv(int index, int pname, IntPtr pointer);
|
||||||
|
|
||||||
|
public abstract void glHint(int target, int mode);
|
||||||
|
|
||||||
|
public abstract bool glIsBuffer(int buffer);
|
||||||
|
public abstract bool glIsEnabled(int cap);
|
||||||
|
public abstract bool glIsFramebuffer(int framebuffer);
|
||||||
|
public abstract bool glIsProgram(int program);
|
||||||
|
public abstract bool glIsRenderbuffer(int renderbuffer);
|
||||||
|
public abstract bool glIsShader(int shader);
|
||||||
|
public abstract bool glIsTexture(int texture);
|
||||||
|
|
||||||
|
public abstract void glLineWidth(float width);
|
||||||
|
public abstract void glLinkProgram(int program);
|
||||||
|
|
||||||
|
public abstract void glPixelStorei(int pname, int param);
|
||||||
|
public abstract void glPolygonOffset(float factor, float units);
|
||||||
|
|
||||||
|
public abstract void glReadPixels(int x, int y, int width, int height, int format, int type, IntPtr pixels);
|
||||||
|
public abstract void glReleaseShaderCompiler();
|
||||||
|
public abstract void glRenderbufferStorage(int target, int internalformat, int width, int height);
|
||||||
|
|
||||||
|
public abstract void glSampleCoverage(float value, bool invert);
|
||||||
|
public abstract void glScissor(int x, int y, int width, int height);
|
||||||
|
public abstract void glShaderBinary(int n, IntPtr shaders, int binaryformat, IntPtr binary, int length);
|
||||||
|
public abstract void glShaderSource(int shader, int count, string[] str, IntPtr length);
|
||||||
|
public abstract void glStencilFunc(int func, int reference, int mask);
|
||||||
|
public abstract void glStencilFuncSeparate(int face, int func, int reference, int mask);
|
||||||
|
public abstract void glStencilMask(int mask);
|
||||||
|
public abstract void glStencilMaskSeparate(int face, int mask);
|
||||||
|
public abstract void glStencilOp(int sfail, int dpfail, int dppass);
|
||||||
|
public abstract void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass);
|
||||||
|
|
||||||
|
public abstract void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntPtr data);
|
||||||
|
public abstract void glTexParameterf(int target, int pname, float param);
|
||||||
|
public abstract void glTexParameterfv(int target, int pname, IntPtr parameters);
|
||||||
|
public abstract void glTexParameteri(int target, int pname, int param);
|
||||||
|
public abstract void glTexParameteriv(int target, int pname, IntPtr parameters);
|
||||||
|
public abstract void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntPtr data);
|
||||||
|
|
||||||
|
public abstract void glUniform1f(int location, float v0);
|
||||||
|
public abstract void glUniform1fv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform1i(int location, int v0);
|
||||||
|
public abstract void glUniform1iv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform2f(int location, float v0, float v1);
|
||||||
|
public abstract void glUniform2fv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform2i(int location, int v0, int v1);
|
||||||
|
public abstract void glUniform2iv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform3f(int location, float v0, float v1, float v2);
|
||||||
|
public abstract void glUniform3fv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform3i(int location, int v0, int v1, int v2);
|
||||||
|
public abstract void glUniform3iv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform4f(int location, float v0, float v1, float v2, float v3);
|
||||||
|
public abstract void glUniform4fv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniform4i(int location, int v0, int v1, int v2, int v3);
|
||||||
|
public abstract void glUniform4iv(int location, int count, IntPtr value);
|
||||||
|
public abstract void glUniformMatrix2fv(int location, int count, bool transpose, IntPtr value);
|
||||||
|
public abstract void glUniformMatrix3fv(int location, int count, bool transpose, IntPtr value);
|
||||||
|
public abstract void glUniformMatrix4fv(int location, int count, bool transpose, IntPtr value);
|
||||||
|
public abstract void glUseProgram(int program);
|
||||||
|
|
||||||
|
public abstract void glValidateProgram(int program);
|
||||||
|
public abstract void glVertexAttrib1f(int index, float v0);
|
||||||
|
public abstract void glVertexAttrib1fv(int index, IntPtr v);
|
||||||
|
public abstract void glVertexAttrib2f(int index, float v0, float v1);
|
||||||
|
public abstract void glVertexAttrib2fv(int index, IntPtr v);
|
||||||
|
public abstract void glVertexAttrib3f(int index, float v0, float v1, float v2);
|
||||||
|
public abstract void glVertexAttrib3fv(int index, IntPtr v);
|
||||||
|
public abstract void glVertexAttrib4f(int index, float v0, float v1, float v2, float v3);
|
||||||
|
public abstract void glVertexAttrib4fv(int index, IntPtr v);
|
||||||
|
public abstract void glVertexAttribPointer(int index, int size, int type, bool normalized, int stride, IntPtr pointer);
|
||||||
|
public abstract void glViewport(int x, int y, int width, int height);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
42
PortableGL/PortableGL.csproj
Normal file
42
PortableGL/PortableGL.csproj
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>10.0.0</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{8C271551-9F6D-4657-965E-2D321698048C}</ProjectGuid>
|
||||||
|
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>PortableGL</RootNamespace>
|
||||||
|
<AssemblyName>PortableGL</AssemblyName>
|
||||||
|
<TargetFrameworkProfile>Profile14</TargetFrameworkProfile>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>..\bin</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ConsolePause>false</ConsolePause>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>..\bin</OutputPath>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ConsolePause>false</ConsolePause>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="GL20.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||||
|
</Project>
|
6
PortableGL/Properties/AssemblyInfo.cs
Normal file
6
PortableGL/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: AssemblyTitle("PortableGL")]
|
||||||
|
[assembly: AssemblyDescription("PortableGL Main Interface Portable Class Library.")]
|
||||||
|
[assembly: AssemblyProduct("PortableGL")]
|
||||||
|
[assembly: AssemblyVersion("0.1")]
|
BIN
libs/SDL2-CS/SDL2#.dll
Executable file
BIN
libs/SDL2-CS/SDL2#.dll
Executable file
Binary file not shown.
22
libs/SDL2-CS/SDL2#.dll.config
Normal file
22
libs/SDL2-CS/SDL2#.dll.config
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<dllmap dll="SDL2.dll" os="windows" target="SDL2.dll"/>
|
||||||
|
<dllmap dll="SDL2.dll" os="osx" target="libSDL2-2.0.0.dylib"/>
|
||||||
|
<dllmap dll="SDL2.dll" os="linux" target="libSDL2-2.0.so.0"/>
|
||||||
|
|
||||||
|
<dllmap dll="SDL2_image.dll" os="windows" target="SDL2_image.dll"/>
|
||||||
|
<dllmap dll="SDL2_image.dll" os="osx" target="libSDL2_image-2.0.0.dylib"/>
|
||||||
|
<dllmap dll="SDL2_image.dll" os="linux" target="libSDL2_image-2.0.so.0"/>
|
||||||
|
|
||||||
|
<dllmap dll="SDL2_mixer.dll" os="windows" target="SDL2_mixer.dll"/>
|
||||||
|
<dllmap dll="SDL2_mixer.dll" os="osx" target="libSDL2_mixer-2.0.0.dylib"/>
|
||||||
|
<dllmap dll="SDL2_mixer.dll" os="linux" target="libSDL2_mixer-2.0.so.0"/>
|
||||||
|
|
||||||
|
<dllmap dll="SDL2_ttf.dll" os="windows" target="SDL2_ttf.dll"/>
|
||||||
|
<dllmap dll="SDL2_ttf.dll" os="osx" target="libSDL2_ttf-2.0.0.dylib"/>
|
||||||
|
<dllmap dll="SDL2_ttf.dll" os="linux" target="libSDL2_ttf-2.0.so.0"/>
|
||||||
|
|
||||||
|
<dllmap dll="openal32.dll" os="windows" target="openal32.dll"/>
|
||||||
|
<dllmap dll="openal32.dll" os="osx" target="libopenal.1.dylib"/>
|
||||||
|
<dllmap dll="openal32.dll" os="linux" target="libopenal.so.1"/>
|
||||||
|
</configuration>
|
Reference in a new issue