/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/ohos/agp/render/opengl/adapter/GLES30Adapter.java

https://github.com/dstmath/HWFramework · Java · 440 lines · 331 code · 109 blank · 0 comment · 0 complexity · 03e3e84601e1228f2eeb5428a3a81071 MD5 · raw file

  1. package ohos.agp.render.opengl.adapter;
  2. import android.opengl.GLES30;
  3. import java.nio.Buffer;
  4. import java.nio.FloatBuffer;
  5. import java.nio.IntBuffer;
  6. import ohos.annotation.SystemApi;
  7. @SystemApi
  8. public class GLES30Adapter {
  9. private static final int INITIAL_OFFSET_VALUE = 0;
  10. public static void glBindFramebuffer(int i, int i2) {
  11. GLES30.glBindFramebuffer(i, i2);
  12. }
  13. public static void glBindRenderbuffer(int i, int i2) {
  14. GLES30.glBindRenderbuffer(i, i2);
  15. }
  16. public static void glRenderbufferStorageMultisample(int i, int i2, int i3, int i4, int i5) {
  17. GLES30.glRenderbufferStorageMultisample(i, i2, i3, i4, i5);
  18. }
  19. public static void glBlitFramebuffer(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) {
  20. GLES30.glBlitFramebuffer(i, i2, i3, i4, i5, i6, i7, i8, i9, i10);
  21. }
  22. public static void glDrawBuffers(int i, int[] iArr) {
  23. GLES30.glDrawBuffers(i, iArr, 0);
  24. }
  25. public static void glGenVertexArrays(int i, int[] iArr) {
  26. GLES30.glGenVertexArrays(i, iArr, 0);
  27. }
  28. public static void glBindVertexArray(int i) {
  29. GLES30.glBindVertexArray(i);
  30. }
  31. public static void glWaitSync(long j, int i, long j2) {
  32. GLES30.glWaitSync(j, i, j2);
  33. }
  34. public static void glTransformFeedbackVaryings(int i, int i2, String[] strArr, int i3) {
  35. GLES30.glTransformFeedbackVaryings(i, strArr, i3);
  36. }
  37. public static void glReadPixels(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
  38. GLES30.glReadPixels(i, i2, i3, i4, i5, i6, i7);
  39. }
  40. public static void glReadBuffer(int i) {
  41. GLES30.glReadBuffer(i);
  42. }
  43. public static Buffer glMapBufferRange(int i, int i2, int i3, int i4) {
  44. return GLES30.glMapBufferRange(i, i2, i3, i4);
  45. }
  46. public static long glFenceSync(int i, int i2) {
  47. return GLES30.glFenceSync(i, i2);
  48. }
  49. public static void glBeginTransformFeedback(int i) {
  50. GLES30.glBeginTransformFeedback(i);
  51. }
  52. public static void glEndTransformFeedback() {
  53. GLES30.glEndTransformFeedback();
  54. }
  55. public static void glDeleteVertexArrays(int i, int[] iArr) {
  56. GLES30.glDeleteVertexArrays(i, iArr, 0);
  57. }
  58. public static void glBindBufferBase(int i, int i2, int i3) {
  59. GLES30.glBindBufferBase(i, i2, i3);
  60. }
  61. public static boolean glUnmapBuffer(int i) {
  62. return GLES30.glUnmapBuffer(i);
  63. }
  64. public static void glDrawRangeElements(int i, int i2, int i3, int i4, int i5, Buffer buffer) {
  65. GLES30.glDrawRangeElements(i, i2, i3, i4, i5, buffer);
  66. }
  67. public static void glTexImage3D(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, Buffer buffer) {
  68. GLES30.glTexImage3D(i, i2, i3, i4, i5, i6, i7, i8, i9, buffer);
  69. }
  70. public static void glTexSubImage3D(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, Buffer buffer) {
  71. GLES30.glTexSubImage3D(i, i2, i3, i4, i5, i6, i7, i8, i9, i10, buffer);
  72. }
  73. public static void glCopyTexSubImage3D(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9) {
  74. GLES30.glCopyTexSubImage3D(i, i2, i3, i4, i5, i6, i7, i8, i9);
  75. }
  76. public static void glCompressedTexImage3D(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, Buffer buffer) {
  77. GLES30.glCompressedTexImage3D(i, i2, i3, i4, i5, i6, i7, i8, buffer);
  78. }
  79. public static void glCompressedTexSubImage3D(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, Buffer buffer) {
  80. GLES30.glCompressedTexSubImage3D(i, i2, i3, i4, i5, i6, i7, i8, i9, i10, buffer);
  81. }
  82. public static void glGenQueries(int i, IntBuffer intBuffer) {
  83. GLES30.glGenQueries(i, intBuffer);
  84. }
  85. public static void glDeleteQueries(int i, IntBuffer intBuffer) {
  86. GLES30.glDeleteQueries(i, intBuffer);
  87. }
  88. public static boolean glIsQuery(int i) {
  89. return GLES30.glIsQuery(i);
  90. }
  91. public static void glBeginQuery(int i, int i2) {
  92. GLES30.glBeginQuery(i, i2);
  93. }
  94. public static void glEndQuery(int i) {
  95. GLES30.glEndQuery(i);
  96. }
  97. public static void glGetQueryiv(int i, int i2, IntBuffer intBuffer) {
  98. GLES30.glGetQueryiv(i, i2, intBuffer);
  99. }
  100. public static void glGetQueryObjectuiv(int i, int i2, IntBuffer intBuffer) {
  101. GLES30.glGetQueryObjectuiv(i, i2, intBuffer);
  102. }
  103. public static void glGetBufferPointerv(int i, int i2, Buffer buffer) {
  104. GLES30.glGetBufferPointerv(i, i2);
  105. }
  106. public static void glBindBufferRange(int i, int i2, int i3, int i4, int i5) {
  107. GLES30.glBindBufferRange(i, i2, i3, i4, i5);
  108. }
  109. public static void glGetTransformFeedbackVarying(int i, int i2, int i3, int[] iArr, int[] iArr2, int[] iArr3, byte[] bArr) {
  110. GLES30.glGetTransformFeedbackVarying(i, i2, i3, iArr, 0, iArr2, 0, iArr3, 0, bArr, 0);
  111. }
  112. public static void glVertexAttribIPointer(int i, int i2, int i3, int i4, int i5) {
  113. GLES30.glVertexAttribIPointer(i, i2, i3, i4, i5);
  114. }
  115. public static void glGetVertexAttribIiv(int i, int i2, int[] iArr) {
  116. GLES30.glGetVertexAttribIiv(i, i2, iArr, 0);
  117. }
  118. public static void glGetVertexAttribIuiv(int i, int i2, int[] iArr) {
  119. GLES30.glGetVertexAttribIuiv(i, i2, iArr, 0);
  120. }
  121. public static void glVertexAttribI4i(int i, int i2, int i3, int i4, int i5) {
  122. GLES30.glVertexAttribI4i(i, i2, i3, i4, i5);
  123. }
  124. public static void glVertexAttribI4ui(int i, int i2, int i3, int i4, int i5) {
  125. GLES30.glVertexAttribI4ui(i, i2, i3, i4, i5);
  126. }
  127. public static void glVertexAttribI4iv(int i, int[] iArr) {
  128. GLES30.glVertexAttribI4iv(i, iArr, 0);
  129. }
  130. public static void glVertexAttribI4uiv(int i, int[] iArr) {
  131. GLES30.glVertexAttribI4uiv(i, iArr, 0);
  132. }
  133. public static void glGetUniformuiv(int i, int i2, int[] iArr) {
  134. GLES30.glGetUniformuiv(i, i2, iArr, 0);
  135. }
  136. public static int glGetFragDataLocation(int i, String str) {
  137. return GLES30.glGetFragDataLocation(i, str);
  138. }
  139. public static void glUniform1ui(int i, int i2) {
  140. GLES30.glUniform1ui(i, i2);
  141. }
  142. public static void glUniform2ui(int i, int i2, int i3) {
  143. GLES30.glUniform2ui(i, i2, i3);
  144. }
  145. public static void glUniformMatrix2x3fv(int i, int i2, boolean z, FloatBuffer floatBuffer) {
  146. GLES30.glUniformMatrix2x3fv(i, i2, z, floatBuffer);
  147. }
  148. public static void glUniform3ui(int i, int i2, int i3, int i4) {
  149. GLES30.glUniform3ui(i, i2, i3, i4);
  150. }
  151. public static void glUniformMatrix3x2fv(int i, int i2, boolean z, FloatBuffer floatBuffer) {
  152. GLES30.glUniformMatrix3x2fv(i, i2, z, floatBuffer);
  153. }
  154. public static void glUniformMatrix2x4fv(int i, int i2, boolean z, FloatBuffer floatBuffer) {
  155. GLES30.glUniformMatrix2x4fv(i, i2, z, floatBuffer);
  156. }
  157. public static void glUniform4ui(int i, int i2, int i3, int i4, int i5) {
  158. GLES30.glUniform4ui(i, i2, i3, i4, i5);
  159. }
  160. public static void glUniform1uiv(int i, int i2, int[] iArr) {
  161. GLES30.glUniform1uiv(i, i2, iArr, 0);
  162. }
  163. public static void glUniformMatrix4x2fv(int i, int i2, boolean z, FloatBuffer floatBuffer) {
  164. GLES30.glUniformMatrix4x2fv(i, i2, z, floatBuffer);
  165. }
  166. public static void glUniform2uiv(int i, int i2, int[] iArr) {
  167. GLES30.glUniform2uiv(i, i2, iArr, 0);
  168. }
  169. public static void glUniformMatrix3x4fv(int i, int i2, boolean z, FloatBuffer floatBuffer) {
  170. GLES30.glUniformMatrix3x4fv(i, i2, z, floatBuffer);
  171. }
  172. public static void glUniform3uiv(int i, int i2, int[] iArr) {
  173. GLES30.glUniform3uiv(i, i2, iArr, 0);
  174. }
  175. public static void glUniformMatrix4x3fv(int i, int i2, boolean z, FloatBuffer floatBuffer) {
  176. GLES30.glUniformMatrix4x3fv(i, i2, z, floatBuffer);
  177. }
  178. public static void glFramebufferTextureLayer(int i, int i2, int i3, int i4, int i5) {
  179. GLES30.glFramebufferTextureLayer(i, i2, i3, i4, i5);
  180. }
  181. public static void glFlushMappedBufferRange(int i, int i2, int i3) {
  182. GLES30.glFlushMappedBufferRange(i, i2, i3);
  183. }
  184. public static boolean glIsVertexArray(int i) {
  185. return GLES30.glIsVertexArray(i);
  186. }
  187. public static void glGetIntegerIndexv(int i, int i2, IntBuffer intBuffer) {
  188. GLES30.glGetIntegeri_v(i, i2, intBuffer);
  189. }
  190. public static void glSamplerParameteri(int i, int i2, int i3) {
  191. GLES30.glSamplerParameteri(i, i2, i3);
  192. }
  193. public static void glSamplerParameteriv(int i, int i2, int[] iArr) {
  194. GLES30.glSamplerParameteriv(i, i2, iArr, 0);
  195. }
  196. public static void glSamplerParameterf(int i, int i2, float f) {
  197. GLES30.glSamplerParameterf(i, i2, f);
  198. }
  199. public static void glSamplerParameterfv(int i, int i2, float[] fArr) {
  200. GLES30.glSamplerParameterfv(i, i2, fArr, 0);
  201. }
  202. public static void glGetSamplerParameteriv(int i, int i2, int[] iArr) {
  203. GLES30.glGetSamplerParameteriv(i, i2, iArr, 0);
  204. }
  205. public static void glGetSamplerParameterfv(int i, int i2, float[] fArr) {
  206. GLES30.glGetSamplerParameterfv(i, i2, fArr, 0);
  207. }
  208. public static void glVertexAttribDivisor(int i, int i2) {
  209. GLES30.glVertexAttribDivisor(i, i2);
  210. }
  211. public static void glBindTransformFeedback(int i, int i2) {
  212. GLES30.glBindTransformFeedback(i, i2);
  213. }
  214. public static void glDeleteTransformFeedbacks(int i, int[] iArr) {
  215. GLES30.glDeleteTransformFeedbacks(i, iArr, 0);
  216. }
  217. public static void glGenTransformFeedbacks(int i, int[] iArr) {
  218. GLES30.glGenTransformFeedbacks(i, iArr, 0);
  219. }
  220. public static boolean glIsTransformFeedback(int i) {
  221. return GLES30.glIsTransformFeedback(i);
  222. }
  223. public static void glPauseTransformFeedback() {
  224. GLES30.glPauseTransformFeedback();
  225. }
  226. public static void glResumeTransformFeedback() {
  227. GLES30.glResumeTransformFeedback();
  228. }
  229. public static void glGetProgramBinary(int i, int i2, int[] iArr, int[] iArr2, Buffer buffer) {
  230. GLES30.glGetProgramBinary(i, i2, iArr, 0, iArr2, 0, buffer);
  231. }
  232. public static void glProgramBinary(int i, int i2, Buffer buffer, int i3) {
  233. GLES30.glProgramBinary(i, i2, buffer, i3);
  234. }
  235. public static void glProgramParameteri(int i, int i2, int i3) {
  236. GLES30.glProgramParameteri(i, i2, i3);
  237. }
  238. public static void glInvalidateFramebuffer(int i, int i2, int[] iArr) {
  239. GLES30.glInvalidateFramebuffer(i, i2, iArr, 0);
  240. }
  241. public static void glInvalidateSubFramebuffer(int i, int i2, int[] iArr, int i3, int i4, int i5, int i6) {
  242. GLES30.glInvalidateSubFramebuffer(i, i2, iArr, 0, i3, i4, i5, i6);
  243. }
  244. public static void glTexStorage2D(int i, int i2, int i3, int i4, int i5) {
  245. GLES30.glTexStorage2D(i, i2, i3, i4, i5);
  246. }
  247. public static void glTexStorage3D(int i, int i2, int i3, int i4, int i5, int i6) {
  248. GLES30.glTexStorage3D(i, i2, i3, i4, i5, i6);
  249. }
  250. public static void glGetInternalformativ(int i, int i2, int i3, int i4, int[] iArr) {
  251. GLES30.glGetInternalformativ(i, i2, i3, i4, iArr, 0);
  252. }
  253. public static void glUniform4uiv(int i, int i2, int[] iArr) {
  254. GLES30.glUniform4uiv(i, i2, iArr, 0);
  255. }
  256. public static void glClearBufferiv(int i, int i2, int[] iArr) {
  257. GLES30.glClearBufferiv(i, i2, iArr, 0);
  258. }
  259. public static void glClearBufferuiv(int i, int i2, int[] iArr) {
  260. GLES30.glClearBufferuiv(i, i2, iArr, 0);
  261. }
  262. public static void glClearBufferfv(int i, int i2, float[] fArr) {
  263. GLES30.glClearBufferfv(i, i2, fArr, 0);
  264. }
  265. public static void glClearBufferfi(int i, int i2, float f, int i3) {
  266. GLES30.glClearBufferfi(i, i2, f, i3);
  267. }
  268. public static String glGetStringi(int i, int i2) {
  269. return GLES30.glGetStringi(i, i2);
  270. }
  271. public static void glCopyBufferSubData(int i, int i2, int i3, int i4, int i5) {
  272. GLES30.glCopyBufferSubData(i, i2, i3, i4, i5);
  273. }
  274. public static void glGetUniformIndices(int i, String[] strArr, int[] iArr) {
  275. GLES30.glGetUniformIndices(i, strArr, iArr, 0);
  276. }
  277. public static void glGetActiveUniformsiv(int i, int i2, int[] iArr, int i3, int[] iArr2) {
  278. GLES30.glGetActiveUniformsiv(i, i2, iArr, 0, i3, iArr2, 0);
  279. }
  280. public static int glGetUniformBlockIndex(int i, String str) {
  281. return GLES30.glGetUniformBlockIndex(i, str);
  282. }
  283. public static void glGetActiveUniformBlockiv(int i, int i2, int i3, int[] iArr) {
  284. GLES30.glGetActiveUniformBlockiv(i, i2, i3, iArr, 0);
  285. }
  286. public static void glGetActiveUniformBlockName(int i, int i2, int i3, int[] iArr, byte[] bArr) {
  287. GLES30.glGetActiveUniformBlockName(i, i2, i3, iArr, 0, bArr, 0);
  288. }
  289. public static void glUniformBlockBinding(int i, int i2, int i3) {
  290. GLES30.glUniformBlockBinding(i, i2, i3);
  291. }
  292. public static void glDrawArraysInstanced(int i, int i2, int i3, int i4) {
  293. GLES30.glDrawArraysInstanced(i, i2, i3, i4);
  294. }
  295. public static void glDrawElementsInstanced(int i, int i2, int i3, Buffer buffer, int i4) {
  296. GLES30.glDrawElementsInstanced(i, i2, i3, buffer, i4);
  297. }
  298. public static boolean glIsSync(long j) {
  299. return GLES30.glIsSync(j);
  300. }
  301. public static void glDeleteSync(long j) {
  302. GLES30.glDeleteSync(j);
  303. }
  304. public static int glClientWaitSync(long j, int i, long j2) {
  305. return GLES30.glClientWaitSync(j, i, j2);
  306. }
  307. public static void glGetInteger64v(int i, long[] jArr) {
  308. GLES30.glGetInteger64v(i, jArr, 0);
  309. }
  310. public static void glGetSynciv(long j, int i, int i2, int[] iArr, int[] iArr2) {
  311. GLES30.glGetSynciv(j, i, i2, iArr, 0, iArr2, 0);
  312. }
  313. public static void glGetInteger64iV(int i, int i2, long[] jArr) {
  314. GLES30.glGetInteger64i_v(i, i2, jArr, 0);
  315. }
  316. public static void glGetBufferParameteri64v(int i, int i2, long[] jArr) {
  317. GLES30.glGetBufferParameteri64v(i, i2, jArr, 0);
  318. }
  319. public static void glGenSamplers(int i, int[] iArr) {
  320. GLES30.glGenSamplers(i, iArr, 0);
  321. }
  322. public static void glDeleteSamplers(int i, int[] iArr) {
  323. GLES30.glDeleteSamplers(i, iArr, 0);
  324. }
  325. public static boolean glIsSampler(int i) {
  326. return GLES30.glIsSampler(i);
  327. }
  328. public static void glBindSampler(int i, int i2) {
  329. GLES30.glBindSampler(i, i2);
  330. }
  331. }