wip: OpenGL backend — pinned buffers, void* offsets, manual swap

- GCHandle.Alloc(Pinned) for BufferData to prevent GC relocation
- void* null for VertexAttribPointer offsets
- ShouldSwapAutomatically=false, manual SwapBuffers
- Solid color debug shader active
- Still has rendering issues — needs visual debugging
This commit is contained in:
emil28092005
2026-06-17 21:05:17 +03:00
parent 3c67790947
commit a306439f22
2 changed files with 30 additions and 46 deletions
+3 -1
View File
@@ -27,8 +27,10 @@ public sealed class OpenGLWindow : Engine.Core.IWindow, IDisposable
var options = WindowOptions.Default;
options.Title = title;
options.Size = new Silk.NET.Maths.Vector2D<int>(width, height);
options.VSync = true;
options.VSync = false;
options.API = new GraphicsAPI(ContextAPI.OpenGL, ContextProfile.Core, ContextFlags.Default, new APIVersion(3, 3));
options.WindowState = WindowState.Normal;
options.ShouldSwapAutomatically = false;
_silkWindow = Window.Create(options);
_silkWindow.Closing += () => _shouldClose = true;