Closed Hann1bal closed 2 years ago
UPD. When i getting error when call GL.DrawArrays(PrimitiveType.Triangles, 0, 3);
It looks to me like you are not binding the buffer before calling glBufferData
It looks to me like you are not binding the buffer before calling glBufferData
Oh sry it's my mistake))
When i'm try to use code from chapter 1 leasson 2, i got error
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
GameEngine.cs
` using System; using System.Drawing; using GameTry.Common; using OpenTK; using OpenTK.Graphics; using OpenTK.Graphics.OpenGL4; using OpenTK.Windowing.Common; using OpenTK.Windowing.Desktop; using OpenTK.Windowing.GraphicsLibraryFramework; namespace GameTry { public sealed class GameEngine : GameWindow { private readonly float[] _vertices = { -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f, };
}`
` using System; using OpenTK.Mathematics; using OpenTK.Windowing.Common; using OpenTK.Windowing.Desktop;
namespace GameTry { class Programm {
}`
what i do wrong?