im использует silk.net внутри Avalonia и класс OpenGlControlBase с C# и VisualStudio 2022. < /p>
gl is gl.getapi (gl.getprocaddress); где GL - это Glinterface от Avalonia.
Очистка и так далее происходит до того, как мой код рендеринга.
im использует silk.net внутри Avalonia и класс OpenGlControlBase с C# и VisualStudio 2022. < /p> gl is gl.getapi (gl.getprocaddress); где GL - это Glinterface от Avalonia. Очистка и так далее происходит до того, как мой код рендеринга.[code]public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() .WithInterFont() .UseReactiveUI() .LogToTrace() .With(new Win32PlatformOptions() { RenderingMode = new List() { Win32RenderingMode.Wgl, Win32RenderingMode.Software, } }); < /code> Код инициализации - < /p> float heigth = 1; float width = 1;
api.BindVertexArray(0); < /code> Это код рендеринга < /p> int offset = 0; api.BindVertexArray(vao); ----> working call api.DrawArrays(GLEnum.Triangles, 0, 3);
----> not working call api.DrawElements(GLEnum.Triangles, 3, GLEnum.UnsignedInt, ref offset); api.BindVertexArray(0); [/code] Разрешители ширины: