Home | History | Annotate | Download | only in profiling
      1 /*******************************************************************************
      2  * Copyright 2015 See AUTHORS file.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *   http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  ******************************************************************************/
     16 
     17 package com.badlogic.gdx.graphics.profiling;
     18 
     19 import java.nio.Buffer;
     20 import java.nio.FloatBuffer;
     21 import java.nio.IntBuffer;
     22 import java.nio.LongBuffer;
     23 
     24 import com.badlogic.gdx.graphics.GL20;
     25 import com.badlogic.gdx.graphics.GL30;
     26 
     27 /** @author Daniel Holderbaum
     28  * @author Jan Polk */
     29 public class GL30Profiler extends GLProfiler implements GL30 {
     30 
     31 	public final GL30 gl30;
     32 
     33 	protected GL30Profiler (GL30 gl30) {
     34 		this.gl30 = gl30;
     35 	}
     36 
     37 	private void check () {
     38 		int error = gl30.glGetError();
     39 		while (error != GL20.GL_NO_ERROR) {
     40 			listener.onError(error);
     41 			error = gl30.glGetError();
     42 		}
     43 	}
     44 
     45 	@Override
     46 	public void glActiveTexture (int texture) {
     47 		calls++;
     48 		gl30.glActiveTexture(texture);
     49 		check();
     50 	}
     51 
     52 	@Override
     53 	public void glBindTexture (int target, int texture) {
     54 		textureBindings++;
     55 		calls++;
     56 		gl30.glBindTexture(target, texture);
     57 		check();
     58 	}
     59 
     60 	@Override
     61 	public void glBlendFunc (int sfactor, int dfactor) {
     62 		calls++;
     63 		gl30.glBlendFunc(sfactor, dfactor);
     64 		check();
     65 	}
     66 
     67 	@Override
     68 	public void glClear (int mask) {
     69 		calls++;
     70 		gl30.glClear(mask);
     71 		check();
     72 	}
     73 
     74 	@Override
     75 	public void glClearColor (float red, float green, float blue, float alpha) {
     76 		calls++;
     77 		gl30.glClearColor(red, green, blue, alpha);
     78 		check();
     79 	}
     80 
     81 	@Override
     82 	public void glClearDepthf (float depth) {
     83 		calls++;
     84 		gl30.glClearDepthf(depth);
     85 		check();
     86 	}
     87 
     88 	@Override
     89 	public void glClearStencil (int s) {
     90 		calls++;
     91 		gl30.glClearStencil(s);
     92 		check();
     93 	}
     94 
     95 	@Override
     96 	public void glColorMask (boolean red, boolean green, boolean blue, boolean alpha) {
     97 		calls++;
     98 		gl30.glColorMask(red, green, blue, alpha);
     99 		check();
    100 	}
    101 
    102 	@Override
    103 	public void glCompressedTexImage2D (int target, int level, int internalformat, int width, int height, int border,
    104 		int imageSize, Buffer data) {
    105 		calls++;
    106 		gl30.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
    107 		check();
    108 	}
    109 
    110 	@Override
    111 	public void glCompressedTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format,
    112 		int imageSize, Buffer data) {
    113 		calls++;
    114 		gl30.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
    115 		check();
    116 	}
    117 
    118 	@Override
    119 	public void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) {
    120 		calls++;
    121 		gl30.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
    122 		check();
    123 	}
    124 
    125 	@Override
    126 	public void glCopyTexSubImage2D (int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) {
    127 		calls++;
    128 		gl30.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
    129 		check();
    130 	}
    131 
    132 	@Override
    133 	public void glCullFace (int mode) {
    134 		calls++;
    135 		gl30.glCullFace(mode);
    136 		check();
    137 	}
    138 
    139 	@Override
    140 	public void glDeleteTextures (int n, IntBuffer textures) {
    141 		calls++;
    142 		gl30.glDeleteTextures(n, textures);
    143 		check();
    144 	}
    145 
    146 	@Override
    147 	public void glDeleteTexture (int texture) {
    148 		calls++;
    149 		gl30.glDeleteTexture(texture);
    150 		check();
    151 	}
    152 
    153 	@Override
    154 	public void glDepthFunc (int func) {
    155 		calls++;
    156 		gl30.glDepthFunc(func);
    157 		check();
    158 	}
    159 
    160 	@Override
    161 	public void glDepthMask (boolean flag) {
    162 		calls++;
    163 		gl30.glDepthMask(flag);
    164 		check();
    165 	}
    166 
    167 	@Override
    168 	public void glDepthRangef (float zNear, float zFar) {
    169 		calls++;
    170 		gl30.glDepthRangef(zNear, zFar);
    171 		check();
    172 	}
    173 
    174 	@Override
    175 	public void glDisable (int cap) {
    176 		calls++;
    177 		gl30.glDisable(cap);
    178 		check();
    179 	}
    180 
    181 	@Override
    182 	public void glDrawArrays (int mode, int first, int count) {
    183 		vertexCount.put(count);
    184 		drawCalls++;
    185 		calls++;
    186 		gl30.glDrawArrays(mode, first, count);
    187 		check();
    188 	}
    189 
    190 	@Override
    191 	public void glDrawElements (int mode, int count, int type, Buffer indices) {
    192 		vertexCount.put(count);
    193 		drawCalls++;
    194 		calls++;
    195 		gl30.glDrawElements(mode, count, type, indices);
    196 		check();
    197 	}
    198 
    199 	@Override
    200 	public void glEnable (int cap) {
    201 		calls++;
    202 		gl30.glEnable(cap);
    203 		check();
    204 	}
    205 
    206 	@Override
    207 	public void glFinish () {
    208 		calls++;
    209 		gl30.glFinish();
    210 		check();
    211 	}
    212 
    213 	@Override
    214 	public void glFlush () {
    215 		calls++;
    216 		gl30.glFlush();
    217 		check();
    218 	}
    219 
    220 	@Override
    221 	public void glFrontFace (int mode) {
    222 		calls++;
    223 		gl30.glFrontFace(mode);
    224 		check();
    225 	}
    226 
    227 	@Override
    228 	public void glGenTextures (int n, IntBuffer textures) {
    229 		calls++;
    230 		gl30.glGenTextures(n, textures);
    231 		check();
    232 	}
    233 
    234 	@Override
    235 	public int glGenTexture () {
    236 		calls++;
    237 		int result = gl30.glGenTexture();
    238 		check();
    239 		return result;
    240 	}
    241 
    242 	@Override
    243 	public int glGetError () {
    244 		calls++;
    245 		//Errors by glGetError are undetectable
    246 		return gl30.glGetError();
    247 	}
    248 
    249 	@Override
    250 	public void glGetIntegerv (int pname, IntBuffer params) {
    251 		calls++;
    252 		gl30.glGetIntegerv(pname, params);
    253 		check();
    254 	}
    255 
    256 	@Override
    257 	public String glGetString (int name) {
    258 		calls++;
    259 		String result = gl30.glGetString(name);
    260 		check();
    261 		return result;
    262 	}
    263 
    264 	@Override
    265 	public void glHint (int target, int mode) {
    266 		calls++;
    267 		gl30.glHint(target, mode);
    268 		check();
    269 	}
    270 
    271 	@Override
    272 	public void glLineWidth (float width) {
    273 		calls++;
    274 		gl30.glLineWidth(width);
    275 		check();
    276 	}
    277 
    278 	@Override
    279 	public void glPixelStorei (int pname, int param) {
    280 		calls++;
    281 		gl30.glPixelStorei(pname, param);
    282 		check();
    283 	}
    284 
    285 	@Override
    286 	public void glPolygonOffset (float factor, float units) {
    287 		calls++;
    288 		gl30.glPolygonOffset(factor, units);
    289 		check();
    290 	}
    291 
    292 	@Override
    293 	public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) {
    294 		calls++;
    295 		gl30.glReadPixels(x, y, width, height, format, type, pixels);
    296 		check();
    297 	}
    298 
    299 	@Override
    300 	public void glScissor (int x, int y, int width, int height) {
    301 		calls++;
    302 		gl30.glScissor(x, y, width, height);
    303 		check();
    304 	}
    305 
    306 	@Override
    307 	public void glStencilFunc (int func, int ref, int mask) {
    308 		calls++;
    309 		gl30.glStencilFunc(func, ref, mask);
    310 		check();
    311 	}
    312 
    313 	@Override
    314 	public void glStencilMask (int mask) {
    315 		calls++;
    316 		gl30.glStencilMask(mask);
    317 		check();
    318 	}
    319 
    320 	@Override
    321 	public void glStencilOp (int fail, int zfail, int zpass) {
    322 		calls++;
    323 		gl30.glStencilOp(fail, zfail, zpass);
    324 		check();
    325 	}
    326 
    327 	@Override
    328 	public void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type,
    329 		Buffer pixels) {
    330 		calls++;
    331 		gl30.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
    332 		check();
    333 	}
    334 
    335 	@Override
    336 	public void glTexParameterf (int target, int pname, float param) {
    337 		calls++;
    338 		gl30.glTexParameterf(target, pname, param);
    339 		check();
    340 	}
    341 
    342 	@Override
    343 	public void glTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format, int type,
    344 		Buffer pixels) {
    345 		calls++;
    346 		gl30.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
    347 		check();
    348 	}
    349 
    350 	@Override
    351 	public void glViewport (int x, int y, int width, int height) {
    352 		calls++;
    353 		gl30.glViewport(x, y, width, height);
    354 		check();
    355 	}
    356 
    357 	@Override
    358 	public void glAttachShader (int program, int shader) {
    359 		calls++;
    360 		gl30.glAttachShader(program, shader);
    361 		check();
    362 	}
    363 
    364 	@Override
    365 	public void glBindAttribLocation (int program, int index, String name) {
    366 		calls++;
    367 		gl30.glBindAttribLocation(program, index, name);
    368 		check();
    369 	}
    370 
    371 	@Override
    372 	public void glBindBuffer (int target, int buffer) {
    373 		calls++;
    374 		gl30.glBindBuffer(target, buffer);
    375 		check();
    376 	}
    377 
    378 	@Override
    379 	public void glBindFramebuffer (int target, int framebuffer) {
    380 		calls++;
    381 		gl30.glBindFramebuffer(target, framebuffer);
    382 		check();
    383 	}
    384 
    385 	@Override
    386 	public void glBindRenderbuffer (int target, int renderbuffer) {
    387 		calls++;
    388 		gl30.glBindRenderbuffer(target, renderbuffer);
    389 		check();
    390 	}
    391 
    392 	@Override
    393 	public void glBlendColor (float red, float green, float blue, float alpha) {
    394 		calls++;
    395 		gl30.glBlendColor(red, green, blue, alpha);
    396 		check();
    397 	}
    398 
    399 	@Override
    400 	public void glBlendEquation (int mode) {
    401 		calls++;
    402 		gl30.glBlendEquation(mode);
    403 		check();
    404 	}
    405 
    406 	@Override
    407 	public void glBlendEquationSeparate (int modeRGB, int modeAlpha) {
    408 		calls++;
    409 		gl30.glBlendEquationSeparate(modeRGB, modeAlpha);
    410 		check();
    411 	}
    412 
    413 	@Override
    414 	public void glBlendFuncSeparate (int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) {
    415 		calls++;
    416 		gl30.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
    417 		check();
    418 	}
    419 
    420 	@Override
    421 	public void glBufferData (int target, int size, Buffer data, int usage) {
    422 		calls++;
    423 		gl30.glBufferData(target, size, data, usage);
    424 		check();
    425 	}
    426 
    427 	@Override
    428 	public void glBufferSubData (int target, int offset, int size, Buffer data) {
    429 		calls++;
    430 		gl30.glBufferSubData(target, offset, size, data);
    431 		check();
    432 	}
    433 
    434 	@Override
    435 	public int glCheckFramebufferStatus (int target) {
    436 		calls++;
    437 		int result = gl30.glCheckFramebufferStatus(target);
    438 		check();
    439 		return result;
    440 	}
    441 
    442 	@Override
    443 	public void glCompileShader (int shader) {
    444 		calls++;
    445 		gl30.glCompileShader(shader);
    446 		check();
    447 	}
    448 
    449 	@Override
    450 	public int glCreateProgram () {
    451 		calls++;
    452 		int result = gl30.glCreateProgram();
    453 		check();
    454 		return result;
    455 	}
    456 
    457 	@Override
    458 	public int glCreateShader (int type) {
    459 		calls++;
    460 		int result = gl30.glCreateShader(type);
    461 		check();
    462 		return result;
    463 	}
    464 
    465 	@Override
    466 	public void glDeleteBuffer (int buffer) {
    467 		calls++;
    468 		gl30.glDeleteBuffer(buffer);
    469 		check();
    470 	}
    471 
    472 	@Override
    473 	public void glDeleteBuffers (int n, IntBuffer buffers) {
    474 		calls++;
    475 		gl30.glDeleteBuffers(n, buffers);
    476 		check();
    477 	}
    478 
    479 	@Override
    480 	public void glDeleteFramebuffer (int framebuffer) {
    481 		calls++;
    482 		gl30.glDeleteFramebuffer(framebuffer);
    483 		check();
    484 	}
    485 
    486 	@Override
    487 	public void glDeleteFramebuffers (int n, IntBuffer framebuffers) {
    488 		calls++;
    489 		gl30.glDeleteFramebuffers(n, framebuffers);
    490 		check();
    491 	}
    492 
    493 	@Override
    494 	public void glDeleteProgram (int program) {
    495 		calls++;
    496 		gl30.glDeleteProgram(program);
    497 		check();
    498 	}
    499 
    500 	@Override
    501 	public void glDeleteRenderbuffer (int renderbuffer) {
    502 		calls++;
    503 		gl30.glDeleteRenderbuffer(renderbuffer);
    504 		check();
    505 	}
    506 
    507 	@Override
    508 	public void glDeleteRenderbuffers (int n, IntBuffer renderbuffers) {
    509 		calls++;
    510 		gl30.glDeleteRenderbuffers(n, renderbuffers);
    511 		check();
    512 	}
    513 
    514 	@Override
    515 	public void glDeleteShader (int shader) {
    516 		calls++;
    517 		gl30.glDeleteShader(shader);
    518 		check();
    519 	}
    520 
    521 	@Override
    522 	public void glDetachShader (int program, int shader) {
    523 		calls++;
    524 		gl30.glDetachShader(program, shader);
    525 		check();
    526 	}
    527 
    528 	@Override
    529 	public void glDisableVertexAttribArray (int index) {
    530 		calls++;
    531 		gl30.glDisableVertexAttribArray(index);
    532 		check();
    533 	}
    534 
    535 	@Override
    536 	public void glDrawElements (int mode, int count, int type, int indices) {
    537 		vertexCount.put(count);
    538 		drawCalls++;
    539 		calls++;
    540 		gl30.glDrawElements(mode, count, type, indices);
    541 		check();
    542 	}
    543 
    544 	@Override
    545 	public void glEnableVertexAttribArray (int index) {
    546 		calls++;
    547 		gl30.glEnableVertexAttribArray(index);
    548 		check();
    549 	}
    550 
    551 	@Override
    552 	public void glFramebufferRenderbuffer (int target, int attachment, int renderbuffertarget, int renderbuffer) {
    553 		calls++;
    554 		gl30.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
    555 		check();
    556 	}
    557 
    558 	@Override
    559 	public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) {
    560 		calls++;
    561 		gl30.glFramebufferTexture2D(target, attachment, textarget, texture, level);
    562 		check();
    563 	}
    564 
    565 	@Override
    566 	public int glGenBuffer () {
    567 		calls++;
    568 		int result = gl30.glGenBuffer();
    569 		check();
    570 		return result;
    571 	}
    572 
    573 	@Override
    574 	public void glGenBuffers (int n, IntBuffer buffers) {
    575 		calls++;
    576 		gl30.glGenBuffers(n, buffers);
    577 		check();
    578 	}
    579 
    580 	@Override
    581 	public void glGenerateMipmap (int target) {
    582 		calls++;
    583 		gl30.glGenerateMipmap(target);
    584 		check();
    585 	}
    586 
    587 	@Override
    588 	public int glGenFramebuffer () {
    589 		calls++;
    590 		int result = gl30.glGenFramebuffer();
    591 		check();
    592 		return result;
    593 	}
    594 
    595 	@Override
    596 	public void glGenFramebuffers (int n, IntBuffer framebuffers) {
    597 		calls++;
    598 		gl30.glGenFramebuffers(n, framebuffers);
    599 		check();
    600 	}
    601 
    602 	@Override
    603 	public int glGenRenderbuffer () {
    604 		calls++;
    605 		int result = gl30.glGenRenderbuffer();
    606 		check();
    607 		return result;
    608 	}
    609 
    610 	@Override
    611 	public void glGenRenderbuffers (int n, IntBuffer renderbuffers) {
    612 		calls++;
    613 		gl30.glGenRenderbuffers(n, renderbuffers);
    614 		check();
    615 	}
    616 
    617 	@Override
    618 	public String glGetActiveAttrib (int program, int index, IntBuffer size, Buffer type) {
    619 		calls++;
    620 		String result = gl30.glGetActiveAttrib(program, index, size, type);
    621 		check();
    622 		return result;
    623 	}
    624 
    625 	@Override
    626 	public String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type) {
    627 		calls++;
    628 		String result = gl30.glGetActiveUniform(program, index, size, type);
    629 		check();
    630 		return result;
    631 	}
    632 
    633 	@Override
    634 	public void glGetAttachedShaders (int program, int maxcount, Buffer count, IntBuffer shaders) {
    635 		calls++;
    636 		gl30.glGetAttachedShaders(program, maxcount, count, shaders);
    637 		check();
    638 	}
    639 
    640 	@Override
    641 	public int glGetAttribLocation (int program, String name) {
    642 		calls++;
    643 		int result = gl30.glGetAttribLocation(program, name);
    644 		check();
    645 		return result;
    646 	}
    647 
    648 	@Override
    649 	public void glGetBooleanv (int pname, Buffer params) {
    650 		calls++;
    651 		gl30.glGetBooleanv(pname, params);
    652 		check();
    653 	}
    654 
    655 	@Override
    656 	public void glGetBufferParameteriv (int target, int pname, IntBuffer params) {
    657 		calls++;
    658 		gl30.glGetBufferParameteriv(target, pname, params);
    659 		check();
    660 	}
    661 
    662 	@Override
    663 	public void glGetFloatv (int pname, FloatBuffer params) {
    664 		calls++;
    665 		gl30.glGetFloatv(pname, params);
    666 		check();
    667 	}
    668 
    669 	@Override
    670 	public void glGetFramebufferAttachmentParameteriv (int target, int attachment, int pname, IntBuffer params) {
    671 		calls++;
    672 		gl30.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
    673 		check();
    674 	}
    675 
    676 	@Override
    677 	public void glGetProgramiv (int program, int pname, IntBuffer params) {
    678 		calls++;
    679 		gl30.glGetProgramiv(program, pname, params);
    680 		check();
    681 	}
    682 
    683 	@Override
    684 	public String glGetProgramInfoLog (int program) {
    685 		calls++;
    686 		String result = gl30.glGetProgramInfoLog(program);
    687 		check();
    688 		return result;
    689 	}
    690 
    691 	@Override
    692 	public void glGetRenderbufferParameteriv (int target, int pname, IntBuffer params) {
    693 		calls++;
    694 		gl30.glGetRenderbufferParameteriv(target, pname, params);
    695 		check();
    696 	}
    697 
    698 	@Override
    699 	public void glGetShaderiv (int shader, int pname, IntBuffer params) {
    700 		calls++;
    701 		gl30.glGetShaderiv(shader, pname, params);
    702 		check();
    703 	}
    704 
    705 	@Override
    706 	public String glGetShaderInfoLog (int shader) {
    707 		calls++;
    708 		String result = gl30.glGetShaderInfoLog(shader);
    709 		check();
    710 		return result;
    711 	}
    712 
    713 	@Override
    714 	public void glGetShaderPrecisionFormat (int shadertype, int precisiontype, IntBuffer range, IntBuffer precision) {
    715 		calls++;
    716 		gl30.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
    717 		check();
    718 	}
    719 
    720 	@Override
    721 	public void glGetTexParameterfv (int target, int pname, FloatBuffer params) {
    722 		calls++;
    723 		gl30.glGetTexParameterfv(target, pname, params);
    724 		check();
    725 	}
    726 
    727 	@Override
    728 	public void glGetTexParameteriv (int target, int pname, IntBuffer params) {
    729 		calls++;
    730 		gl30.glGetTexParameteriv(target, pname, params);
    731 		check();
    732 	}
    733 
    734 	@Override
    735 	public void glGetUniformfv (int program, int location, FloatBuffer params) {
    736 		calls++;
    737 		gl30.glGetUniformfv(program, location, params);
    738 		check();
    739 	}
    740 
    741 	@Override
    742 	public void glGetUniformiv (int program, int location, IntBuffer params) {
    743 		calls++;
    744 		gl30.glGetUniformiv(program, location, params);
    745 		check();
    746 	}
    747 
    748 	@Override
    749 	public int glGetUniformLocation (int program, String name) {
    750 		calls++;
    751 		int result = gl30.glGetUniformLocation(program, name);
    752 		check();
    753 		return result;
    754 	}
    755 
    756 	@Override
    757 	public void glGetVertexAttribfv (int index, int pname, FloatBuffer params) {
    758 		calls++;
    759 		gl30.glGetVertexAttribfv(index, pname, params);
    760 		check();
    761 	}
    762 
    763 	@Override
    764 	public void glGetVertexAttribiv (int index, int pname, IntBuffer params) {
    765 		calls++;
    766 		gl30.glGetVertexAttribiv(index, pname, params);
    767 		check();
    768 	}
    769 
    770 	@Override
    771 	public void glGetVertexAttribPointerv (int index, int pname, Buffer pointer) {
    772 		calls++;
    773 		gl30.glGetVertexAttribPointerv(index, pname, pointer);
    774 		check();
    775 	}
    776 
    777 	@Override
    778 	public boolean glIsBuffer (int buffer) {
    779 		calls++;
    780 		boolean result = gl30.glIsBuffer(buffer);
    781 		check();
    782 		return result;
    783 	}
    784 
    785 	@Override
    786 	public boolean glIsEnabled (int cap) {
    787 		calls++;
    788 		boolean result = gl30.glIsEnabled(cap);
    789 		check();
    790 		return result;
    791 	}
    792 
    793 	@Override
    794 	public boolean glIsFramebuffer (int framebuffer) {
    795 		calls++;
    796 		boolean result = gl30.glIsFramebuffer(framebuffer);
    797 		check();
    798 		return result;
    799 	}
    800 
    801 	@Override
    802 	public boolean glIsProgram (int program) {
    803 		calls++;
    804 		boolean result = gl30.glIsProgram(program);
    805 		check();
    806 		return result;
    807 	}
    808 
    809 	@Override
    810 	public boolean glIsRenderbuffer (int renderbuffer) {
    811 		calls++;
    812 		boolean result = gl30.glIsRenderbuffer(renderbuffer);
    813 		check();
    814 		return result;
    815 	}
    816 
    817 	@Override
    818 	public boolean glIsShader (int shader) {
    819 		calls++;
    820 		boolean result = gl30.glIsShader(shader);
    821 		check();
    822 		return result;
    823 	}
    824 
    825 	@Override
    826 	public boolean glIsTexture (int texture) {
    827 		calls++;
    828 		boolean result = gl30.glIsTexture(texture);
    829 		check();
    830 		return result;
    831 	}
    832 
    833 	@Override
    834 	public void glLinkProgram (int program) {
    835 		calls++;
    836 		gl30.glLinkProgram(program);
    837 		check();
    838 	}
    839 
    840 	@Override
    841 	public void glReleaseShaderCompiler () {
    842 		calls++;
    843 		gl30.glReleaseShaderCompiler();
    844 		check();
    845 	}
    846 
    847 	@Override
    848 	public void glRenderbufferStorage (int target, int internalformat, int width, int height) {
    849 		calls++;
    850 		gl30.glRenderbufferStorage(target, internalformat, width, height);
    851 		check();
    852 	}
    853 
    854 	@Override
    855 	public void glSampleCoverage (float value, boolean invert) {
    856 		calls++;
    857 		gl30.glSampleCoverage(value, invert);
    858 		check();
    859 	}
    860 
    861 	@Override
    862 	public void glShaderBinary (int n, IntBuffer shaders, int binaryformat, Buffer binary, int length) {
    863 		calls++;
    864 		gl30.glShaderBinary(n, shaders, binaryformat, binary, length);
    865 		check();
    866 	}
    867 
    868 	@Override
    869 	public void glShaderSource (int shader, String string) {
    870 		calls++;
    871 		gl30.glShaderSource(shader, string);
    872 		check();
    873 	}
    874 
    875 	@Override
    876 	public void glStencilFuncSeparate (int face, int func, int ref, int mask) {
    877 		calls++;
    878 		gl30.glStencilFuncSeparate(face, func, ref, mask);
    879 		check();
    880 	}
    881 
    882 	@Override
    883 	public void glStencilMaskSeparate (int face, int mask) {
    884 		calls++;
    885 		gl30.glStencilMaskSeparate(face, mask);
    886 		check();
    887 	}
    888 
    889 	@Override
    890 	public void glStencilOpSeparate (int face, int fail, int zfail, int zpass) {
    891 		calls++;
    892 		gl30.glStencilOpSeparate(face, fail, zfail, zpass);
    893 		check();
    894 	}
    895 
    896 	@Override
    897 	public void glTexParameterfv (int target, int pname, FloatBuffer params) {
    898 		calls++;
    899 		gl30.glTexParameterfv(target, pname, params);
    900 		check();
    901 	}
    902 
    903 	@Override
    904 	public void glTexParameteri (int target, int pname, int param) {
    905 		calls++;
    906 		gl30.glTexParameteri(target, pname, param);
    907 		check();
    908 	}
    909 
    910 	@Override
    911 	public void glTexParameteriv (int target, int pname, IntBuffer params) {
    912 		calls++;
    913 		gl30.glTexParameteriv(target, pname, params);
    914 		check();
    915 	}
    916 
    917 	@Override
    918 	public void glUniform1f (int location, float x) {
    919 		calls++;
    920 		gl30.glUniform1f(location, x);
    921 		check();
    922 	}
    923 
    924 	@Override
    925 	public void glUniform1fv (int location, int count, FloatBuffer v) {
    926 		calls++;
    927 		gl30.glUniform1fv(location, count, v);
    928 		check();
    929 	}
    930 
    931 	@Override
    932 	public void glUniform1fv (int location, int count, float[] v, int offset) {
    933 		calls++;
    934 		gl30.glUniform1fv(location, count, v, offset);
    935 		check();
    936 	}
    937 
    938 	@Override
    939 	public void glUniform1i (int location, int x) {
    940 		calls++;
    941 		gl30.glUniform1i(location, x);
    942 		check();
    943 	}
    944 
    945 	@Override
    946 	public void glUniform1iv (int location, int count, IntBuffer v) {
    947 		calls++;
    948 		gl30.glUniform1iv(location, count, v);
    949 		check();
    950 	}
    951 
    952 	@Override
    953 	public void glUniform1iv (int location, int count, int[] v, int offset) {
    954 		calls++;
    955 		gl30.glUniform1iv(location, count, v, offset);
    956 		check();
    957 	}
    958 
    959 	@Override
    960 	public void glUniform2f (int location, float x, float y) {
    961 		calls++;
    962 		gl30.glUniform2f(location, x, y);
    963 		check();
    964 	}
    965 
    966 	@Override
    967 	public void glUniform2fv (int location, int count, FloatBuffer v) {
    968 		calls++;
    969 		gl30.glUniform2fv(location, count, v);
    970 		check();
    971 	}
    972 
    973 	@Override
    974 	public void glUniform2fv (int location, int count, float[] v, int offset) {
    975 		calls++;
    976 		gl30.glUniform2fv(location, count, v, offset);
    977 		check();
    978 	}
    979 
    980 	@Override
    981 	public void glUniform2i (int location, int x, int y) {
    982 		calls++;
    983 		gl30.glUniform2i(location, x, y);
    984 		check();
    985 	}
    986 
    987 	@Override
    988 	public void glUniform2iv (int location, int count, IntBuffer v) {
    989 		calls++;
    990 		gl30.glUniform2iv(location, count, v);
    991 		check();
    992 	}
    993 
    994 	@Override
    995 	public void glUniform2iv (int location, int count, int[] v, int offset) {
    996 		calls++;
    997 		gl30.glUniform2iv(location, count, v, offset);
    998 		check();
    999 	}
   1000 
   1001 	@Override
   1002 	public void glUniform3f (int location, float x, float y, float z) {
   1003 		calls++;
   1004 		gl30.glUniform3f(location, x, y, z);
   1005 		check();
   1006 	}
   1007 
   1008 	@Override
   1009 	public void glUniform3fv (int location, int count, FloatBuffer v) {
   1010 		calls++;
   1011 		gl30.glUniform3fv(location, count, v);
   1012 		check();
   1013 	}
   1014 
   1015 	@Override
   1016 	public void glUniform3fv (int location, int count, float[] v, int offset) {
   1017 		calls++;
   1018 		gl30.glUniform3fv(location, count, v, offset);
   1019 		check();
   1020 	}
   1021 
   1022 	@Override
   1023 	public void glUniform3i (int location, int x, int y, int z) {
   1024 		calls++;
   1025 		gl30.glUniform3i(location, x, y, z);
   1026 		check();
   1027 	}
   1028 
   1029 	@Override
   1030 	public void glUniform3iv (int location, int count, IntBuffer v) {
   1031 		calls++;
   1032 		gl30.glUniform3iv(location, count, v);
   1033 		check();
   1034 	}
   1035 
   1036 	@Override
   1037 	public void glUniform3iv (int location, int count, int[] v, int offset) {
   1038 		calls++;
   1039 		gl30.glUniform3iv(location, count, v, offset);
   1040 		check();
   1041 	}
   1042 
   1043 	@Override
   1044 	public void glUniform4f (int location, float x, float y, float z, float w) {
   1045 		calls++;
   1046 		gl30.glUniform4f(location, x, y, z, w);
   1047 		check();
   1048 	}
   1049 
   1050 	@Override
   1051 	public void glUniform4fv (int location, int count, FloatBuffer v) {
   1052 		calls++;
   1053 		gl30.glUniform4fv(location, count, v);
   1054 		check();
   1055 	}
   1056 
   1057 	@Override
   1058 	public void glUniform4fv (int location, int count, float[] v, int offset) {
   1059 		calls++;
   1060 		gl30.glUniform4fv(location, count, v, offset);
   1061 		check();
   1062 	}
   1063 
   1064 	@Override
   1065 	public void glUniform4i (int location, int x, int y, int z, int w) {
   1066 		calls++;
   1067 		gl30.glUniform4i(location, x, y, z, w);
   1068 		check();
   1069 	}
   1070 
   1071 	@Override
   1072 	public void glUniform4iv (int location, int count, IntBuffer v) {
   1073 		calls++;
   1074 		gl30.glUniform4iv(location, count, v);
   1075 		check();
   1076 	}
   1077 
   1078 	@Override
   1079 	public void glUniform4iv (int location, int count, int[] v, int offset) {
   1080 		calls++;
   1081 		gl30.glUniform4iv(location, count, v, offset);
   1082 		check();
   1083 	}
   1084 
   1085 	@Override
   1086 	public void glUniformMatrix2fv (int location, int count, boolean transpose, FloatBuffer value) {
   1087 		calls++;
   1088 		gl30.glUniformMatrix2fv(location, count, transpose, value);
   1089 		check();
   1090 	}
   1091 
   1092 	@Override
   1093 	public void glUniformMatrix2fv (int location, int count, boolean transpose, float[] value, int offset) {
   1094 		calls++;
   1095 		gl30.glUniformMatrix2fv(location, count, transpose, value, offset);
   1096 		check();
   1097 	}
   1098 
   1099 	@Override
   1100 	public void glUniformMatrix3fv (int location, int count, boolean transpose, FloatBuffer value) {
   1101 		calls++;
   1102 		gl30.glUniformMatrix3fv(location, count, transpose, value);
   1103 		check();
   1104 	}
   1105 
   1106 	@Override
   1107 	public void glUniformMatrix3fv (int location, int count, boolean transpose, float[] value, int offset) {
   1108 		calls++;
   1109 		gl30.glUniformMatrix3fv(location, count, transpose, value, offset);
   1110 		check();
   1111 	}
   1112 
   1113 	@Override
   1114 	public void glUniformMatrix4fv (int location, int count, boolean transpose, FloatBuffer value) {
   1115 		calls++;
   1116 		gl30.glUniformMatrix4fv(location, count, transpose, value);
   1117 		check();
   1118 	}
   1119 
   1120 	@Override
   1121 	public void glUniformMatrix4fv (int location, int count, boolean transpose, float[] value, int offset) {
   1122 		calls++;
   1123 		gl30.glUniformMatrix4fv(location, count, transpose, value, offset);
   1124 		check();
   1125 	}
   1126 
   1127 	@Override
   1128 	public void glUseProgram (int program) {
   1129 		shaderSwitches++;
   1130 		calls++;
   1131 		gl30.glUseProgram(program);
   1132 		check();
   1133 	}
   1134 
   1135 	@Override
   1136 	public void glValidateProgram (int program) {
   1137 		calls++;
   1138 		gl30.glValidateProgram(program);
   1139 		check();
   1140 	}
   1141 
   1142 	@Override
   1143 	public void glVertexAttrib1f (int indx, float x) {
   1144 		calls++;
   1145 		gl30.glVertexAttrib1f(indx, x);
   1146 		check();
   1147 	}
   1148 
   1149 	@Override
   1150 	public void glVertexAttrib1fv (int indx, FloatBuffer values) {
   1151 		calls++;
   1152 		gl30.glVertexAttrib1fv(indx, values);
   1153 		check();
   1154 	}
   1155 
   1156 	@Override
   1157 	public void glVertexAttrib2f (int indx, float x, float y) {
   1158 		calls++;
   1159 		gl30.glVertexAttrib2f(indx, x, y);
   1160 		check();
   1161 	}
   1162 
   1163 	@Override
   1164 	public void glVertexAttrib2fv (int indx, FloatBuffer values) {
   1165 		calls++;
   1166 		gl30.glVertexAttrib2fv(indx, values);
   1167 		check();
   1168 	}
   1169 
   1170 	@Override
   1171 	public void glVertexAttrib3f (int indx, float x, float y, float z) {
   1172 		calls++;
   1173 		gl30.glVertexAttrib3f(indx, x, y, z);
   1174 		check();
   1175 	}
   1176 
   1177 	@Override
   1178 	public void glVertexAttrib3fv (int indx, FloatBuffer values) {
   1179 		calls++;
   1180 		gl30.glVertexAttrib3fv(indx, values);
   1181 		check();
   1182 	}
   1183 
   1184 	@Override
   1185 	public void glVertexAttrib4f (int indx, float x, float y, float z, float w) {
   1186 		calls++;
   1187 		gl30.glVertexAttrib4f(indx, x, y, z, w);
   1188 		check();
   1189 	}
   1190 
   1191 	@Override
   1192 	public void glVertexAttrib4fv (int indx, FloatBuffer values) {
   1193 		calls++;
   1194 		gl30.glVertexAttrib4fv(indx, values);
   1195 		check();
   1196 	}
   1197 
   1198 	@Override
   1199 	public void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, Buffer ptr) {
   1200 		calls++;
   1201 		gl30.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
   1202 		check();
   1203 	}
   1204 
   1205 	@Override
   1206 	public void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, int ptr) {
   1207 		calls++;
   1208 		gl30.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
   1209 		check();
   1210 	}
   1211 
   1212 	// GL30 Unique
   1213 
   1214 	@Override
   1215 	public void glReadBuffer (int mode) {
   1216 		calls++;
   1217 		gl30.glReadBuffer(mode);
   1218 		check();
   1219 	}
   1220 
   1221 	@Override
   1222 	public void glDrawRangeElements (int mode, int start, int end, int count, int type, Buffer indices) {
   1223 		vertexCount.put(count);
   1224 		drawCalls++;
   1225 		calls++;
   1226 		gl30.glDrawRangeElements(mode, start, end, count, type, indices);
   1227 		check();
   1228 	}
   1229 
   1230 	@Override
   1231 	public void glDrawRangeElements (int mode, int start, int end, int count, int type, int offset) {
   1232 		vertexCount.put(count);
   1233 		drawCalls++;
   1234 		calls++;
   1235 		gl30.glDrawRangeElements(mode, start, end, count, type, offset);
   1236 		check();
   1237 	}
   1238 
   1239 	@Override
   1240 	public void glTexImage3D (int target, int level, int internalformat, int width, int height, int depth, int border, int format,
   1241 		int type, Buffer pixels) {
   1242 		calls++;
   1243 		gl30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
   1244 		check();
   1245 	}
   1246 
   1247 	@Override
   1248 	public void glTexImage3D (int target, int level, int internalformat, int width, int height, int depth, int border, int format,
   1249 		int type, int offset) {
   1250 		calls++;
   1251 		gl30.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, offset);
   1252 		check();
   1253 	}
   1254 
   1255 	@Override
   1256 	public void glTexSubImage3D (int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
   1257 		int format, int type, Buffer pixels) {
   1258 		calls++;
   1259 		gl30.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
   1260 		check();
   1261 	}
   1262 
   1263 	@Override
   1264 	public void glTexSubImage3D (int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth,
   1265 		int format, int type, int offset) {
   1266 		calls++;
   1267 		gl30.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offset);
   1268 		check();
   1269 	}
   1270 
   1271 	@Override
   1272 	public void glCopyTexSubImage3D (int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width,
   1273 		int height) {
   1274 		calls++;
   1275 		gl30.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
   1276 		check();
   1277 	}
   1278 
   1279 	@Override
   1280 	public void glGenQueries (int n, int[] ids, int offset) {
   1281 		calls++;
   1282 		gl30.glGenQueries(n, ids, offset);
   1283 		check();
   1284 	}
   1285 
   1286 	@Override
   1287 	public void glGenQueries (int n, IntBuffer ids) {
   1288 		calls++;
   1289 		gl30.glGenQueries(n, ids);
   1290 		check();
   1291 	}
   1292 
   1293 	@Override
   1294 	public void glDeleteQueries (int n, int[] ids, int offset) {
   1295 		calls++;
   1296 		gl30.glDeleteQueries(n, ids, offset);
   1297 		check();
   1298 	}
   1299 
   1300 	@Override
   1301 	public void glDeleteQueries (int n, IntBuffer ids) {
   1302 		calls++;
   1303 		gl30.glDeleteQueries(n, ids);
   1304 		check();
   1305 	}
   1306 
   1307 	@Override
   1308 	public boolean glIsQuery (int id) {
   1309 		calls++;
   1310 		final boolean result = gl30.glIsQuery(id);
   1311 		check();
   1312 		return result;
   1313 	}
   1314 
   1315 	@Override
   1316 	public void glBeginQuery (int target, int id) {
   1317 		calls++;
   1318 		gl30.glBeginQuery(target, id);
   1319 		check();
   1320 	}
   1321 
   1322 	@Override
   1323 	public void glEndQuery (int target) {
   1324 		calls++;
   1325 		gl30.glEndQuery(target);
   1326 		check();
   1327 	}
   1328 
   1329 	@Override
   1330 	public void glGetQueryiv (int target, int pname, IntBuffer params) {
   1331 		calls++;
   1332 		gl30.glGetQueryiv(target, pname, params);
   1333 		check();
   1334 	}
   1335 
   1336 	@Override
   1337 	public void glGetQueryObjectuiv (int id, int pname, IntBuffer params) {
   1338 		calls++;
   1339 		gl30.glGetQueryObjectuiv(id, pname, params);
   1340 		check();
   1341 	}
   1342 
   1343 	@Override
   1344 	public boolean glUnmapBuffer (int target) {
   1345 		calls++;
   1346 		final boolean result = gl30.glUnmapBuffer(target);
   1347 		check();
   1348 		return result;
   1349 	}
   1350 
   1351 	@Override
   1352 	public Buffer glGetBufferPointerv (int target, int pname) {
   1353 		calls++;
   1354 		final Buffer result = gl30.glGetBufferPointerv(target, pname);
   1355 		check();
   1356 		return result;
   1357 	}
   1358 
   1359 	@Override
   1360 	public void glDrawBuffers (int n, IntBuffer bufs) {
   1361 		drawCalls++;
   1362 		calls++;
   1363 		gl30.glDrawBuffers(n, bufs);
   1364 		check();
   1365 	}
   1366 
   1367 	@Override
   1368 	public void glUniformMatrix2x3fv (int location, int count, boolean transpose, FloatBuffer value) {
   1369 		calls++;
   1370 		gl30.glUniformMatrix2x3fv(location, count, transpose, value);
   1371 		check();
   1372 	}
   1373 
   1374 	@Override
   1375 	public void glUniformMatrix3x2fv (int location, int count, boolean transpose, FloatBuffer value) {
   1376 		calls++;
   1377 		gl30.glUniformMatrix3x2fv(location, count, transpose, value);
   1378 		check();
   1379 	}
   1380 
   1381 	@Override
   1382 	public void glUniformMatrix2x4fv (int location, int count, boolean transpose, FloatBuffer value) {
   1383 		calls++;
   1384 		gl30.glUniformMatrix2x4fv(location, count, transpose, value);
   1385 		check();
   1386 	}
   1387 
   1388 	@Override
   1389 	public void glUniformMatrix4x2fv (int location, int count, boolean transpose, FloatBuffer value) {
   1390 		calls++;
   1391 		gl30.glUniformMatrix4x2fv(location, count, transpose, value);
   1392 		check();
   1393 	}
   1394 
   1395 	@Override
   1396 	public void glUniformMatrix3x4fv (int location, int count, boolean transpose, FloatBuffer value) {
   1397 		calls++;
   1398 		gl30.glUniformMatrix3x4fv(location, count, transpose, value);
   1399 		check();
   1400 	}
   1401 
   1402 	@Override
   1403 	public void glUniformMatrix4x3fv (int location, int count, boolean transpose, FloatBuffer value) {
   1404 		calls++;
   1405 		gl30.glUniformMatrix4x3fv(location, count, transpose, value);
   1406 		check();
   1407 	}
   1408 
   1409 	@Override
   1410 	public void glBlitFramebuffer (int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1,
   1411 		int mask, int filter) {
   1412 		calls++;
   1413 		gl30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
   1414 		check();
   1415 	}
   1416 
   1417 	@Override
   1418 	public void glRenderbufferStorageMultisample (int target, int samples, int internalformat, int width, int height) {
   1419 		calls++;
   1420 		gl30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
   1421 		check();
   1422 	}
   1423 
   1424 	@Override
   1425 	public void glFramebufferTextureLayer (int target, int attachment, int texture, int level, int layer) {
   1426 		calls++;
   1427 		gl30.glFramebufferTextureLayer(target, attachment, texture, level, layer);
   1428 		check();
   1429 	}
   1430 
   1431 	@Override
   1432 	public void glFlushMappedBufferRange (int target, int offset, int length) {
   1433 		calls++;
   1434 		gl30.glFlushMappedBufferRange(target, offset, length);
   1435 		check();
   1436 	}
   1437 
   1438 	@Override
   1439 	public void glBindVertexArray (int array) {
   1440 		calls++;
   1441 		gl30.glBindVertexArray(array);
   1442 		check();
   1443 	}
   1444 
   1445 	@Override
   1446 	public void glDeleteVertexArrays (int n, int[] arrays, int offset) {
   1447 		calls++;
   1448 		gl30.glDeleteVertexArrays(n, arrays, offset);
   1449 		check();
   1450 	}
   1451 
   1452 	@Override
   1453 	public void glDeleteVertexArrays (int n, IntBuffer arrays) {
   1454 		calls++;
   1455 		gl30.glDeleteVertexArrays(n, arrays);
   1456 		check();
   1457 	}
   1458 
   1459 	@Override
   1460 	public void glGenVertexArrays (int n, int[] arrays, int offset) {
   1461 		calls++;
   1462 		gl30.glGenVertexArrays(n, arrays, offset);
   1463 		check();
   1464 	}
   1465 
   1466 	@Override
   1467 	public void glGenVertexArrays (int n, IntBuffer arrays) {
   1468 		calls++;
   1469 		gl30.glGenVertexArrays(n, arrays);
   1470 		check();
   1471 	}
   1472 
   1473 	@Override
   1474 	public boolean glIsVertexArray (int array) {
   1475 		calls++;
   1476 		final boolean result = gl30.glIsVertexArray(array);
   1477 		check();
   1478 		return result;
   1479 	}
   1480 
   1481 	@Override
   1482 	public void glBeginTransformFeedback (int primitiveMode) {
   1483 		calls++;
   1484 		gl30.glBeginTransformFeedback(primitiveMode);
   1485 		check();
   1486 	}
   1487 
   1488 	@Override
   1489 	public void glEndTransformFeedback () {
   1490 		calls++;
   1491 		gl30.glEndTransformFeedback();
   1492 		check();
   1493 	}
   1494 
   1495 	@Override
   1496 	public void glBindBufferRange (int target, int index, int buffer, int offset, int size) {
   1497 		calls++;
   1498 		gl30.glBindBufferRange(target, index, buffer, offset, size);
   1499 		check();
   1500 	}
   1501 
   1502 	@Override
   1503 	public void glBindBufferBase (int target, int index, int buffer) {
   1504 		calls++;
   1505 		gl30.glBindBufferBase(target, index, buffer);
   1506 		check();
   1507 	}
   1508 
   1509 	@Override
   1510 	public void glTransformFeedbackVaryings (int program, String[] varyings, int bufferMode) {
   1511 		calls++;
   1512 		gl30.glTransformFeedbackVaryings(program, varyings, bufferMode);
   1513 		check();
   1514 	}
   1515 
   1516 	@Override
   1517 	public void glVertexAttribIPointer (int index, int size, int type, int stride, int offset) {
   1518 		calls++;
   1519 		gl30.glVertexAttribIPointer(index, size, type, stride, offset);
   1520 		check();
   1521 	}
   1522 
   1523 	@Override
   1524 	public void glGetVertexAttribIiv (int index, int pname, IntBuffer params) {
   1525 		calls++;
   1526 		gl30.glGetVertexAttribIiv(index, pname, params);
   1527 		check();
   1528 	}
   1529 
   1530 	@Override
   1531 	public void glGetVertexAttribIuiv (int index, int pname, IntBuffer params) {
   1532 		calls++;
   1533 		gl30.glGetVertexAttribIuiv(index, pname, params);
   1534 		check();
   1535 	}
   1536 
   1537 	@Override
   1538 	public void glVertexAttribI4i (int index, int x, int y, int z, int w) {
   1539 		calls++;
   1540 		gl30.glVertexAttribI4i(index, x, y, z, w);
   1541 		check();
   1542 	}
   1543 
   1544 	@Override
   1545 	public void glVertexAttribI4ui (int index, int x, int y, int z, int w) {
   1546 		calls++;
   1547 		gl30.glVertexAttribI4ui(index, x, y, z, w);
   1548 		check();
   1549 	}
   1550 
   1551 	@Override
   1552 	public void glGetUniformuiv (int program, int location, IntBuffer params) {
   1553 		calls++;
   1554 		gl30.glGetUniformuiv(program, location, params);
   1555 		check();
   1556 	}
   1557 
   1558 	@Override
   1559 	public int glGetFragDataLocation (int program, String name) {
   1560 		calls++;
   1561 		final int result = gl30.glGetFragDataLocation(program, name);
   1562 		check();
   1563 		return result;
   1564 	}
   1565 
   1566 	@Override
   1567 	public void glUniform1uiv (int location, int count, IntBuffer value) {
   1568 		calls++;
   1569 		gl30.glUniform1uiv(location, count, value);
   1570 		check();
   1571 	}
   1572 
   1573 	@Override
   1574 	public void glUniform3uiv (int location, int count, IntBuffer value) {
   1575 		calls++;
   1576 		gl30.glUniform3uiv(location, count, value);
   1577 		check();
   1578 	}
   1579 
   1580 	@Override
   1581 	public void glUniform4uiv (int location, int count, IntBuffer value) {
   1582 		calls++;
   1583 		gl30.glUniform4uiv(location, count, value);
   1584 		check();
   1585 	}
   1586 
   1587 	@Override
   1588 	public void glClearBufferiv (int buffer, int drawbuffer, IntBuffer value) {
   1589 		calls++;
   1590 		gl30.glClearBufferiv(buffer, drawbuffer, value);
   1591 		check();
   1592 	}
   1593 
   1594 	@Override
   1595 	public void glClearBufferuiv (int buffer, int drawbuffer, IntBuffer value) {
   1596 		calls++;
   1597 		gl30.glClearBufferuiv(buffer, drawbuffer, value);
   1598 		check();
   1599 	}
   1600 
   1601 	@Override
   1602 	public void glClearBufferfv (int buffer, int drawbuffer, FloatBuffer value) {
   1603 		calls++;
   1604 		gl30.glClearBufferfv(buffer, drawbuffer, value);
   1605 		check();
   1606 	}
   1607 
   1608 	@Override
   1609 	public void glClearBufferfi (int buffer, int drawbuffer, float depth, int stencil) {
   1610 		calls++;
   1611 		gl30.glClearBufferfi(buffer, drawbuffer, depth, stencil);
   1612 		check();
   1613 	}
   1614 
   1615 	@Override
   1616 	public String glGetStringi (int name, int index) {
   1617 		calls++;
   1618 		final String result = gl30.glGetStringi(name, index);
   1619 		check();
   1620 		return result;
   1621 	}
   1622 
   1623 	@Override
   1624 	public void glCopyBufferSubData (int readTarget, int writeTarget, int readOffset, int writeOffset, int size) {
   1625 		calls++;
   1626 		gl30.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
   1627 		check();
   1628 	}
   1629 
   1630 	@Override
   1631 	public void glGetUniformIndices (int program, String[] uniformNames, IntBuffer uniformIndices) {
   1632 		calls++;
   1633 		gl30.glGetUniformIndices(program, uniformNames, uniformIndices);
   1634 		check();
   1635 	}
   1636 
   1637 	@Override
   1638 	public void glGetActiveUniformsiv (int program, int uniformCount, IntBuffer uniformIndices, int pname, IntBuffer params) {
   1639 		calls++;
   1640 		gl30.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
   1641 		check();
   1642 	}
   1643 
   1644 	@Override
   1645 	public int glGetUniformBlockIndex (int program, String uniformBlockName) {
   1646 		calls++;
   1647 		final int result = gl30.glGetUniformBlockIndex(program, uniformBlockName);
   1648 		check();
   1649 		return result;
   1650 	}
   1651 
   1652 	@Override
   1653 	public void glGetActiveUniformBlockiv (int program, int uniformBlockIndex, int pname, IntBuffer params) {
   1654 		calls++;
   1655 		gl30.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
   1656 		check();
   1657 	}
   1658 
   1659 	@Override
   1660 	public void glGetActiveUniformBlockName (int program, int uniformBlockIndex, Buffer length, Buffer uniformBlockName) {
   1661 		calls++;
   1662 		gl30.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName);
   1663 		check();
   1664 	}
   1665 
   1666 	@Override
   1667 	public String glGetActiveUniformBlockName (int program, int uniformBlockIndex) {
   1668 		calls++;
   1669 		final String result = gl30.glGetActiveUniformBlockName(program, uniformBlockIndex);
   1670 		check();
   1671 		return result;
   1672 	}
   1673 
   1674 	@Override
   1675 	public void glUniformBlockBinding (int program, int uniformBlockIndex, int uniformBlockBinding) {
   1676 		calls++;
   1677 		gl30.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
   1678 		check();
   1679 	}
   1680 
   1681 	@Override
   1682 	public void glDrawArraysInstanced (int mode, int first, int count, int instanceCount) {
   1683 		vertexCount.put(count);
   1684 		drawCalls++;
   1685 		calls++;
   1686 		gl30.glDrawArraysInstanced(mode, first, count, instanceCount);
   1687 		check();
   1688 	}
   1689 
   1690 	@Override
   1691 	public void glDrawElementsInstanced (int mode, int count, int type, int indicesOffset, int instanceCount) {
   1692 		vertexCount.put(count);
   1693 		drawCalls++;
   1694 		calls++;
   1695 		gl30.glDrawElementsInstanced(mode, count, type, indicesOffset, instanceCount);
   1696 		check();
   1697 	}
   1698 
   1699 	@Override
   1700 	public void glGetInteger64v (int pname, LongBuffer params) {
   1701 		calls++;
   1702 		gl30.glGetInteger64v(pname, params);
   1703 		check();
   1704 	}
   1705 
   1706 	@Override
   1707 	public void glGetBufferParameteri64v (int target, int pname, LongBuffer params) {
   1708 		calls++;
   1709 		gl30.glGetBufferParameteri64v(target, pname, params);
   1710 		check();
   1711 	}
   1712 
   1713 	@Override
   1714 	public void glGenSamplers (int count, int[] samplers, int offset) {
   1715 		calls++;
   1716 		gl30.glGenSamplers(count, samplers, offset);
   1717 		check();
   1718 	}
   1719 
   1720 	@Override
   1721 	public void glGenSamplers (int count, IntBuffer samplers) {
   1722 		calls++;
   1723 		gl30.glGenSamplers(count, samplers);
   1724 		check();
   1725 	}
   1726 
   1727 	@Override
   1728 	public void glDeleteSamplers (int count, int[] samplers, int offset) {
   1729 		calls++;
   1730 		gl30.glDeleteSamplers(count, samplers, offset);
   1731 		check();
   1732 	}
   1733 
   1734 	@Override
   1735 	public void glDeleteSamplers (int count, IntBuffer samplers) {
   1736 		calls++;
   1737 		gl30.glDeleteSamplers(count, samplers);
   1738 		check();
   1739 	}
   1740 
   1741 	@Override
   1742 	public boolean glIsSampler (int sampler) {
   1743 		calls++;
   1744 		final boolean result = gl30.glIsSampler(sampler);
   1745 		check();
   1746 		return result;
   1747 	}
   1748 
   1749 	@Override
   1750 	public void glBindSampler (int unit, int sampler) {
   1751 		calls++;
   1752 		gl30.glBindSampler(unit, sampler);
   1753 		check();
   1754 	}
   1755 
   1756 	@Override
   1757 	public void glSamplerParameteri (int sampler, int pname, int param) {
   1758 		calls++;
   1759 		gl30.glSamplerParameteri(sampler, pname, param);
   1760 		check();
   1761 	}
   1762 
   1763 	@Override
   1764 	public void glSamplerParameteriv (int sampler, int pname, IntBuffer param) {
   1765 		calls++;
   1766 		gl30.glSamplerParameteriv(sampler, pname, param);
   1767 		check();
   1768 	}
   1769 
   1770 	@Override
   1771 	public void glSamplerParameterf (int sampler, int pname, float param) {
   1772 		calls++;
   1773 		gl30.glSamplerParameterf(sampler, pname, param);
   1774 		check();
   1775 	}
   1776 
   1777 	@Override
   1778 	public void glSamplerParameterfv (int sampler, int pname, FloatBuffer param) {
   1779 		calls++;
   1780 		gl30.glSamplerParameterfv(sampler, pname, param);
   1781 		check();
   1782 	}
   1783 
   1784 	@Override
   1785 	public void glGetSamplerParameteriv (int sampler, int pname, IntBuffer params) {
   1786 		calls++;
   1787 		gl30.glGetSamplerParameteriv(sampler, pname, params);
   1788 		check();
   1789 	}
   1790 
   1791 	@Override
   1792 	public void glGetSamplerParameterfv (int sampler, int pname, FloatBuffer params) {
   1793 		calls++;
   1794 		gl30.glGetSamplerParameterfv(sampler, pname, params);
   1795 		check();
   1796 	}
   1797 
   1798 	@Override
   1799 	public void glVertexAttribDivisor (int index, int divisor) {
   1800 		calls++;
   1801 		gl30.glVertexAttribDivisor(index, divisor);
   1802 		check();
   1803 	}
   1804 
   1805 	@Override
   1806 	public void glBindTransformFeedback (int target, int id) {
   1807 		calls++;
   1808 		gl30.glBindTransformFeedback(target, id);
   1809 		check();
   1810 	}
   1811 
   1812 	@Override
   1813 	public void glDeleteTransformFeedbacks (int n, int[] ids, int offset) {
   1814 		calls++;
   1815 		gl30.glDeleteTransformFeedbacks(n, ids, offset);
   1816 		check();
   1817 	}
   1818 
   1819 	@Override
   1820 	public void glDeleteTransformFeedbacks (int n, IntBuffer ids) {
   1821 		calls++;
   1822 		gl30.glDeleteTransformFeedbacks(n, ids);
   1823 		check();
   1824 	}
   1825 
   1826 	@Override
   1827 	public void glGenTransformFeedbacks (int n, int[] ids, int offset) {
   1828 		calls++;
   1829 		gl30.glGenTransformFeedbacks(n, ids, offset);
   1830 		check();
   1831 	}
   1832 
   1833 	@Override
   1834 	public void glGenTransformFeedbacks (int n, IntBuffer ids) {
   1835 		calls++;
   1836 		gl30.glGenTransformFeedbacks(n, ids);
   1837 		check();
   1838 	}
   1839 
   1840 	@Override
   1841 	public boolean glIsTransformFeedback (int id) {
   1842 		calls++;
   1843 		final boolean result = gl30.glIsTransformFeedback(id);
   1844 		check();
   1845 		return result;
   1846 	}
   1847 
   1848 	@Override
   1849 	public void glPauseTransformFeedback () {
   1850 		calls++;
   1851 		gl30.glPauseTransformFeedback();
   1852 		check();
   1853 	}
   1854 
   1855 	@Override
   1856 	public void glResumeTransformFeedback () {
   1857 		calls++;
   1858 		gl30.glResumeTransformFeedback();
   1859 		check();
   1860 	}
   1861 
   1862 	@Override
   1863 	public void glProgramParameteri (int program, int pname, int value) {
   1864 		calls++;
   1865 		gl30.glProgramParameteri(program, pname, value);
   1866 		check();
   1867 	}
   1868 
   1869 	@Override
   1870 	public void glInvalidateFramebuffer (int target, int numAttachments, IntBuffer attachments) {
   1871 		calls++;
   1872 		gl30.glInvalidateFramebuffer(target, numAttachments, attachments);
   1873 		check();
   1874 	}
   1875 
   1876 	@Override
   1877 	public void glInvalidateSubFramebuffer (int target, int numAttachments, IntBuffer attachments, int x, int y, int width,
   1878 		int height) {
   1879 		calls++;
   1880 		gl30.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
   1881 		check();
   1882 	}
   1883 }
   1884