GLES10.java revision c086ca1fa7cebc3e9a51abd4be4688346225c2e4
1/* 2 * Copyright (C) 2009 The Android Open Source Project 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// This source file is automatically generated 18 19package android.opengl; 20 21import java.nio.Buffer; 22 23public class GLES10 { 24 public static final int GL_ADD = 0x0104; 25 public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; 26 public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; 27 public static final int GL_ALPHA = 0x1906; 28 public static final int GL_ALPHA_BITS = 0x0D55; 29 public static final int GL_ALPHA_TEST = 0x0BC0; 30 public static final int GL_ALWAYS = 0x0207; 31 public static final int GL_AMBIENT = 0x1200; 32 public static final int GL_AMBIENT_AND_DIFFUSE = 0x1602; 33 public static final int GL_AND = 0x1501; 34 public static final int GL_AND_INVERTED = 0x1504; 35 public static final int GL_AND_REVERSE = 0x1502; 36 public static final int GL_BACK = 0x0405; 37 public static final int GL_BLEND = 0x0BE2; 38 public static final int GL_BLUE_BITS = 0x0D54; 39 public static final int GL_BYTE = 0x1400; 40 public static final int GL_CCW = 0x0901; 41 public static final int GL_CLAMP_TO_EDGE = 0x812F; 42 public static final int GL_CLEAR = 0x1500; 43 public static final int GL_COLOR_ARRAY = 0x8076; 44 public static final int GL_COLOR_BUFFER_BIT = 0x4000; 45 public static final int GL_COLOR_LOGIC_OP = 0x0BF2; 46 public static final int GL_COLOR_MATERIAL = 0x0B57; 47 public static final int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; 48 public static final int GL_CONSTANT_ATTENUATION = 0x1207; 49 public static final int GL_COPY = 0x1503; 50 public static final int GL_COPY_INVERTED = 0x150C; 51 public static final int GL_CULL_FACE = 0x0B44; 52 public static final int GL_CW = 0x0900; 53 public static final int GL_DECAL = 0x2101; 54 public static final int GL_DECR = 0x1E03; 55 public static final int GL_DEPTH_BITS = 0x0D56; 56 public static final int GL_DEPTH_BUFFER_BIT = 0x0100; 57 public static final int GL_DEPTH_TEST = 0x0B71; 58 public static final int GL_DIFFUSE = 0x1201; 59 public static final int GL_DITHER = 0x0BD0; 60 public static final int GL_DONT_CARE = 0x1100; 61 public static final int GL_DST_ALPHA = 0x0304; 62 public static final int GL_DST_COLOR = 0x0306; 63 public static final int GL_EMISSION = 0x1600; 64 public static final int GL_EQUAL = 0x0202; 65 public static final int GL_EQUIV = 0x1509; 66 public static final int GL_EXP = 0x0800; 67 public static final int GL_EXP2 = 0x0801; 68 public static final int GL_EXTENSIONS = 0x1F03; 69 public static final int GL_FALSE = 0; 70 public static final int GL_FASTEST = 0x1101; 71 public static final int GL_FIXED = 0x140C; 72 public static final int GL_FLAT = 0x1D00; 73 public static final int GL_FLOAT = 0x1406; 74 public static final int GL_FOG = 0x0B60; 75 public static final int GL_FOG_COLOR = 0x0B66; 76 public static final int GL_FOG_DENSITY = 0x0B62; 77 public static final int GL_FOG_END = 0x0B64; 78 public static final int GL_FOG_HINT = 0x0C54; 79 public static final int GL_FOG_MODE = 0x0B65; 80 public static final int GL_FOG_START = 0x0B63; 81 public static final int GL_FRONT = 0x0404; 82 public static final int GL_FRONT_AND_BACK = 0x0408; 83 public static final int GL_GEQUAL = 0x0206; 84 public static final int GL_GREATER = 0x0204; 85 public static final int GL_GREEN_BITS = 0x0D53; 86 public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B; 87 public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A; 88 public static final int GL_INCR = 0x1E02; 89 public static final int GL_INVALID_ENUM = 0x0500; 90 public static final int GL_INVALID_OPERATION = 0x0502; 91 public static final int GL_INVALID_VALUE = 0x0501; 92 public static final int GL_INVERT = 0x150A; 93 public static final int GL_KEEP = 0x1E00; 94 public static final int GL_LEQUAL = 0x0203; 95 public static final int GL_LESS = 0x0201; 96 public static final int GL_LIGHT_MODEL_AMBIENT = 0x0B53; 97 public static final int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52; 98 public static final int GL_LIGHT0 = 0x4000; 99 public static final int GL_LIGHT1 = 0x4001; 100 public static final int GL_LIGHT2 = 0x4002; 101 public static final int GL_LIGHT3 = 0x4003; 102 public static final int GL_LIGHT4 = 0x4004; 103 public static final int GL_LIGHT5 = 0x4005; 104 public static final int GL_LIGHT6 = 0x4006; 105 public static final int GL_LIGHT7 = 0x4007; 106 public static final int GL_LIGHTING = 0x0B50; 107 public static final int GL_LINE_LOOP = 0x0002; 108 public static final int GL_LINE_SMOOTH = 0x0B20; 109 public static final int GL_LINE_SMOOTH_HINT = 0x0C52; 110 public static final int GL_LINE_STRIP = 0x0003; 111 public static final int GL_LINEAR = 0x2601; 112 public static final int GL_LINEAR_ATTENUATION = 0x1208; 113 public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703; 114 public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701; 115 public static final int GL_LINES = 0x0001; 116 public static final int GL_LUMINANCE = 0x1909; 117 public static final int GL_LUMINANCE_ALPHA = 0x190A; 118 public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9; 119 public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8; 120 public static final int GL_MAX_LIGHTS = 0x0D31; 121 public static final int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36; 122 public static final int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38; 123 public static final int GL_MAX_TEXTURE_SIZE = 0x0D33; 124 public static final int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39; 125 public static final int GL_MAX_TEXTURE_UNITS = 0x84E2; 126 public static final int GL_MAX_VIEWPORT_DIMS = 0x0D3A; 127 public static final int GL_MODELVIEW = 0x1700; 128 public static final int GL_MODULATE = 0x2100; 129 public static final int GL_MULTISAMPLE = 0x809D; 130 public static final int GL_NAND = 0x150E; 131 public static final int GL_NEAREST = 0x2600; 132 public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702; 133 public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700; 134 public static final int GL_NEVER = 0x0200; 135 public static final int GL_NICEST = 0x1102; 136 public static final int GL_NO_ERROR = 0; 137 public static final int GL_NOOP = 0x1505; 138 public static final int GL_NOR = 0x1508; 139 public static final int GL_NORMAL_ARRAY = 0x8075; 140 public static final int GL_NORMALIZE = 0x0BA1; 141 public static final int GL_NOTEQUAL = 0x0205; 142 public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; 143 public static final int GL_ONE = 1; 144 public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305; 145 public static final int GL_ONE_MINUS_DST_COLOR = 0x0307; 146 public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303; 147 public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301; 148 public static final int GL_OR = 0x1507; 149 public static final int GL_OR_INVERTED = 0x150D; 150 public static final int GL_OR_REVERSE = 0x150B; 151 public static final int GL_OUT_OF_MEMORY = 0x0505; 152 public static final int GL_PACK_ALIGNMENT = 0x0D05; 153 public static final int GL_PALETTE4_R5_G6_B5_OES = 0x8B92; 154 public static final int GL_PALETTE4_RGB5_A1_OES = 0x8B94; 155 public static final int GL_PALETTE4_RGB8_OES = 0x8B90; 156 public static final int GL_PALETTE4_RGBA4_OES = 0x8B93; 157 public static final int GL_PALETTE4_RGBA8_OES = 0x8B91; 158 public static final int GL_PALETTE8_R5_G6_B5_OES = 0x8B97; 159 public static final int GL_PALETTE8_RGB5_A1_OES = 0x8B99; 160 public static final int GL_PALETTE8_RGB8_OES = 0x8B95; 161 public static final int GL_PALETTE8_RGBA4_OES = 0x8B98; 162 public static final int GL_PALETTE8_RGBA8_OES = 0x8B96; 163 public static final int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50; 164 public static final int GL_POINT_SMOOTH = 0x0B10; 165 public static final int GL_POINT_SMOOTH_HINT = 0x0C51; 166 public static final int GL_POINTS = 0x0000; 167 public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128; 168 public static final int GL_POINT_SIZE = 0x0B11; 169 public static final int GL_POLYGON_OFFSET_FILL = 0x8037; 170 public static final int GL_POLYGON_SMOOTH_HINT = 0x0C53; 171 public static final int GL_POSITION = 0x1203; 172 public static final int GL_PROJECTION = 0x1701; 173 public static final int GL_QUADRATIC_ATTENUATION = 0x1209; 174 public static final int GL_RED_BITS = 0x0D52; 175 public static final int GL_RENDERER = 0x1F01; 176 public static final int GL_REPEAT = 0x2901; 177 public static final int GL_REPLACE = 0x1E01; 178 public static final int GL_RESCALE_NORMAL = 0x803A; 179 public static final int GL_RGB = 0x1907; 180 public static final int GL_RGBA = 0x1908; 181 public static final int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; 182 public static final int GL_SAMPLE_ALPHA_TO_ONE = 0x809F; 183 public static final int GL_SAMPLE_COVERAGE = 0x80A0; 184 public static final int GL_SCISSOR_TEST = 0x0C11; 185 public static final int GL_SET = 0x150F; 186 public static final int GL_SHININESS = 0x1601; 187 public static final int GL_SHORT = 0x1402; 188 public static final int GL_SMOOTH = 0x1D01; 189 public static final int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22; 190 public static final int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12; 191 public static final int GL_SPECULAR = 0x1202; 192 public static final int GL_SPOT_CUTOFF = 0x1206; 193 public static final int GL_SPOT_DIRECTION = 0x1204; 194 public static final int GL_SPOT_EXPONENT = 0x1205; 195 public static final int GL_SRC_ALPHA = 0x0302; 196 public static final int GL_SRC_ALPHA_SATURATE = 0x0308; 197 public static final int GL_SRC_COLOR = 0x0300; 198 public static final int GL_STACK_OVERFLOW = 0x0503; 199 public static final int GL_STACK_UNDERFLOW = 0x0504; 200 public static final int GL_STENCIL_BITS = 0x0D57; 201 public static final int GL_STENCIL_BUFFER_BIT = 0x0400; 202 public static final int GL_STENCIL_TEST = 0x0B90; 203 public static final int GL_SUBPIXEL_BITS = 0x0D50; 204 public static final int GL_TEXTURE = 0x1702; 205 public static final int GL_TEXTURE_2D = 0x0DE1; 206 public static final int GL_TEXTURE_COORD_ARRAY = 0x8078; 207 public static final int GL_TEXTURE_ENV = 0x2300; 208 public static final int GL_TEXTURE_ENV_COLOR = 0x2201; 209 public static final int GL_TEXTURE_ENV_MODE = 0x2200; 210 public static final int GL_TEXTURE_MAG_FILTER = 0x2800; 211 public static final int GL_TEXTURE_MIN_FILTER = 0x2801; 212 public static final int GL_TEXTURE_WRAP_S = 0x2802; 213 public static final int GL_TEXTURE_WRAP_T = 0x2803; 214 public static final int GL_TEXTURE0 = 0x84C0; 215 public static final int GL_TEXTURE1 = 0x84C1; 216 public static final int GL_TEXTURE2 = 0x84C2; 217 public static final int GL_TEXTURE3 = 0x84C3; 218 public static final int GL_TEXTURE4 = 0x84C4; 219 public static final int GL_TEXTURE5 = 0x84C5; 220 public static final int GL_TEXTURE6 = 0x84C6; 221 public static final int GL_TEXTURE7 = 0x84C7; 222 public static final int GL_TEXTURE8 = 0x84C8; 223 public static final int GL_TEXTURE9 = 0x84C9; 224 public static final int GL_TEXTURE10 = 0x84CA; 225 public static final int GL_TEXTURE11 = 0x84CB; 226 public static final int GL_TEXTURE12 = 0x84CC; 227 public static final int GL_TEXTURE13 = 0x84CD; 228 public static final int GL_TEXTURE14 = 0x84CE; 229 public static final int GL_TEXTURE15 = 0x84CF; 230 public static final int GL_TEXTURE16 = 0x84D0; 231 public static final int GL_TEXTURE17 = 0x84D1; 232 public static final int GL_TEXTURE18 = 0x84D2; 233 public static final int GL_TEXTURE19 = 0x84D3; 234 public static final int GL_TEXTURE20 = 0x84D4; 235 public static final int GL_TEXTURE21 = 0x84D5; 236 public static final int GL_TEXTURE22 = 0x84D6; 237 public static final int GL_TEXTURE23 = 0x84D7; 238 public static final int GL_TEXTURE24 = 0x84D8; 239 public static final int GL_TEXTURE25 = 0x84D9; 240 public static final int GL_TEXTURE26 = 0x84DA; 241 public static final int GL_TEXTURE27 = 0x84DB; 242 public static final int GL_TEXTURE28 = 0x84DC; 243 public static final int GL_TEXTURE29 = 0x84DD; 244 public static final int GL_TEXTURE30 = 0x84DE; 245 public static final int GL_TEXTURE31 = 0x84DF; 246 public static final int GL_TRIANGLE_FAN = 0x0006; 247 public static final int GL_TRIANGLE_STRIP = 0x0005; 248 public static final int GL_TRIANGLES = 0x0004; 249 public static final int GL_TRUE = 1; 250 public static final int GL_UNPACK_ALIGNMENT = 0x0CF5; 251 public static final int GL_UNSIGNED_BYTE = 0x1401; 252 public static final int GL_UNSIGNED_SHORT = 0x1403; 253 public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; 254 public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; 255 public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; 256 public static final int GL_VENDOR = 0x1F00; 257 public static final int GL_VERSION = 0x1F02; 258 public static final int GL_VERTEX_ARRAY = 0x8074; 259 public static final int GL_XOR = 0x1506; 260 public static final int GL_ZERO = 0; 261 262 native private static void _nativeClassInit(); 263 static { 264 _nativeClassInit(); 265 } 266 267 private static Buffer _colorPointer; 268 private static Buffer _normalPointer; 269 private static Buffer _texCoordPointer; 270 private static Buffer _vertexPointer; 271 272 // C function void glActiveTexture ( GLenum texture ) 273 274 public static native void glActiveTexture( 275 int texture 276 ); 277 278 // C function void glAlphaFunc ( GLenum func, GLclampf ref ) 279 280 public static native void glAlphaFunc( 281 int func, 282 float ref 283 ); 284 285 // C function void glAlphaFuncx ( GLenum func, GLclampx ref ) 286 287 public static native void glAlphaFuncx( 288 int func, 289 int ref 290 ); 291 292 // C function void glBindTexture ( GLenum target, GLuint texture ) 293 294 public static native void glBindTexture( 295 int target, 296 int texture 297 ); 298 299 // C function void glBlendFunc ( GLenum sfactor, GLenum dfactor ) 300 301 public static native void glBlendFunc( 302 int sfactor, 303 int dfactor 304 ); 305 306 // C function void glClear ( GLbitfield mask ) 307 308 public static native void glClear( 309 int mask 310 ); 311 312 // C function void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) 313 314 public static native void glClearColor( 315 float red, 316 float green, 317 float blue, 318 float alpha 319 ); 320 321 // C function void glClearColorx ( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha ) 322 323 public static native void glClearColorx( 324 int red, 325 int green, 326 int blue, 327 int alpha 328 ); 329 330 // C function void glClearDepthf ( GLclampf depth ) 331 332 public static native void glClearDepthf( 333 float depth 334 ); 335 336 // C function void glClearDepthx ( GLclampx depth ) 337 338 public static native void glClearDepthx( 339 int depth 340 ); 341 342 // C function void glClearStencil ( GLint s ) 343 344 public static native void glClearStencil( 345 int s 346 ); 347 348 // C function void glClientActiveTexture ( GLenum texture ) 349 350 public static native void glClientActiveTexture( 351 int texture 352 ); 353 354 // C function void glColor4f ( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) 355 356 public static native void glColor4f( 357 float red, 358 float green, 359 float blue, 360 float alpha 361 ); 362 363 // C function void glColor4x ( GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha ) 364 365 public static native void glColor4x( 366 int red, 367 int green, 368 int blue, 369 int alpha 370 ); 371 372 // C function void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) 373 374 public static native void glColorMask( 375 boolean red, 376 boolean green, 377 boolean blue, 378 boolean alpha 379 ); 380 381 // C function void glColorPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) 382 383 private static native void glColorPointerBounds( 384 int size, 385 int type, 386 int stride, 387 java.nio.Buffer pointer, 388 int remaining 389 ); 390 391 public static void glColorPointer( 392 int size, 393 int type, 394 int stride, 395 java.nio.Buffer pointer 396 ) { 397 glColorPointerBounds( 398 size, 399 type, 400 stride, 401 pointer, 402 pointer.remaining() 403 ); 404 if ((size == 4) && 405 ((type == GL_FLOAT) || 406 (type == GL_UNSIGNED_BYTE) || 407 (type == GL_FIXED)) && 408 (stride >= 0)) { 409 _colorPointer = pointer; 410 } 411 } 412 413 // C function void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) 414 415 public static native void glCompressedTexImage2D( 416 int target, 417 int level, 418 int internalformat, 419 int width, 420 int height, 421 int border, 422 int imageSize, 423 java.nio.Buffer data 424 ); 425 426 // C function void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) 427 428 public static native void glCompressedTexSubImage2D( 429 int target, 430 int level, 431 int xoffset, 432 int yoffset, 433 int width, 434 int height, 435 int format, 436 int imageSize, 437 java.nio.Buffer data 438 ); 439 440 // C function void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) 441 442 public static native void glCopyTexImage2D( 443 int target, 444 int level, 445 int internalformat, 446 int x, 447 int y, 448 int width, 449 int height, 450 int border 451 ); 452 453 // C function void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) 454 455 public static native void glCopyTexSubImage2D( 456 int target, 457 int level, 458 int xoffset, 459 int yoffset, 460 int x, 461 int y, 462 int width, 463 int height 464 ); 465 466 // C function void glCullFace ( GLenum mode ) 467 468 public static native void glCullFace( 469 int mode 470 ); 471 472 // C function void glDeleteTextures ( GLsizei n, const GLuint *textures ) 473 474 public static native void glDeleteTextures( 475 int n, 476 int[] textures, 477 int offset 478 ); 479 480 // C function void glDeleteTextures ( GLsizei n, const GLuint *textures ) 481 482 public static native void glDeleteTextures( 483 int n, 484 java.nio.IntBuffer textures 485 ); 486 487 // C function void glDepthFunc ( GLenum func ) 488 489 public static native void glDepthFunc( 490 int func 491 ); 492 493 // C function void glDepthMask ( GLboolean flag ) 494 495 public static native void glDepthMask( 496 boolean flag 497 ); 498 499 // C function void glDepthRangef ( GLclampf zNear, GLclampf zFar ) 500 501 public static native void glDepthRangef( 502 float zNear, 503 float zFar 504 ); 505 506 // C function void glDepthRangex ( GLclampx zNear, GLclampx zFar ) 507 508 public static native void glDepthRangex( 509 int zNear, 510 int zFar 511 ); 512 513 // C function void glDisable ( GLenum cap ) 514 515 public static native void glDisable( 516 int cap 517 ); 518 519 // C function void glDisableClientState ( GLenum array ) 520 521 public static native void glDisableClientState( 522 int array 523 ); 524 525 // C function void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) 526 527 public static native void glDrawArrays( 528 int mode, 529 int first, 530 int count 531 ); 532 533 // C function void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) 534 535 public static native void glDrawElements( 536 int mode, 537 int count, 538 int type, 539 java.nio.Buffer indices 540 ); 541 542 // C function void glEnable ( GLenum cap ) 543 544 public static native void glEnable( 545 int cap 546 ); 547 548 // C function void glEnableClientState ( GLenum array ) 549 550 public static native void glEnableClientState( 551 int array 552 ); 553 554 // C function void glFinish ( void ) 555 556 public static native void glFinish( 557 ); 558 559 // C function void glFlush ( void ) 560 561 public static native void glFlush( 562 ); 563 564 // C function void glFogf ( GLenum pname, GLfloat param ) 565 566 public static native void glFogf( 567 int pname, 568 float param 569 ); 570 571 // C function void glFogfv ( GLenum pname, const GLfloat *params ) 572 573 public static native void glFogfv( 574 int pname, 575 float[] params, 576 int offset 577 ); 578 579 // C function void glFogfv ( GLenum pname, const GLfloat *params ) 580 581 public static native void glFogfv( 582 int pname, 583 java.nio.FloatBuffer params 584 ); 585 586 // C function void glFogx ( GLenum pname, GLfixed param ) 587 588 public static native void glFogx( 589 int pname, 590 int param 591 ); 592 593 // C function void glFogxv ( GLenum pname, const GLfixed *params ) 594 595 public static native void glFogxv( 596 int pname, 597 int[] params, 598 int offset 599 ); 600 601 // C function void glFogxv ( GLenum pname, const GLfixed *params ) 602 603 public static native void glFogxv( 604 int pname, 605 java.nio.IntBuffer params 606 ); 607 608 // C function void glFrontFace ( GLenum mode ) 609 610 public static native void glFrontFace( 611 int mode 612 ); 613 614 // C function void glFrustumf ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) 615 616 public static native void glFrustumf( 617 float left, 618 float right, 619 float bottom, 620 float top, 621 float zNear, 622 float zFar 623 ); 624 625 // C function void glFrustumx ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) 626 627 public static native void glFrustumx( 628 int left, 629 int right, 630 int bottom, 631 int top, 632 int zNear, 633 int zFar 634 ); 635 636 // C function void glGenTextures ( GLsizei n, GLuint *textures ) 637 638 public static native void glGenTextures( 639 int n, 640 int[] textures, 641 int offset 642 ); 643 644 // C function void glGenTextures ( GLsizei n, GLuint *textures ) 645 646 public static native void glGenTextures( 647 int n, 648 java.nio.IntBuffer textures 649 ); 650 651 // C function GLenum glGetError ( void ) 652 653 public static native int glGetError( 654 ); 655 656 // C function void glGetIntegerv ( GLenum pname, GLint *params ) 657 658 public static native void glGetIntegerv( 659 int pname, 660 int[] params, 661 int offset 662 ); 663 664 // C function void glGetIntegerv ( GLenum pname, GLint *params ) 665 666 public static native void glGetIntegerv( 667 int pname, 668 java.nio.IntBuffer params 669 ); 670 671/* 672 * Copyright (C) 2009 The Android Open Source Project 673 * 674 * Licensed under the Apache License, Version 2.0 (the "License"); 675 * you may not use this file except in compliance with the License. 676 * You may obtain a copy of the License at 677 * 678 * http://www.apache.org/licenses/LICENSE-2.0 679 * 680 * Unless required by applicable law or agreed to in writing, software 681 * distributed under the License is distributed on an "AS IS" BASIS, 682 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 683 * See the License for the specific language governing permissions and 684 * limitations under the License. 685 */ 686 687 // C function const GLubyte * glGetString ( GLenum name ) 688 689 public static native String glGetString( 690 int name 691 ); 692 // C function void glHint ( GLenum target, GLenum mode ) 693 694 public static native void glHint( 695 int target, 696 int mode 697 ); 698 699 // C function void glLightModelf ( GLenum pname, GLfloat param ) 700 701 public static native void glLightModelf( 702 int pname, 703 float param 704 ); 705 706 // C function void glLightModelfv ( GLenum pname, const GLfloat *params ) 707 708 public static native void glLightModelfv( 709 int pname, 710 float[] params, 711 int offset 712 ); 713 714 // C function void glLightModelfv ( GLenum pname, const GLfloat *params ) 715 716 public static native void glLightModelfv( 717 int pname, 718 java.nio.FloatBuffer params 719 ); 720 721 // C function void glLightModelx ( GLenum pname, GLfixed param ) 722 723 public static native void glLightModelx( 724 int pname, 725 int param 726 ); 727 728 // C function void glLightModelxv ( GLenum pname, const GLfixed *params ) 729 730 public static native void glLightModelxv( 731 int pname, 732 int[] params, 733 int offset 734 ); 735 736 // C function void glLightModelxv ( GLenum pname, const GLfixed *params ) 737 738 public static native void glLightModelxv( 739 int pname, 740 java.nio.IntBuffer params 741 ); 742 743 // C function void glLightf ( GLenum light, GLenum pname, GLfloat param ) 744 745 public static native void glLightf( 746 int light, 747 int pname, 748 float param 749 ); 750 751 // C function void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) 752 753 public static native void glLightfv( 754 int light, 755 int pname, 756 float[] params, 757 int offset 758 ); 759 760 // C function void glLightfv ( GLenum light, GLenum pname, const GLfloat *params ) 761 762 public static native void glLightfv( 763 int light, 764 int pname, 765 java.nio.FloatBuffer params 766 ); 767 768 // C function void glLightx ( GLenum light, GLenum pname, GLfixed param ) 769 770 public static native void glLightx( 771 int light, 772 int pname, 773 int param 774 ); 775 776 // C function void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) 777 778 public static native void glLightxv( 779 int light, 780 int pname, 781 int[] params, 782 int offset 783 ); 784 785 // C function void glLightxv ( GLenum light, GLenum pname, const GLfixed *params ) 786 787 public static native void glLightxv( 788 int light, 789 int pname, 790 java.nio.IntBuffer params 791 ); 792 793 // C function void glLineWidth ( GLfloat width ) 794 795 public static native void glLineWidth( 796 float width 797 ); 798 799 // C function void glLineWidthx ( GLfixed width ) 800 801 public static native void glLineWidthx( 802 int width 803 ); 804 805 // C function void glLoadIdentity ( void ) 806 807 public static native void glLoadIdentity( 808 ); 809 810 // C function void glLoadMatrixf ( const GLfloat *m ) 811 812 public static native void glLoadMatrixf( 813 float[] m, 814 int offset 815 ); 816 817 // C function void glLoadMatrixf ( const GLfloat *m ) 818 819 public static native void glLoadMatrixf( 820 java.nio.FloatBuffer m 821 ); 822 823 // C function void glLoadMatrixx ( const GLfixed *m ) 824 825 public static native void glLoadMatrixx( 826 int[] m, 827 int offset 828 ); 829 830 // C function void glLoadMatrixx ( const GLfixed *m ) 831 832 public static native void glLoadMatrixx( 833 java.nio.IntBuffer m 834 ); 835 836 // C function void glLogicOp ( GLenum opcode ) 837 838 public static native void glLogicOp( 839 int opcode 840 ); 841 842 // C function void glMaterialf ( GLenum face, GLenum pname, GLfloat param ) 843 844 public static native void glMaterialf( 845 int face, 846 int pname, 847 float param 848 ); 849 850 // C function void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) 851 852 public static native void glMaterialfv( 853 int face, 854 int pname, 855 float[] params, 856 int offset 857 ); 858 859 // C function void glMaterialfv ( GLenum face, GLenum pname, const GLfloat *params ) 860 861 public static native void glMaterialfv( 862 int face, 863 int pname, 864 java.nio.FloatBuffer params 865 ); 866 867 // C function void glMaterialx ( GLenum face, GLenum pname, GLfixed param ) 868 869 public static native void glMaterialx( 870 int face, 871 int pname, 872 int param 873 ); 874 875 // C function void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) 876 877 public static native void glMaterialxv( 878 int face, 879 int pname, 880 int[] params, 881 int offset 882 ); 883 884 // C function void glMaterialxv ( GLenum face, GLenum pname, const GLfixed *params ) 885 886 public static native void glMaterialxv( 887 int face, 888 int pname, 889 java.nio.IntBuffer params 890 ); 891 892 // C function void glMatrixMode ( GLenum mode ) 893 894 public static native void glMatrixMode( 895 int mode 896 ); 897 898 // C function void glMultMatrixf ( const GLfloat *m ) 899 900 public static native void glMultMatrixf( 901 float[] m, 902 int offset 903 ); 904 905 // C function void glMultMatrixf ( const GLfloat *m ) 906 907 public static native void glMultMatrixf( 908 java.nio.FloatBuffer m 909 ); 910 911 // C function void glMultMatrixx ( const GLfixed *m ) 912 913 public static native void glMultMatrixx( 914 int[] m, 915 int offset 916 ); 917 918 // C function void glMultMatrixx ( const GLfixed *m ) 919 920 public static native void glMultMatrixx( 921 java.nio.IntBuffer m 922 ); 923 924 // C function void glMultiTexCoord4f ( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ) 925 926 public static native void glMultiTexCoord4f( 927 int target, 928 float s, 929 float t, 930 float r, 931 float q 932 ); 933 934 // C function void glMultiTexCoord4x ( GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q ) 935 936 public static native void glMultiTexCoord4x( 937 int target, 938 int s, 939 int t, 940 int r, 941 int q 942 ); 943 944 // C function void glNormal3f ( GLfloat nx, GLfloat ny, GLfloat nz ) 945 946 public static native void glNormal3f( 947 float nx, 948 float ny, 949 float nz 950 ); 951 952 // C function void glNormal3x ( GLfixed nx, GLfixed ny, GLfixed nz ) 953 954 public static native void glNormal3x( 955 int nx, 956 int ny, 957 int nz 958 ); 959 960 // C function void glNormalPointer ( GLenum type, GLsizei stride, const GLvoid *pointer ) 961 962 private static native void glNormalPointerBounds( 963 int type, 964 int stride, 965 java.nio.Buffer pointer, 966 int remaining 967 ); 968 969 public static void glNormalPointer( 970 int type, 971 int stride, 972 java.nio.Buffer pointer 973 ) { 974 glNormalPointerBounds( 975 type, 976 stride, 977 pointer, 978 pointer.remaining() 979 ); 980 if (((type == GL_FLOAT) || 981 (type == GL_BYTE) || 982 (type == GL_SHORT) || 983 (type == GL_FIXED)) && 984 (stride >= 0)) { 985 _normalPointer = pointer; 986 } 987 } 988 989 // C function void glOrthof ( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar ) 990 991 public static native void glOrthof( 992 float left, 993 float right, 994 float bottom, 995 float top, 996 float zNear, 997 float zFar 998 ); 999 1000 // C function void glOrthox ( GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar ) 1001 1002 public static native void glOrthox( 1003 int left, 1004 int right, 1005 int bottom, 1006 int top, 1007 int zNear, 1008 int zFar 1009 ); 1010 1011 // C function void glPixelStorei ( GLenum pname, GLint param ) 1012 1013 public static native void glPixelStorei( 1014 int pname, 1015 int param 1016 ); 1017 1018 // C function void glPointSize ( GLfloat size ) 1019 1020 public static native void glPointSize( 1021 float size 1022 ); 1023 1024 // C function void glPointSizex ( GLfixed size ) 1025 1026 public static native void glPointSizex( 1027 int size 1028 ); 1029 1030 // C function void glPolygonOffset ( GLfloat factor, GLfloat units ) 1031 1032 public static native void glPolygonOffset( 1033 float factor, 1034 float units 1035 ); 1036 1037 // C function void glPolygonOffsetx ( GLfixed factor, GLfixed units ) 1038 1039 public static native void glPolygonOffsetx( 1040 int factor, 1041 int units 1042 ); 1043 1044 // C function void glPopMatrix ( void ) 1045 1046 public static native void glPopMatrix( 1047 ); 1048 1049 // C function void glPushMatrix ( void ) 1050 1051 public static native void glPushMatrix( 1052 ); 1053 1054 // C function void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) 1055 1056 public static native void glReadPixels( 1057 int x, 1058 int y, 1059 int width, 1060 int height, 1061 int format, 1062 int type, 1063 java.nio.Buffer pixels 1064 ); 1065 1066 // C function void glRotatef ( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) 1067 1068 public static native void glRotatef( 1069 float angle, 1070 float x, 1071 float y, 1072 float z 1073 ); 1074 1075 // C function void glRotatex ( GLfixed angle, GLfixed x, GLfixed y, GLfixed z ) 1076 1077 public static native void glRotatex( 1078 int angle, 1079 int x, 1080 int y, 1081 int z 1082 ); 1083 1084 // C function void glSampleCoverage ( GLclampf value, GLboolean invert ) 1085 1086 public static native void glSampleCoverage( 1087 float value, 1088 boolean invert 1089 ); 1090 1091 // C function void glSampleCoveragex ( GLclampx value, GLboolean invert ) 1092 1093 public static native void glSampleCoveragex( 1094 int value, 1095 boolean invert 1096 ); 1097 1098 // C function void glScalef ( GLfloat x, GLfloat y, GLfloat z ) 1099 1100 public static native void glScalef( 1101 float x, 1102 float y, 1103 float z 1104 ); 1105 1106 // C function void glScalex ( GLfixed x, GLfixed y, GLfixed z ) 1107 1108 public static native void glScalex( 1109 int x, 1110 int y, 1111 int z 1112 ); 1113 1114 // C function void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) 1115 1116 public static native void glScissor( 1117 int x, 1118 int y, 1119 int width, 1120 int height 1121 ); 1122 1123 // C function void glShadeModel ( GLenum mode ) 1124 1125 public static native void glShadeModel( 1126 int mode 1127 ); 1128 1129 // C function void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) 1130 1131 public static native void glStencilFunc( 1132 int func, 1133 int ref, 1134 int mask 1135 ); 1136 1137 // C function void glStencilMask ( GLuint mask ) 1138 1139 public static native void glStencilMask( 1140 int mask 1141 ); 1142 1143 // C function void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) 1144 1145 public static native void glStencilOp( 1146 int fail, 1147 int zfail, 1148 int zpass 1149 ); 1150 1151 // C function void glTexCoordPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) 1152 1153 private static native void glTexCoordPointerBounds( 1154 int size, 1155 int type, 1156 int stride, 1157 java.nio.Buffer pointer, 1158 int remaining 1159 ); 1160 1161 public static void glTexCoordPointer( 1162 int size, 1163 int type, 1164 int stride, 1165 java.nio.Buffer pointer 1166 ) { 1167 glTexCoordPointerBounds( 1168 size, 1169 type, 1170 stride, 1171 pointer, 1172 pointer.remaining() 1173 ); 1174 if (((size == 2) || 1175 (size == 3) || 1176 (size == 4)) && 1177 ((type == GL_FLOAT) || 1178 (type == GL_BYTE) || 1179 (type == GL_SHORT) || 1180 (type == GL_FIXED)) && 1181 (stride >= 0)) { 1182 _texCoordPointer = pointer; 1183 } 1184 } 1185 1186 // C function void glTexEnvf ( GLenum target, GLenum pname, GLfloat param ) 1187 1188 public static native void glTexEnvf( 1189 int target, 1190 int pname, 1191 float param 1192 ); 1193 1194 // C function void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) 1195 1196 public static native void glTexEnvfv( 1197 int target, 1198 int pname, 1199 float[] params, 1200 int offset 1201 ); 1202 1203 // C function void glTexEnvfv ( GLenum target, GLenum pname, const GLfloat *params ) 1204 1205 public static native void glTexEnvfv( 1206 int target, 1207 int pname, 1208 java.nio.FloatBuffer params 1209 ); 1210 1211 // C function void glTexEnvx ( GLenum target, GLenum pname, GLfixed param ) 1212 1213 public static native void glTexEnvx( 1214 int target, 1215 int pname, 1216 int param 1217 ); 1218 1219 // C function void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) 1220 1221 public static native void glTexEnvxv( 1222 int target, 1223 int pname, 1224 int[] params, 1225 int offset 1226 ); 1227 1228 // C function void glTexEnvxv ( GLenum target, GLenum pname, const GLfixed *params ) 1229 1230 public static native void glTexEnvxv( 1231 int target, 1232 int pname, 1233 java.nio.IntBuffer params 1234 ); 1235 1236 // C function void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) 1237 1238 public static native void glTexImage2D( 1239 int target, 1240 int level, 1241 int internalformat, 1242 int width, 1243 int height, 1244 int border, 1245 int format, 1246 int type, 1247 java.nio.Buffer pixels 1248 ); 1249 1250 // C function void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) 1251 1252 public static native void glTexParameterf( 1253 int target, 1254 int pname, 1255 float param 1256 ); 1257 1258 // C function void glTexParameterx ( GLenum target, GLenum pname, GLfixed param ) 1259 1260 public static native void glTexParameterx( 1261 int target, 1262 int pname, 1263 int param 1264 ); 1265 1266 // C function void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) 1267 1268 public static native void glTexSubImage2D( 1269 int target, 1270 int level, 1271 int xoffset, 1272 int yoffset, 1273 int width, 1274 int height, 1275 int format, 1276 int type, 1277 java.nio.Buffer pixels 1278 ); 1279 1280 // C function void glTranslatef ( GLfloat x, GLfloat y, GLfloat z ) 1281 1282 public static native void glTranslatef( 1283 float x, 1284 float y, 1285 float z 1286 ); 1287 1288 // C function void glTranslatex ( GLfixed x, GLfixed y, GLfixed z ) 1289 1290 public static native void glTranslatex( 1291 int x, 1292 int y, 1293 int z 1294 ); 1295 1296 // C function void glVertexPointer ( GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) 1297 1298 private static native void glVertexPointerBounds( 1299 int size, 1300 int type, 1301 int stride, 1302 java.nio.Buffer pointer, 1303 int remaining 1304 ); 1305 1306 public static void glVertexPointer( 1307 int size, 1308 int type, 1309 int stride, 1310 java.nio.Buffer pointer 1311 ) { 1312 glVertexPointerBounds( 1313 size, 1314 type, 1315 stride, 1316 pointer, 1317 pointer.remaining() 1318 ); 1319 if (((size == 2) || 1320 (size == 3) || 1321 (size == 4)) && 1322 ((type == GL_FLOAT) || 1323 (type == GL_BYTE) || 1324 (type == GL_SHORT) || 1325 (type == GL_FIXED)) && 1326 (stride >= 0)) { 1327 _vertexPointer = pointer; 1328 } 1329 } 1330 1331 // C function void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) 1332 1333 public static native void glViewport( 1334 int x, 1335 int y, 1336 int width, 1337 int height 1338 ); 1339 1340} 1341