Skip to content

Commit

Permalink
Fixed VaoId and VboIdPtr is swapped. Removed OpenGL (Use OpenTK.Graph…
Browse files Browse the repository at this point in the history
…ics)
  • Loading branch information
MrScautHD committed Jun 14, 2024
1 parent 0b860e4 commit 4cc5086
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10,000 deletions.
6 changes: 0 additions & 6 deletions Raylib-CSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-CSharp.Samples", "src\Raylib-CSharp.Samples\Raylib-CSharp.Samples.csproj", "{3260131D-2B07-44D5-B829-F2BB5BC2058B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-CSharp.OpenGL", "src\Raylib-CSharp.OpenGL\Raylib-CSharp.OpenGL.csproj", "{338DEE5E-F7FA-46D7-A94F-F33DD1DFF53D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -34,10 +32,6 @@ Global
{3260131D-2B07-44D5-B829-F2BB5BC2058B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3260131D-2B07-44D5-B829-F2BB5BC2058B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3260131D-2B07-44D5-B829-F2BB5BC2058B}.Release|Any CPU.Build.0 = Release|Any CPU
{338DEE5E-F7FA-46D7-A94F-F33DD1DFF53D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{338DEE5E-F7FA-46D7-A94F-F33DD1DFF53D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{338DEE5E-F7FA-46D7-A94F-F33DD1DFF53D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{338DEE5E-F7FA-46D7-A94F-F33DD1DFF53D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4,043 changes: 0 additions & 4,043 deletions src/Raylib-CSharp.OpenGL/Apis/GlApi.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Raylib-CSharp.OpenGL/Contexts/IBindingsContext.cs

This file was deleted.

10 changes: 0 additions & 10 deletions src/Raylib-CSharp.OpenGL/GLSync.cs

This file was deleted.

5,907 changes: 0 additions & 5,907 deletions src/Raylib-CSharp.OpenGL/Gl.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Raylib-CSharp.OpenGL/Raylib-CSharp.OpenGL.csproj

This file was deleted.

2 changes: 1 addition & 1 deletion src/Raylib-CSharp.Test/NativeBindingsContext.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Raylib_CSharp.OpenGL.Contexts;
using OpenTK;
using Raylib_CSharp.Rendering.Gl.Contexts;

namespace Raylib_CSharp.Test;
Expand Down
9 changes: 3 additions & 6 deletions src/Raylib-CSharp.Test/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
using System.Numerics;
using Raylib_CSharp;
using Raylib_CSharp.Apis;
using OpenTK.Graphics;
using Raylib_CSharp.Camera.Cam3D;
using Raylib_CSharp.Colors;
using Raylib_CSharp.Fonts;
using Raylib_CSharp.Geometry;
using Raylib_CSharp.Images;
using Raylib_CSharp.IO;
using Raylib_CSharp.Logging;
using Raylib_CSharp.OpenGL;
using Raylib_CSharp.Rendering;
using Raylib_CSharp.Rendering.Gl.Contexts;
using Raylib_CSharp.Test;
using Raylib_CSharp.Textures;
using Raylib_CSharp.Unsafe.Spans.Data;
Expand Down Expand Up @@ -114,7 +111,7 @@
Image testImage = Image.GenColor(100, 100, Color.Green);

NativeBindingsContext context = new NativeBindingsContext();
Gl.Init(context);
GLLoader.LoadBindings(context);

//Span<Matrix4x4> matrix = new(new Matrix4x4[1]);
//matrix[1] = new Matrix4x4();
Expand All @@ -125,7 +122,7 @@
Graphics.BeginDrawing();
Graphics.ClearBackground(Color.SkyBlue);

Gl.UseProgram(RlGl.GetShaderIdDefault());
//GL.UseProgram((int) RlGl.GetShaderIdDefault());

//Console.WriteLine(GladApi.GetString(0x1F02) + "");

Expand Down
3 changes: 3 additions & 0 deletions src/Raylib-CSharp.Test/Raylib-CSharp.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTK.Graphics" Version="5.0.0-pre.10" />
</ItemGroup>

<!-- Raylib CMake -->
<Import Project="CMake.props"/>
Expand Down
10 changes: 5 additions & 5 deletions src/Raylib-CSharp/Geometry/Mesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public struct Mesh {
/// <inheritdoc cref="BoneWeightsPtr" />
public unsafe Span<float> BoneWeights => new(this.BoneWeightsPtr, this.VertexCount * 4);

/// <summary>
/// OpenGL Vertex Array Object id.
/// </summary>
public uint VaoId;

/// <summary>
/// OpenGL Vertex Buffer Objects id (default vertex data).
/// </summary>
Expand All @@ -116,11 +121,6 @@ public struct Mesh {
/// <inheritdoc cref="VboIdPtr" />
public unsafe Span<uint> VboId => new(this.VboIdPtr, this.VertexCount * 7);

/// <summary>
/// OpenGL Vertex Array Object id.
/// </summary>
public uint VaoId;

/// <summary>
/// Mesh, vertex data and vao/vbo.
/// </summary>
Expand Down

0 comments on commit 4cc5086

Please sign in to comment.