Skip to content

WIP OpenTK 3 changes #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions OpenTKTutorial1/OpenTKTutorial1.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTKTutorial1", "OpenTKTutorial1\OpenTKTutorial1.csproj", "{D637FA9A-1AD4-48A1-9D15-A137F182DC54}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Debug|x64.ActiveCfg = Debug|x64
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Debug|x64.Build.0 = Debug|x64
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Debug|x86.ActiveCfg = Debug|x86
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Debug|x86.Build.0 = Debug|x86
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Release|x64.ActiveCfg = Release|x64
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Release|x64.Build.0 = Release|x64
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Release|x86.ActiveCfg = Release|x86
{D637FA9A-1AD4-48A1-9D15-A137F182DC54}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
12 changes: 10 additions & 2 deletions OpenTKTutorial1/OpenTKTutorial1/OpenTKTutorial1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion OpenTKTutorial1/OpenTKTutorial1/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="2.0.0" targetFramework="net40-client" />
<package id="OpenTK" version="3.0.1" targetFramework="net40-client" />
</packages>
12 changes: 10 additions & 2 deletions OpenTKTutorial2/OpenTKTutorial2.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTKTutorial2", "OpenTKTutorial2\OpenTKTutorial2.csproj", "{A4FDF904-BC9E-4F80-975F-230F6AB095EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Debug|x64.ActiveCfg = Debug|x64
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Debug|x64.Build.0 = Debug|x64
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Debug|x86.ActiveCfg = Debug|x86
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Debug|x86.Build.0 = Debug|x86
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Release|x64.ActiveCfg = Release|x64
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Release|x64.Build.0 = Release|x64
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Release|x86.ActiveCfg = Release|x86
{A4FDF904-BC9E-4F80-975F-230F6AB095EF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
12 changes: 10 additions & 2 deletions OpenTKTutorial2/OpenTKTutorial2/OpenTKTutorial2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion OpenTKTutorial2/OpenTKTutorial2/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="2.0.0" targetFramework="net40-client" />
<package id="OpenTK" version="3.0.1" targetFramework="net40-client" />
</packages>
12 changes: 10 additions & 2 deletions OpenTKTutorial3/OpenTKTutorial3.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTKTutorial3", "OpenTKTutorial3\OpenTKTutorial3.csproj", "{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Debug|x64.ActiveCfg = Debug|x64
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Debug|x64.Build.0 = Debug|x64
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Debug|x86.ActiveCfg = Debug|x86
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Debug|x86.Build.0 = Debug|x86
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Release|x64.ActiveCfg = Release|x64
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Release|x64.Build.0 = Release|x64
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Release|x86.ActiveCfg = Release|x86
{D1606287-F3D4-41D0-9FB8-00D2B2CFB408}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
12 changes: 10 additions & 2 deletions OpenTKTutorial3/OpenTKTutorial3/OpenTKTutorial3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion OpenTKTutorial3/OpenTKTutorial3/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="2.0.0" targetFramework="net40-client" />
<package id="OpenTK" version="3.0.1" targetFramework="net40-client" />
</packages>
12 changes: 10 additions & 2 deletions OpenTKTutorial4/OpenTKTutorial4.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTKTutorial4", "OpenTKTutorial4\OpenTKTutorial4.csproj", "{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x64.ActiveCfg = Debug|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x64.Build.0 = Debug|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x86.ActiveCfg = Debug|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x86.Build.0 = Debug|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x64.ActiveCfg = Release|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x64.Build.0 = Release|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x86.ActiveCfg = Release|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
6 changes: 6 additions & 0 deletions OpenTKTutorial4/OpenTKTutorial4/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.Enable(EnableCap.DepthTest);

// Prevent rendering with no data
if (vertdata == null)
{
return;
}

GL.EnableVertexAttribArray(attribute_vpos);
GL.EnableVertexAttribArray(attribute_vcol);

Expand Down
12 changes: 10 additions & 2 deletions OpenTKTutorial4/OpenTKTutorial4/OpenTKTutorial4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion OpenTKTutorial4/OpenTKTutorial4/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="2.0.0" targetFramework="net40-client" />
<package id="OpenTK" version="3.0.1" targetFramework="net40-client" />
</packages>
12 changes: 10 additions & 2 deletions OpenTKTutorial5/OpenTKTutorial5.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTKTutorial5", "OpenTKTutorial5\OpenTKTutorial5.csproj", "{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x64.ActiveCfg = Debug|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x64.Build.0 = Debug|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x86.ActiveCfg = Debug|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x86.Build.0 = Debug|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x64.ActiveCfg = Release|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x64.Build.0 = Release|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x86.ActiveCfg = Release|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
8 changes: 7 additions & 1 deletion OpenTKTutorial5/OpenTKTutorial5/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Game()

void initProgram()
{
lastMousePos = new Vector2(Mouse.X, Mouse.Y);
lastMousePos = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);
CursorVisible = false;
cam.MouseSensitivity = 0.0025f;

Expand Down Expand Up @@ -191,6 +191,12 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.Enable(EnableCap.DepthTest);

// Prevent rendering with no data
if (vertdata == null)
{
return;
}

GL.EnableVertexAttribArray(attribute_vpos);
GL.EnableVertexAttribArray(attribute_vcol);

Expand Down
12 changes: 10 additions & 2 deletions OpenTKTutorial5/OpenTKTutorial5/OpenTKTutorial5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion OpenTKTutorial5/OpenTKTutorial5/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="2.0.0" targetFramework="net40-client" />
<package id="OpenTK" version="3.0.1" targetFramework="net40-client" />
</packages>
12 changes: 10 additions & 2 deletions OpenTKTutorial6/OpenTKTutorial6.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTKTutorial6", "OpenTKTutorial6\OpenTKTutorial6.csproj", "{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{ACBF192E-C0F1-4B53-958F-915EDD01BA71}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x64.ActiveCfg = Debug|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x64.Build.0 = Debug|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x86.ActiveCfg = Debug|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Debug|x86.Build.0 = Debug|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x64.ActiveCfg = Release|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x64.Build.0 = Release|x64
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x86.ActiveCfg = Release|x86
{CE5CD75D-8626-4CD8-83FC-B7A4868DAEC0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
8 changes: 7 additions & 1 deletion OpenTKTutorial6/OpenTKTutorial6/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Game()

void initProgram()
{
lastMousePos = new Vector2(Mouse.X, Mouse.Y);
lastMousePos = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);
CursorVisible = false;
cam.MouseSensitivity = 0.0025f;

Expand Down Expand Up @@ -84,6 +84,12 @@ protected override void OnRenderFrame(FrameEventArgs e)
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.Enable(EnableCap.DepthTest);

// Prevent rendering with no data
if (vertdata == null)
{
return;
}

shaders[activeShader].EnableVertexAttribArrays();

int indiceat = 0;
Expand Down
12 changes: 10 additions & 2 deletions OpenTKTutorial6/OpenTKTutorial6/OpenTKTutorial6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
8 changes: 4 additions & 4 deletions OpenTKTutorial6/OpenTKTutorial6/ShaderProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public void Link()
AttributeInfo info = new AttributeInfo();
int length = 0;

StringBuilder name = new StringBuilder();
String name;

GL.GetActiveAttrib(ProgramID, i, 256, out length, out info.size, out info.type, name);
GL.GetActiveAttrib(ProgramID, i, 256, out length, out info.size, out info.type, out name);

info.name = name.ToString();
info.address = GL.GetAttribLocation(ProgramID, info.name);
Expand All @@ -88,9 +88,9 @@ public void Link()
UniformInfo info = new UniformInfo();
int length = 0;

StringBuilder name = new StringBuilder();
String name;

GL.GetActiveUniform(ProgramID, i, 256, out length, out info.size, out info.type, name);
GL.GetActiveUniform(ProgramID, i, 256, out length, out info.size, out info.type, out name);

info.name = name.ToString();
Uniforms.Add(name.ToString(), info);
Expand Down
Loading