Skip to content

Commit

Permalink
Do not provide invalid externs (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow authored Jan 12, 2024
1 parent 65e4a72 commit 408ddd1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions source/SkiaSharp.Views/SkiaSharp.Views.Shared/GlesInterop/Gles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ internal static class Gles
public const int GL_UNSIGNED_INT_24_8_OES = 0x84FA;
public const int GL_DEPTH24_STENCIL8_OES = 0x88F0;

[DllImport(libGLESv2)]
public static extern void glGetIntegerv(uint pname, out int data);
[DllImport(libGLESv2)]
public static extern System.IntPtr glGetString(uint value);
[DllImport(libGLESv2)]
public static extern void glViewport(int x, int y, int width, int height);
[DllImport(libGLESv2)]
public static extern void glClearColor(float red, float green, float blue, float alpha);
[DllImport(libGLESv2)]
public static extern void glClear(uint mask);

#if !__DESKTOP__
[DllImport(libGLESv2)]
public static extern void glGenRenderbuffers(int n, [In, Out] uint[] buffers);
[DllImport(libGLESv2)]
Expand All @@ -82,18 +94,10 @@ internal static class Gles
[DllImport(libGLESv2)]
public static extern void glGenFramebuffers(int n, ref uint buffer);
[DllImport(libGLESv2)]
public static extern void glGetIntegerv(uint pname, out int data);
[DllImport(libGLESv2)]
public static extern void glGetRenderbufferParameteriv(uint target, int pname, out int param);
[DllImport(libGLESv2)]
public static extern void glBindRenderbuffer(uint target, uint buffer);
[DllImport(libGLESv2)]
public static extern void glViewport(int x, int y, int width, int height);
[DllImport(libGLESv2)]
public static extern void glClearColor(float red, float green, float blue, float alpha);
[DllImport(libGLESv2)]
public static extern void glClear(uint mask);
[DllImport(libGLESv2)]
public static extern void glBindFramebuffer(uint target, uint framebuffer);
[DllImport(libGLESv2)]
public static extern void glDeleteFramebuffers(int n, [In, Out] uint[] framebuffers);
Expand All @@ -105,8 +109,7 @@ internal static class Gles
public static extern void glDeleteRenderbuffers(int n, ref uint renderbuffer);
[DllImport(libGLESv2)]
public static extern void glFramebufferRenderbuffer(uint target, uint attachment, uint renderbuffertarget, uint renderbuffer);
[DllImport(libGLESv2)]
public static extern System.IntPtr glGetString(uint value);
#endif
}
}
#endif

0 comments on commit 408ddd1

Please sign in to comment.