Added the GLSL example.

More function signatures use enums now (according to their category), instead of ints. Must check.
More
This commit is contained in:
the_fiddler 2006-09-30 19:58:51 +00:00
parent a463d9e9af
commit 37834b1ff6
17 changed files with 818 additions and 46 deletions

View file

@ -35,11 +35,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Input", "Input", "{4BB769A0
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platform", "Platform", "{50DCE788-72FC-47E0-A6BD-50BCCE3FCE5B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Examples.OpenGL.DisplayLists", "Source\Examples\OpenGL\DisplayLists\OpenTK.Examples.OpenGL.DisplayLists.csproj", "{0D470B2A-C200-4D27-90C1-B691405E4069}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayLists", "Source\Examples\OpenGL\DisplayLists\DisplayLists.csproj", "{0D470B2A-C200-4D27-90C1-B691405E4069}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Examples.OpenGL.TwoContexts", "Source\Examples\OpenGL\TwoContexts\OpenTK.Examples.OpenGL.TwoContexts.csproj", "{6CC64414-ADED-4148-9969-B2957DD6377A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwoContexts", "Source\Examples\OpenGL\TwoContexts\TwoContexts.csproj", "{6CC64414-ADED-4148-9969-B2957DD6377A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Examples.OpenGL.Window", "Source\Examples\OpenGL\Window\OpenTK.Examples.OpenGL.Window.csproj", "{E4CEA249-4014-49CB-AF37-5A303A4A08D1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Window", "Source\Examples\OpenGL\Window\Window.csproj", "{E4CEA249-4014-49CB-AF37-5A303A4A08D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.OpenGL.Bind", "Source\OpenGL\Bind\OpenTK.OpenGL.Bind.csproj", "{1EDDE592-3923-4898-9006-3D69579E1745}"
EndProject
@ -52,6 +52,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Platform.Windows", "
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{84C34705-D460-4028-AE58-C32CF210F9BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GLSL.Lesson01", "Source\Examples\OpenGL\GLSL\Lesson01\GLSL.Lesson01.csproj", "{46980D11-67FA-4B33-903F-BC9D8A4FE60F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -82,6 +84,10 @@ Global
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Release|Any CPU.Build.0 = Release|Any CPU
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -99,6 +105,7 @@ Global
{0D470B2A-C200-4D27-90C1-B691405E4069} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
{6CC64414-ADED-4148-9969-B2957DD6377A} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
{E4CEA249-4014-49CB-AF37-5A303A4A08D1} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
{46980D11-67FA-4B33-903F-BC9D8A4FE60F} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
{1EDDE592-3923-4898-9006-3D69579E1745} = {2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}
{836876D1-0C8D-4240-BEE4-859D9D3D46CB} = {2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C} = {50DCE788-72FC-47E0-A6BD-50BCCE3FCE5B}

View file

@ -0,0 +1,47 @@
namespace Lesson01
{
partial class Cube
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Cube
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(632, 446);
this.Name = "Cube";
this.Text = "GLSL.Lesson01";
this.ResumeLayout(false);
}
#endregion
}
}

View file

@ -0,0 +1,229 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using OpenTK.OpenGL;
namespace Lesson01
{
public partial class Cube : Form
{
#region Shaders
string[] vertex_shader =
{
"void main() { ",
"gl_FrontColor = gl_Color;",
"gl_Position = ftransform();",
"}"
};
string[] fragment_shader =
{
"void main() { gl_FragColor = gl_Color; }"
};
#endregion
Context context;
static float angle;
#region Constructor
public Cube()
{
InitializeComponent();
Application.Idle += new EventHandler(OnApplicationIdle);
}
#endregion
#region Load event handler
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
context = Context.Create(this, 8, 8, 8, 8, 16, 0, false);
Text =
GL.GetString(Enums.StringName.VENDOR) + " " +
GL.GetString(Enums.StringName.RENDERER) + " " +
GL.GetString(Enums.StringName.VERSION);
GL.ClearColor(0.1f, 0.1f, 0.5f, 0.0f);
GL.Enable(Enums.EnableCap.DEPTH_TEST);
int vertex_shader_object, fragment_shader_object;
int[] status = new int[1];
int shader_program;
vertex_shader_object = GL.CreateShader(Enums.VERSION_2_0.VERTEX_SHADER);
fragment_shader_object = GL.CreateShader(Enums.VERSION_2_0.FRAGMENT_SHADER);
GL.ShaderSource(vertex_shader_object, 1, vertex_shader, null);
GL.CompileShader(vertex_shader_object);
GL.GetShaderiv(vertex_shader_object, Enums.VERSION_2_0.COMPILE_STATUS, status);
//if (status[0] != GL._TRUE)
// throw new Exception("Could not compile vertex shader");
GL.ShaderSource(fragment_shader_object, 1, fragment_shader, null);
GL.CompileShader(fragment_shader_object);
GL.GetShaderiv(fragment_shader_object, Enums.VERSION_2_0.COMPILE_STATUS, status);
//if (status[0] != GL._TRUE)
// throw new Exception("Could not compile fragment shader");
shader_program = GL.CreateProgram();
GL.AttachShader(shader_program, fragment_shader_object);
GL.AttachShader(shader_program, vertex_shader_object);
GL.LinkProgram(shader_program);
GL.UseProgram(shader_program);
OnResize(e);
}
#endregion
#region Resize event handler
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
if (ClientSize.Height == 0)
ClientSize = new System.Drawing.Size(ClientSize.Width, 1);
if (context == null)
return;
GL.Viewport(0, 0, ClientSize.Width, ClientSize.Height);
double ratio = 0.0;
if (ClientSize.Width > ClientSize.Height)
ratio = ClientSize.Width / (double)ClientSize.Height;
//else
// ratio = ClientSize.Height / (double)ClientSize.Width;
GL.MatrixMode(Enums.MatrixMode.PROJECTION);
GL.LoadIdentity();
Glu.Perspective(45.0, ratio, 1.0, 64.0);
}
#endregion
#region Paint event handler
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
GL.LoadIdentity();
Glu.LookAt(
0.0, 5.0, 5.0,
0.0, 0.0, 0.0,
0.0, 1.0, 0.0
);
GL.Rotatef(angle, 0.0f, 1.0f, 0.0f);
angle += 0.05f;
GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT | Enums.ClearBufferMask.DEPTH_BUFFER_BIT);
DrawCube();
context.SwapBuffers();
//Thread.Sleep(1);
//this.Invalidate();
}
#endregion
#region Application main loop
/// <summary>
/// Called when all pending messages have been processed, this is where the application 'Main Loop' resides.
/// </summary>
/// <param name="sender">Not used.</param>
/// <param name="e">Not used.</param>
void OnApplicationIdle(object sender, EventArgs e)
{
// Check if any new messages have popped up. If not, then run the logic at full speed.
while (IsApplicationIdle())
{
// We'd like to play nice with the scheduler. If the window is not in focus,
// we give back some thread-time to the OS, to allow other apps to function full-speed.
// However, if the window _is_ in focus we grab all processor resources.
if (ActiveForm != this)
Thread.Sleep(100);
OnPaint(null);
}
}
#endregion
#region IsApplicationIdle
/// <summary>
/// Checks if there all pending messages have been processed.
/// </summary>
/// <returns>Returns true if there are no messages left, false otherwise.</returns>
static public bool IsApplicationIdle()
{
//OpenTK.Platform.Windows.Api.MessageStruct msg;
Message msg;
return !OpenTK.Platform.Windows.Api.PeekMessage(out msg, IntPtr.Zero, 0, 0, 0);
}
#endregion
#region DrawCube
public void DrawCube()
{
GL.Begin(Enums.BeginMode.QUADS);
GL.Color3f(1, 0, 0);
GL.Vertex3f(-1.0f, -1.0f, -1.0f);
GL.Vertex3f(-1.0f, 1.0f, -1.0f);
GL.Vertex3f(1.0f, 1.0f, -1.0f);
GL.Vertex3f(1.0f, -1.0f, -1.0f);
GL.Color3f(1, 1, 0);
GL.Vertex3f(-1.0f, -1.0f, -1.0f);
GL.Vertex3f(1.0f, -1.0f, -1.0f);
GL.Vertex3f(1.0f, -1.0f, 1.0f);
GL.Vertex3f(-1.0f, -1.0f, 1.0f);
GL.Color3f(1, 0, 1);
GL.Vertex3f(-1.0f, -1.0f, -1.0f);
GL.Vertex3f(-1.0f, -1.0f, 1.0f);
GL.Vertex3f(-1.0f, 1.0f, 1.0f);
GL.Vertex3f(-1.0f, 1.0f, -1.0f);
GL.Color3f(0, 1, 0);
GL.Vertex3f(-1.0f, -1.0f, 1.0f);
GL.Vertex3f(1.0f, -1.0f, 1.0f);
GL.Vertex3f(1.0f, 1.0f, 1.0f);
GL.Vertex3f(-1.0f, 1.0f, 1.0f);
GL.Color3f(0, 0, 1);
GL.Vertex3f(-1.0f, 1.0f, -1.0f);
GL.Vertex3f(-1.0f, 1.0f, 1.0f);
GL.Vertex3f(1.0f, 1.0f, 1.0f);
GL.Vertex3f(1.0f, 1.0f, -1.0f);
GL.Color3f(0, 1, 1);
GL.Vertex3f(1.0f, -1.0f, -1.0f);
GL.Vertex3f(1.0f, 1.0f, -1.0f);
GL.Vertex3f(1.0f, 1.0f, 1.0f);
GL.Vertex3f(1.0f, -1.0f, 1.0f);
GL.End();
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Cube());
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,87 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{46980D11-67FA-4B33-903F-BC9D8A4FE60F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lesson01</RootNamespace>
<AssemblyName>Lesson01</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Cube.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Cube.Designer.cs">
<DependentUpon>Cube.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Cube.resx">
<SubType>Designer</SubType>
<DependentUpon>Cube.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\OpenGL\OpenGL\OpenTK.OpenGL.csproj">
<Project>{836876D1-0C8D-4240-BEE4-859D9D3D46CB}</Project>
<Name>OpenTK.OpenGL</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Platform\Windows\OpenTK.Platform.Windows.csproj">
<Project>{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}</Project>
<Name>OpenTK.Platform.Windows</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Lesson01")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lesson01")]
[assembly: AssemblyCopyright("Copyright © 2006")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("74f178b6-84df-466f-b144-74027560980b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lesson01.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lesson01.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lesson01.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View file

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View file

@ -45,7 +45,7 @@ namespace OpenTK.OpenGL.Bind
line.StartsWith("dlflags:") ||
line.StartsWith("glxflags:") ||
line.StartsWith("vectorequiv:") ||
line.StartsWith("category:") ||
//line.StartsWith("category:") ||
line.StartsWith("version:") ||
line.StartsWith("glxsingle:") ||
line.StartsWith("glxropcode:") ||
@ -111,6 +111,9 @@ namespace OpenTK.OpenGL.Bind
case "version":
f.Version = words[1];
break;
case "category":
f.Category = words[1];
break;
}
}
while (!sr.EndOfStream);

View file

@ -14,6 +14,18 @@ namespace OpenTK.OpenGL.Bind
/// </summary>
public class Function
{
#region Category property
private string _category;
public string Category
{
get { return _category; }
set { _category = value; }
}
#endregion
#region Wrapper type property
private WrapperTypes _wrapper_type = WrapperTypes.None;

View file

@ -246,6 +246,10 @@ namespace OpenTK.OpenGL.Bind
p.Type = "Enums." + p.Type;
continue;
}
else if (p.Type == "GLenum")
{
p.Type = "Enums." + f.Category;
}
else if (GLtypes.TryGetValue(p.Type, out s))
p.Type = s;

View file

@ -5614,11 +5614,11 @@ namespace OpenTK.OpenGL
public delegate void GenQueries(GLsizei n, [MarshalAs(UnmanagedType.LPArray)] GLuint[] ids);
public delegate void DeleteQueries_(GLsizei n, IntPtr ids);
public delegate GLboolean IsQuery(GLuint id);
public delegate void BeginQuery(GLenum target, GLuint id);
public delegate void EndQuery(GLenum target);
public delegate void GetQueryiv(GLenum target, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectiv(GLuint id, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectuiv(GLuint id, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLuint[] parameters);
public delegate void BeginQuery(Enums.VERSION_1_5 target, GLuint id);
public delegate void EndQuery(Enums.VERSION_1_5 target);
public delegate void GetQueryiv(Enums.VERSION_1_5 target, Enums.VERSION_1_5 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectiv(GLuint id, Enums.VERSION_1_5 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectuiv(GLuint id, Enums.VERSION_1_5 pname, [MarshalAs(UnmanagedType.LPArray)] GLuint[] parameters);
public delegate void BindBuffer(GLenum target, GLuint buffer);
public delegate void DeleteBuffers_(GLsizei n, IntPtr buffers);
public delegate void GenBuffers(GLsizei n, [MarshalAs(UnmanagedType.LPArray)] GLuint[] buffers);
@ -5639,19 +5639,19 @@ namespace OpenTK.OpenGL
public delegate void BindAttribLocation_(GLuint program, GLuint index, IntPtr name);
public delegate void CompileShader(GLuint shader);
public delegate GLuint CreateProgram();
public delegate GLuint CreateShader(GLenum type);
public delegate GLuint CreateShader(Enums.VERSION_2_0 type);
public delegate void DeleteProgram(GLuint program);
public delegate void DeleteShader(GLuint shader);
public delegate void DetachShader(GLuint program, GLuint shader);
public delegate void DisableVertexAttribArray(GLuint index);
public delegate void EnableVertexAttribArray(GLuint index);
public delegate void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] GLenum[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
public delegate void GetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] GLenum[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
public delegate void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] Enums.VERSION_2_0[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
public delegate void GetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] Enums.VERSION_2_0[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
public delegate void GetAttachedShaders(GLuint program, GLsizei maxCount, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] count, [MarshalAs(UnmanagedType.LPArray)] GLuint[] obj);
public delegate GLint GetAttribLocation_(GLuint program, IntPtr name);
public delegate void GetProgramiv(GLuint program, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetProgramiv(GLuint program, Enums.VERSION_2_0 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetProgramInfoLog(GLuint program, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLchar[] infoLog);
public delegate void GetShaderiv(GLuint shader, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetShaderiv(GLuint shader, Enums.VERSION_2_0 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetShaderInfoLog(GLuint shader, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLchar[] infoLog);
public delegate void GetShaderSource(GLuint shader, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLchar[] source);
public delegate GLint GetUniformLocation_(GLuint program, IntPtr name);
@ -5878,15 +5878,15 @@ namespace OpenTK.OpenGL
public delegate void GenQueriesARB(GLsizei n, [MarshalAs(UnmanagedType.LPArray)] GLuint[] ids);
public delegate void DeleteQueriesARB_(GLsizei n, IntPtr ids);
public delegate GLboolean IsQueryARB(GLuint id);
public delegate void BeginQueryARB(GLenum target, GLuint id);
public delegate void EndQueryARB(GLenum target);
public delegate void GetQueryivARB(GLenum target, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectivARB(GLuint id, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectuivARB(GLuint id, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLuint[] parameters);
public delegate void BeginQueryARB(Enums.ARB_occlusion_query target, GLuint id);
public delegate void EndQueryARB(Enums.ARB_occlusion_query target);
public delegate void GetQueryivARB(Enums.ARB_occlusion_query target, Enums.ARB_occlusion_query pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectivARB(GLuint id, Enums.ARB_occlusion_query pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetQueryObjectuivARB(GLuint id, Enums.ARB_occlusion_query pname, [MarshalAs(UnmanagedType.LPArray)] GLuint[] parameters);
public delegate void DeleteObjectARB(GLhandleARB obj);
public delegate GLhandleARB GetHandleARB(GLenum pname);
public delegate GLhandleARB GetHandleARB(Enums.ARB_shader_objects pname);
public delegate void DetachObjectARB(GLhandleARB containerObj, GLhandleARB attachedObj);
public delegate GLhandleARB CreateShaderObjectARB(GLenum shaderType);
public delegate GLhandleARB CreateShaderObjectARB(Enums.ARB_shader_objects shaderType);
public delegate void ShaderSourceARB_(GLhandleARB shaderObj, GLsizei count, IntPtr @string, IntPtr length);
public delegate void CompileShaderARB(GLhandleARB shaderObj);
public delegate GLhandleARB CreateProgramObjectARB();
@ -5913,17 +5913,17 @@ namespace OpenTK.OpenGL
public delegate void UniformMatrix2fvARB_(GLint location, GLsizei count, Enums.Boolean transpose, IntPtr value);
public delegate void UniformMatrix3fvARB_(GLint location, GLsizei count, Enums.Boolean transpose, IntPtr value);
public delegate void UniformMatrix4fvARB_(GLint location, GLsizei count, Enums.Boolean transpose, IntPtr value);
public delegate void GetObjectParameterfvARB(GLhandleARB obj, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLfloat[] parameters);
public delegate void GetObjectParameterivARB(GLhandleARB obj, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetObjectParameterfvARB(GLhandleARB obj, Enums.ARB_shader_objects pname, [MarshalAs(UnmanagedType.LPArray)] GLfloat[] parameters);
public delegate void GetObjectParameterivARB(GLhandleARB obj, Enums.ARB_shader_objects pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLcharARB[] infoLog);
public delegate void GetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] count, [MarshalAs(UnmanagedType.LPArray)] GLhandleARB[] obj);
public delegate GLint GetUniformLocationARB_(GLhandleARB programObj, IntPtr name);
public delegate void GetActiveUniformARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] GLenum[] type, [MarshalAs(UnmanagedType.LPArray)] GLcharARB[] name);
public delegate void GetActiveUniformARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] Enums.ARB_shader_objects[] type, [MarshalAs(UnmanagedType.LPArray)] GLcharARB[] name);
public delegate void GetUniformfvARB(GLhandleARB programObj, GLint location, [MarshalAs(UnmanagedType.LPArray)] GLfloat[] parameters);
public delegate void GetUniformivARB(GLhandleARB programObj, GLint location, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLcharARB[] source);
public delegate void BindAttribLocationARB_(GLhandleARB programObj, GLuint index, IntPtr name);
public delegate void GetActiveAttribARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] GLenum[] type, [MarshalAs(UnmanagedType.LPArray)] GLcharARB[] name);
public delegate void GetActiveAttribARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] Enums.ARB_vertex_shader[] type, [MarshalAs(UnmanagedType.LPArray)] GLcharARB[] name);
public delegate GLint GetAttribLocationARB_(GLhandleARB programObj, IntPtr name);
public delegate void DrawBuffersARB_(GLsizei n, IntPtr bufs);
public delegate void ClampColorARB(GLenum target, GLenum clamp);
@ -6551,22 +6551,22 @@ namespace OpenTK.OpenGL
public delegate void DepthBoundsEXT(GLclampd zmin, GLclampd zmax);
public delegate void BlendEquationSeparateEXT(Enums.BlendEquationModeEXT modeRGB, Enums.BlendEquationModeEXT modeAlpha);
public delegate GLboolean IsRenderbufferEXT(GLuint renderbuffer);
public delegate void BindRenderbufferEXT(GLenum target, GLuint renderbuffer);
public delegate void BindRenderbufferEXT(Enums.EXT_framebuffer_object target, GLuint renderbuffer);
public delegate void DeleteRenderbuffersEXT_(GLsizei n, IntPtr renderbuffers);
public delegate void GenRenderbuffersEXT(GLsizei n, [MarshalAs(UnmanagedType.LPArray)] GLuint[] renderbuffers);
public delegate void RenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
public delegate void GetRenderbufferParameterivEXT(GLenum target, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void RenderbufferStorageEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object internalformat, GLsizei width, GLsizei height);
public delegate void GetRenderbufferParameterivEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate GLboolean IsFramebufferEXT(GLuint framebuffer);
public delegate void BindFramebufferEXT(GLenum target, GLuint framebuffer);
public delegate void BindFramebufferEXT(Enums.EXT_framebuffer_object target, GLuint framebuffer);
public delegate void DeleteFramebuffersEXT_(GLsizei n, IntPtr framebuffers);
public delegate void GenFramebuffersEXT(GLsizei n, [MarshalAs(UnmanagedType.LPArray)] GLuint[] framebuffers);
public delegate GLenum CheckFramebufferStatusEXT(GLenum target);
public delegate void FramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
public delegate void FramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
public delegate void FramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
public delegate void FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
public delegate void GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GenerateMipmapEXT(GLenum target);
public delegate GLenum CheckFramebufferStatusEXT(Enums.EXT_framebuffer_object target);
public delegate void FramebufferTexture1DEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object attachment, Enums.EXT_framebuffer_object textarget, GLuint texture, GLint level);
public delegate void FramebufferTexture2DEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object attachment, Enums.EXT_framebuffer_object textarget, GLuint texture, GLint level);
public delegate void FramebufferTexture3DEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object attachment, Enums.EXT_framebuffer_object textarget, GLuint texture, GLint level, GLint zoffset);
public delegate void FramebufferRenderbufferEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object attachment, Enums.EXT_framebuffer_object renderbuffertarget, GLuint renderbuffer);
public delegate void GetFramebufferAttachmentParameterivEXT(Enums.EXT_framebuffer_object target, Enums.EXT_framebuffer_object attachment, Enums.EXT_framebuffer_object pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public delegate void GenerateMipmapEXT(Enums.EXT_framebuffer_object target);
public delegate void StringMarkerGREMEDY_(GLsizei len, IntPtr @string);
}
#endregion
@ -7512,15 +7512,15 @@ namespace OpenTK.OpenGL
[DllImport("opengl32", EntryPoint = "glIsQuery")]
public static extern GLboolean IsQuery(GLuint id);
[DllImport("opengl32", EntryPoint = "glBeginQuery")]
public static extern void BeginQuery(GLenum target, GLuint id);
public static extern void BeginQuery(Enums.VERSION_1_5 target, GLuint id);
[DllImport("opengl32", EntryPoint = "glEndQuery")]
public static extern void EndQuery(GLenum target);
public static extern void EndQuery(Enums.VERSION_1_5 target);
[DllImport("opengl32", EntryPoint = "glGetQueryiv")]
public static extern void GetQueryiv(GLenum target, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public static extern void GetQueryiv(Enums.VERSION_1_5 target, Enums.VERSION_1_5 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
[DllImport("opengl32", EntryPoint = "glGetQueryObjectiv")]
public static extern void GetQueryObjectiv(GLuint id, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public static extern void GetQueryObjectiv(GLuint id, Enums.VERSION_1_5 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
[DllImport("opengl32", EntryPoint = "glGetQueryObjectuiv")]
public static extern void GetQueryObjectuiv(GLuint id, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLuint[] parameters);
public static extern void GetQueryObjectuiv(GLuint id, Enums.VERSION_1_5 pname, [MarshalAs(UnmanagedType.LPArray)] GLuint[] parameters);
[DllImport("opengl32", EntryPoint = "glBindBuffer")]
public static extern void BindBuffer(GLenum target, GLuint buffer);
[DllImport("opengl32", EntryPoint = "glDeleteBuffers")]
@ -7562,7 +7562,7 @@ namespace OpenTK.OpenGL
[DllImport("opengl32", EntryPoint = "glCreateProgram")]
public static extern GLuint CreateProgram();
[DllImport("opengl32", EntryPoint = "glCreateShader")]
public static extern GLuint CreateShader(GLenum type);
public static extern GLuint CreateShader(Enums.VERSION_2_0 type);
[DllImport("opengl32", EntryPoint = "glDeleteProgram")]
public static extern void DeleteProgram(GLuint program);
[DllImport("opengl32", EntryPoint = "glDeleteShader")]
@ -7574,19 +7574,19 @@ namespace OpenTK.OpenGL
[DllImport("opengl32", EntryPoint = "glEnableVertexAttribArray")]
public static extern void EnableVertexAttribArray(GLuint index);
[DllImport("opengl32", EntryPoint = "glGetActiveAttrib")]
public static extern void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] GLenum[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
public static extern void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] Enums.VERSION_2_0[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
[DllImport("opengl32", EntryPoint = "glGetActiveUniform")]
public static extern void GetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] GLenum[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
public static extern void GetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLint[] size, [MarshalAs(UnmanagedType.LPArray)] Enums.VERSION_2_0[] type, [MarshalAs(UnmanagedType.LPArray)] GLchar[] name);
[DllImport("opengl32", EntryPoint = "glGetAttachedShaders")]
public static extern void GetAttachedShaders(GLuint program, GLsizei maxCount, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] count, [MarshalAs(UnmanagedType.LPArray)] GLuint[] obj);
[DllImport("opengl32", EntryPoint = "glGetAttribLocation")]
public static extern GLint GetAttribLocation_(GLuint program, IntPtr name);
[DllImport("opengl32", EntryPoint = "glGetProgramiv")]
public static extern void GetProgramiv(GLuint program, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public static extern void GetProgramiv(GLuint program, Enums.VERSION_2_0 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
[DllImport("opengl32", EntryPoint = "glGetProgramInfoLog")]
public static extern void GetProgramInfoLog(GLuint program, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLchar[] infoLog);
[DllImport("opengl32", EntryPoint = "glGetShaderiv")]
public static extern void GetShaderiv(GLuint shader, GLenum pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
public static extern void GetShaderiv(GLuint shader, Enums.VERSION_2_0 pname, [MarshalAs(UnmanagedType.LPArray)] GLint[] parameters);
[DllImport("opengl32", EntryPoint = "glGetShaderInfoLog")]
public static extern void GetShaderInfoLog(GLuint shader, GLsizei bufSize, [MarshalAs(UnmanagedType.LPArray)] GLsizei[] length, [MarshalAs(UnmanagedType.LPArray)] GLchar[] infoLog);
[DllImport("opengl32", EntryPoint = "glGetShaderSource")]

View file

@ -52,6 +52,7 @@
<Compile Include="Contexts\WindowsContext.cs" />
<Compile Include="Contexts\WindowsVistaContext.cs" />
<Compile Include="Contexts\X11Context.cs" />
<Compile Include="MissingEnums.cs" />
<Compile Include="Wgl.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

View file

@ -10,6 +10,8 @@ OpenTK 0.3.1 -> 0.3.2
+ + Added the PreviousType property to the Function class. This is used when generating wrappers for functions with type-checked arrays (e.g. float[] arrays etc).
+ + Corrected some type aliases in cs_types.txt
+ + Added the missing wrappers for glReadPixels! (this falls in the out void array).
+ + A missing enum now defaults to Enum.[Function category] (a new property was added to the Function class and the SpecReader.ReadFunctions function was modified). I should test this to see if it works ok.
+ Added the GLSL.Lesson01 example.
OpenTK 0.3.0 -> 0.3.1
+ Updated the binding generator to version 0.7.4, based on the work done for Tao.

View file

@ -14,3 +14,5 @@ Todo:
+ + Clean up the code.
+ + Add comments and documentation (faqs, pitfalls, best practices).
+ + + Add the CLS compliant attribute to the Gl class.
+ Add more platform bindings.
+ Add cross-platform way of overriding the Application.Idle handler.