daily update on 20231113 by nitload youmu, upgrade gl loader complete
This commit is contained in:
@@ -29,7 +29,7 @@ namespace StgSharp
|
||||
f.SetSizeLimit(800, 600, 800, 600);
|
||||
GL.SetFrameBufferSizeCallback(f, FormSizeCallback);
|
||||
|
||||
f.LoadGlapi();
|
||||
glManager.LoadGLapi(f, glManager.LoadGLfunc);
|
||||
|
||||
Shader shader = new Shader();
|
||||
shader.CompileVertexShader(
|
||||
@@ -67,7 +67,7 @@ namespace StgSharp
|
||||
VertexBuffer vbo = new VertexBuffer(1);
|
||||
ElementBuffer ebo = new ElementBuffer(1);
|
||||
|
||||
GL.gl->BindVertexArray(vao[0]);
|
||||
GL.gl.BindVertexArray(vao[0]);
|
||||
|
||||
|
||||
|
||||
@@ -76,13 +76,13 @@ namespace StgSharp
|
||||
|
||||
|
||||
|
||||
GL.gl->VertexAttribPointer(0, 3, GLconst.FLOAT, false, 4 * sizeof(float), (void*)0);
|
||||
GL.gl->EnableVertexAttribArray(0);
|
||||
GL.gl.VertexAttribPointer(0, 3, GLconst.FLOAT, false, 4 * sizeof(float), (void*)0);
|
||||
GL.gl.EnableVertexAttribArray(0);
|
||||
|
||||
|
||||
/**/
|
||||
GL.gl->BindBuffer(GLconst.ARRAY_BUFFER, 0);
|
||||
GL.gl->BindVertexArray(0);
|
||||
GL.gl.BindBuffer(GLconst.ARRAY_BUFFER, 0);
|
||||
GL.gl.BindVertexArray(0);
|
||||
/**/
|
||||
|
||||
|
||||
@@ -92,15 +92,15 @@ namespace StgSharp
|
||||
ProcessInput(f.windowID);
|
||||
|
||||
GL.ClearColor(0.2f, 0.3f, 0.3f, 1.0f);
|
||||
GL.gl->Clear(GLconst.COLOR_BUFFER_BIT);
|
||||
GL.gl.Clear(GLconst.COLOR_BUFFER_BIT);
|
||||
|
||||
shader.Use();
|
||||
|
||||
GL.gl->BindVertexArray(vao._bufferID[0]);
|
||||
GL.gl.BindVertexArray(vao._bufferID[0]);
|
||||
|
||||
GL.DrawElements(GepmetryType.TRIANGLES, 9, typeof(uint), IntPtr.Zero);
|
||||
|
||||
GL.gl->BindVertexArray(0);
|
||||
GL.gl.BindVertexArray(0);
|
||||
|
||||
InternalIO.glfw.SwapBuffers(f.windowID);
|
||||
InternalIO.glfw.PollEvents();
|
||||
@@ -138,7 +138,7 @@ namespace StgSharp
|
||||
|
||||
public static unsafe void FormSizeCallback(IntPtr window, int width, int height)
|
||||
{
|
||||
GL.gl->Viewport(0, 0, width, height);
|
||||
GL.gl.Viewport(0, 0, width, height);
|
||||
}
|
||||
|
||||
public static unsafe void ProcessInput(IntPtr windowPtr)
|
||||
|
||||
Reference in New Issue
Block a user