예제 #1
0
 public static void Delete(ref VAO vao)
 {
     if (vao._vao != 0)
     {
         GLAssert.EnsureContext();
         GL.DeleteVertexArray(vao._vao);
         vao = default;
     }
 }
예제 #2
0
파일: IBO.cs 프로젝트: ikorin24/Elffy
 public static void Delete(ref IBO ibo)
 {
     if (ibo._ibo != 0)
     {
         GLAssert.EnsureContext();
         GL.DeleteBuffer(ibo._ibo);
         ibo = default;
     }
 }
예제 #3
0
 public static void Delete(ref Ssbo ssbo)
 {
     if (ssbo._ssbo != 0)
     {
         GLAssert.EnsureContext();
         GL.DeleteBuffer(ssbo._ssbo);
         ssbo = default;
     }
 }
예제 #4
0
파일: VBO.cs 프로젝트: ikorin24/Elffy
 public static unsafe void Delete(ref VBO vbo)
 {
     if (vbo._vbo != 0)
     {
         GLAssert.EnsureContext();
         GL.DeleteBuffer(vbo._vbo);
         vbo = default;
     }
 }
예제 #5
0
 internal static void Delete(ref ProgramObject po)
 {
     if (po._program != 0)
     {
         GLAssert.EnsureContext();
         GL.DeleteProgram(po._program);
         po = default;
     }
 }
예제 #6
0
파일: IBO.cs 프로젝트: ikorin24/Elffy
 public static IBO Create()
 {
     GLAssert.EnsureContext();
     return(new IBO(GL.GenBuffer()));
 }
예제 #7
0
 public static TextureObject Create()
 {
     GLAssert.EnsureContext();
     return(new TextureObject(GL.GenTexture()));
 }
예제 #8
0
 public static void BindBase(Ssbo ssbo, int index)
 {
     GLAssert.EnsureContext();
     GL.BindBufferBase(BufferRangeTarget.ShaderStorageBuffer, index, ssbo._ssbo);
 }
예제 #9
0
 public static unsafe void BufferData(int byteSize, void *data, BufferHint hint)
 {
     GLAssert.EnsureContext();
     GL.BufferData(BufferTarget.ShaderStorageBuffer, byteSize, (IntPtr)data, hint.ToOriginalValue());
 }
예제 #10
0
 public static void Bind(Ssbo ssbo)
 {
     GLAssert.EnsureContext();
     GL.BindBuffer(BufferTarget.ShaderStorageBuffer, ssbo._ssbo);
 }
예제 #11
0
 public static Ssbo Create()
 {
     GLAssert.EnsureContext();
     return(new Ssbo(GL.GenBuffer()));
 }
예제 #12
0
 public static VAO Create()
 {
     GLAssert.EnsureContext();
     return(new VAO(GL.GenVertexArray()));
 }
예제 #13
0
 internal static ProgramObject Create()
 {
     GLAssert.EnsureContext();
     return(new ProgramObject(GL.CreateProgram()));
 }