Java Doc for GL10.java in  » 6.0-JDK-Modules » j2me » javax » microedition » khronos » opengles » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » javax.microedition.khronos.opengles 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.microedition.khronos.opengles.GL10

All known Subclasses:   com.sun.jsr239.GL10Impl,
GL10
public interface GL10 extends GL(Code)
The GL10 interface contains the Java(TM) programming language bindings for OpenGL(R) ES 1.0 core functionality.

The OES_byte_coordinates, OES_single_precision, OES_fixed_point, OES_read_format, and OES_compressed_paletted_texture extensions are included as part of this interface.

Methods with an x or xv suffix belong to the OES_fixed_point extension and take one or more fixed-point arguments. Fixed-point arguments may be derived from floating-point values by multiplying by 65536 (2^16) and rounding to the nearest integer.

For ease of use, this interface documents method behavior for all versions of OpenGL ES including version 1.1 and extensions. When running on an OpenGL ES 1.0 implementation, sections marked "(1.1 only)" should be disregarded.

See the GL interface for a description of how to obtain an instance of this interface.



Field Summary
 intGL_ADD
     OpenGL ES 1.0 constant.
 intGL_ALIASED_LINE_WIDTH_RANGE
     OpenGL ES 1.0 constant.
 intGL_ALIASED_POINT_SIZE_RANGE
     OpenGL ES 1.0 constant.
 intGL_ALPHA
     OpenGL ES 1.0 constant.
 intGL_ALPHA_BITS
     OpenGL ES 1.0 constant.
 intGL_ALPHA_TEST
     OpenGL ES 1.0 constant.
 intGL_ALWAYS
     OpenGL ES 1.0 constant.
 intGL_AMBIENT
     OpenGL ES 1.0 constant.
 intGL_AMBIENT_AND_DIFFUSE
     OpenGL ES 1.0 constant.
 intGL_AND
     OpenGL ES 1.0 constant.
 intGL_AND_INVERTED
     OpenGL ES 1.0 constant.
 intGL_AND_REVERSE
     OpenGL ES 1.0 constant.
 intGL_BACK
     OpenGL ES 1.0 constant.
 intGL_BLEND
     OpenGL ES 1.0 constant.
 intGL_BLUE_BITS
     OpenGL ES 1.0 constant.
 intGL_BYTE
     OpenGL ES 1.0 constant.
 intGL_CCW
     OpenGL ES 1.0 constant.
 intGL_CLAMP_TO_EDGE
     OpenGL ES 1.0 constant.
 intGL_CLEAR
     OpenGL ES 1.0 constant.
 intGL_COLOR_ARRAY
     OpenGL ES 1.0 constant.
 intGL_COLOR_BUFFER_BIT
     OpenGL ES 1.0 constant.
 intGL_COLOR_LOGIC_OP
     OpenGL ES 1.0 constant.
 intGL_COLOR_MATERIAL
     OpenGL ES 1.0 constant.
 intGL_COMPRESSED_TEXTURE_FORMATS
     OpenGL ES 1.0 constant.
 intGL_CONSTANT_ATTENUATION
     OpenGL ES 1.0 constant.
 intGL_COPY
     OpenGL ES 1.0 constant.
 intGL_COPY_INVERTED
     OpenGL ES 1.0 constant.
 intGL_CULL_FACE
     OpenGL ES 1.0 constant.
 intGL_CW
     OpenGL ES 1.0 constant.
 intGL_DECAL
     OpenGL ES 1.0 constant.
 intGL_DECR
     OpenGL ES 1.0 constant.
 intGL_DEPTH_BITS
     OpenGL ES 1.0 constant.
 intGL_DEPTH_BUFFER_BIT
     OpenGL ES 1.0 constant.
 intGL_DEPTH_TEST
     OpenGL ES 1.0 constant.
 intGL_DIFFUSE
     OpenGL ES 1.0 constant.
 intGL_DITHER
     OpenGL ES 1.0 constant.
 intGL_DONT_CARE
     OpenGL ES 1.0 constant.
 intGL_DST_ALPHA
     OpenGL ES 1.0 constant.
 intGL_DST_COLOR
     OpenGL ES 1.0 constant.
 intGL_EMISSION
     OpenGL ES 1.0 constant.
 intGL_EQUAL
     OpenGL ES 1.0 constant.
 intGL_EQUIV
     OpenGL ES 1.0 constant.
 intGL_EXP
     OpenGL ES 1.0 constant.
 intGL_EXP2
     OpenGL ES 1.0 constant.
 intGL_EXTENSIONS
     OpenGL ES 1.0 constant.
 intGL_FALSE
     OpenGL ES 1.0 constant.
 intGL_FASTEST
     OpenGL ES 1.0 constant.
 intGL_FIXED
     OpenGL ES 1.0 constant.
 intGL_FLAT
     OpenGL ES 1.0 constant.
 intGL_FLOAT
     OpenGL ES 1.0 constant.
 intGL_FOG
     OpenGL ES 1.0 constant.
 intGL_FOG_COLOR
     OpenGL ES 1.0 constant.
 intGL_FOG_DENSITY
     OpenGL ES 1.0 constant.
 intGL_FOG_END
     OpenGL ES 1.0 constant.
 intGL_FOG_HINT
     OpenGL ES 1.0 constant.
 intGL_FOG_MODE
     OpenGL ES 1.0 constant.
 intGL_FOG_START
     OpenGL ES 1.0 constant.
 intGL_FRONT
     OpenGL ES 1.0 constant.
 intGL_FRONT_AND_BACK
     OpenGL ES 1.0 constant.
 intGL_GEQUAL
     OpenGL ES 1.0 constant.
 intGL_GREATER
     OpenGL ES 1.0 constant.
 intGL_GREEN_BITS
     OpenGL ES 1.0 constant.
 intGL_IMPLEMENTATION_COLOR_READ_FORMAT_OES
     OpenGL ES 1.0 constant.
 intGL_IMPLEMENTATION_COLOR_READ_TYPE_OES
     OpenGL ES 1.0 constant.
 intGL_INCR
     OpenGL ES 1.0 constant.
 intGL_INVALID_ENUM
     OpenGL ES 1.0 constant.
 intGL_INVALID_OPERATION
     OpenGL ES 1.0 constant.
 intGL_INVALID_VALUE
     OpenGL ES 1.0 constant.
 intGL_INVERT
     OpenGL ES 1.0 constant.
 intGL_KEEP
     OpenGL ES 1.0 constant.
 intGL_LEQUAL
     OpenGL ES 1.0 constant.
 intGL_LESS
     OpenGL ES 1.0 constant.
 intGL_LIGHT0
     OpenGL ES 1.0 constant.
 intGL_LIGHT1
     OpenGL ES 1.0 constant.
 intGL_LIGHT2
     OpenGL ES 1.0 constant.
 intGL_LIGHT3
     OpenGL ES 1.0 constant.
 intGL_LIGHT4
     OpenGL ES 1.0 constant.
 intGL_LIGHT5
     OpenGL ES 1.0 constant.
 intGL_LIGHT6
     OpenGL ES 1.0 constant.
 intGL_LIGHT7
     OpenGL ES 1.0 constant.
 intGL_LIGHTING
     OpenGL ES 1.0 constant.
 intGL_LIGHT_MODEL_AMBIENT
     OpenGL ES 1.0 constant.
 intGL_LIGHT_MODEL_TWO_SIDE
     OpenGL ES 1.0 constant.
 intGL_LINEAR
     OpenGL ES 1.0 constant.
 intGL_LINEAR_ATTENUATION
     OpenGL ES 1.0 constant.
 intGL_LINEAR_MIPMAP_LINEAR
     OpenGL ES 1.0 constant.
 intGL_LINEAR_MIPMAP_NEAREST
     OpenGL ES 1.0 constant.
 intGL_LINES
     OpenGL ES 1.0 constant.
 intGL_LINE_LOOP
     OpenGL ES 1.0 constant.
 intGL_LINE_SMOOTH
     OpenGL ES 1.0 constant.
 intGL_LINE_SMOOTH_HINT
     OpenGL ES 1.0 constant.
 intGL_LINE_STRIP
     OpenGL ES 1.0 constant.
 intGL_LUMINANCE
     OpenGL ES 1.0 constant.
 intGL_LUMINANCE_ALPHA
     OpenGL ES 1.0 constant.
 intGL_MAX_ELEMENTS_INDICES
     OpenGL ES 1.0 constant.
 intGL_MAX_ELEMENTS_VERTICES
     OpenGL ES 1.0 constant.
 intGL_MAX_LIGHTS
     OpenGL ES 1.0 constant.
 intGL_MAX_MODELVIEW_STACK_DEPTH
     OpenGL ES 1.0 constant.
 intGL_MAX_PROJECTION_STACK_DEPTH
     OpenGL ES 1.0 constant.
 intGL_MAX_TEXTURE_SIZE
     OpenGL ES 1.0 constant.
 intGL_MAX_TEXTURE_STACK_DEPTH
     OpenGL ES 1.0 constant.
 intGL_MAX_TEXTURE_UNITS
     OpenGL ES 1.0 constant.
 intGL_MAX_VIEWPORT_DIMS
     OpenGL ES 1.0 constant.
 intGL_MODELVIEW
     OpenGL ES 1.0 constant.
 intGL_MODULATE
     OpenGL ES 1.0 constant.
 intGL_MULTISAMPLE
     OpenGL ES 1.0 constant.
 intGL_NAND
     OpenGL ES 1.0 constant.
 intGL_NEAREST
     OpenGL ES 1.0 constant.
 intGL_NEAREST_MIPMAP_LINEAR
     OpenGL ES 1.0 constant.
 intGL_NEAREST_MIPMAP_NEAREST
     OpenGL ES 1.0 constant.
 intGL_NEVER
     OpenGL ES 1.0 constant.
 intGL_NICEST
     OpenGL ES 1.0 constant.
 intGL_NOOP
     OpenGL ES 1.0 constant.
 intGL_NOR
     OpenGL ES 1.0 constant.
 intGL_NORMALIZE
     OpenGL ES 1.0 constant.
 intGL_NORMAL_ARRAY
     OpenGL ES 1.0 constant.
 intGL_NOTEQUAL
     OpenGL ES 1.0 constant.
 intGL_NO_ERROR
     OpenGL ES 1.0 constant.
 intGL_NUM_COMPRESSED_TEXTURE_FORMATS
     OpenGL ES 1.0 constant.
 intGL_ONE
     OpenGL ES 1.0 constant.
 intGL_ONE_MINUS_DST_ALPHA
     OpenGL ES 1.0 constant.
 intGL_ONE_MINUS_DST_COLOR
     OpenGL ES 1.0 constant.
 intGL_ONE_MINUS_SRC_ALPHA
     OpenGL ES 1.0 constant.
 intGL_ONE_MINUS_SRC_COLOR
     OpenGL ES 1.0 constant.
 intGL_OR
     OpenGL ES 1.0 constant.
 intGL_OR_INVERTED
     OpenGL ES 1.0 constant.
 intGL_OR_REVERSE
     OpenGL ES 1.0 constant.
 intGL_OUT_OF_MEMORY
     OpenGL ES 1.0 constant.
 intGL_PACK_ALIGNMENT
     OpenGL ES 1.0 constant.
 intGL_PALETTE4_R5_G6_B5_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE4_RGB5_A1_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE4_RGB8_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE4_RGBA4_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE4_RGBA8_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE8_R5_G6_B5_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE8_RGB5_A1_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE8_RGB8_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE8_RGBA4_OES
     OpenGL ES 1.0 constant.
 intGL_PALETTE8_RGBA8_OES
     OpenGL ES 1.0 constant.
 intGL_PERSPECTIVE_CORRECTION_HINT
     OpenGL ES 1.0 constant.
 intGL_POINTS
     OpenGL ES 1.0 constant.
 intGL_POINT_SMOOTH
     OpenGL ES 1.0 constant.
 intGL_POINT_SMOOTH_HINT
     OpenGL ES 1.0 constant.
 intGL_POLYGON_OFFSET_FILL
     OpenGL ES 1.0 constant.
 intGL_POLYGON_SMOOTH_HINT
     OpenGL ES 1.0 constant.
 intGL_POSITION
     OpenGL ES 1.0 constant.
 intGL_PROJECTION
     OpenGL ES 1.0 constant.
 intGL_QUADRATIC_ATTENUATION
     OpenGL ES 1.0 constant.
 intGL_RED_BITS
     OpenGL ES 1.0 constant.
 intGL_RENDERER
     OpenGL ES 1.0 constant.
 intGL_REPEAT
     OpenGL ES 1.0 constant.
 intGL_REPLACE
     OpenGL ES 1.0 constant.
 intGL_RESCALE_NORMAL
     OpenGL ES 1.0 constant.
 intGL_RGB
     OpenGL ES 1.0 constant.
 intGL_RGBA
     OpenGL ES 1.0 constant.
 intGL_SAMPLE_ALPHA_TO_COVERAGE
     OpenGL ES 1.0 constant.
 intGL_SAMPLE_ALPHA_TO_ONE
     OpenGL ES 1.0 constant.
 intGL_SAMPLE_COVERAGE
     OpenGL ES 1.0 constant.
 intGL_SCISSOR_TEST
     OpenGL ES 1.0 constant.
 intGL_SET
     OpenGL ES 1.0 constant.
 intGL_SHININESS
     OpenGL ES 1.0 constant.
 intGL_SHORT
     OpenGL ES 1.0 constant.
 intGL_SMOOTH
     OpenGL ES 1.0 constant.
 intGL_SMOOTH_LINE_WIDTH_RANGE
     OpenGL ES 1.0 constant.
 intGL_SMOOTH_POINT_SIZE_RANGE
     OpenGL ES 1.0 constant.
 intGL_SPECULAR
     OpenGL ES 1.0 constant.
 intGL_SPOT_CUTOFF
     OpenGL ES 1.0 constant.
 intGL_SPOT_DIRECTION
     OpenGL ES 1.0 constant.
 intGL_SPOT_EXPONENT
     OpenGL ES 1.0 constant.
 intGL_SRC_ALPHA
     OpenGL ES 1.0 constant.
 intGL_SRC_ALPHA_SATURATE
     OpenGL ES 1.0 constant.
 intGL_SRC_COLOR
     OpenGL ES 1.0 constant.
 intGL_STACK_OVERFLOW
     OpenGL ES 1.0 constant.
 intGL_STACK_UNDERFLOW
     OpenGL ES 1.0 constant.
 intGL_STENCIL_BITS
     OpenGL ES 1.0 constant.
 intGL_STENCIL_BUFFER_BIT
     OpenGL ES 1.0 constant.
 intGL_STENCIL_TEST
     OpenGL ES 1.0 constant.
 intGL_SUBPIXEL_BITS
     OpenGL ES 1.0 constant.
 intGL_TEXTURE
     OpenGL ES 1.0 constant.
 intGL_TEXTURE0
     OpenGL ES 1.0 constant.
 intGL_TEXTURE1
     OpenGL ES 1.0 constant.
 intGL_TEXTURE10
     OpenGL ES 1.0 constant.
 intGL_TEXTURE11
     OpenGL ES 1.0 constant.
 intGL_TEXTURE12
     OpenGL ES 1.0 constant.
 intGL_TEXTURE13
     OpenGL ES 1.0 constant.
 intGL_TEXTURE14
     OpenGL ES 1.0 constant.
 intGL_TEXTURE15
     OpenGL ES 1.0 constant.
 intGL_TEXTURE16
     OpenGL ES 1.0 constant.
 intGL_TEXTURE17
     OpenGL ES 1.0 constant.
 intGL_TEXTURE18
     OpenGL ES 1.0 constant.
 intGL_TEXTURE19
     OpenGL ES 1.0 constant.
 intGL_TEXTURE2
     OpenGL ES 1.0 constant.
 intGL_TEXTURE20
     OpenGL ES 1.0 constant.
 intGL_TEXTURE21
     OpenGL ES 1.0 constant.
 intGL_TEXTURE22
     OpenGL ES 1.0 constant.
 intGL_TEXTURE23
     OpenGL ES 1.0 constant.
 intGL_TEXTURE24
     OpenGL ES 1.0 constant.
 intGL_TEXTURE25
     OpenGL ES 1.0 constant.
 intGL_TEXTURE26
     OpenGL ES 1.0 constant.
 intGL_TEXTURE27
     OpenGL ES 1.0 constant.
 intGL_TEXTURE28
     OpenGL ES 1.0 constant.
 intGL_TEXTURE29
     OpenGL ES 1.0 constant.
 intGL_TEXTURE3
     OpenGL ES 1.0 constant.
 intGL_TEXTURE30
     OpenGL ES 1.0 constant.
 intGL_TEXTURE31
     OpenGL ES 1.0 constant.
 intGL_TEXTURE4
     OpenGL ES 1.0 constant.
 intGL_TEXTURE5
     OpenGL ES 1.0 constant.
 intGL_TEXTURE6
     OpenGL ES 1.0 constant.
 intGL_TEXTURE7
     OpenGL ES 1.0 constant.
 intGL_TEXTURE8
     OpenGL ES 1.0 constant.
 intGL_TEXTURE9
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_2D
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_COORD_ARRAY
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_ENV
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_ENV_COLOR
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_ENV_MODE
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_MAG_FILTER
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_MIN_FILTER
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_WRAP_S
     OpenGL ES 1.0 constant.
 intGL_TEXTURE_WRAP_T
     OpenGL ES 1.0 constant.
 intGL_TRIANGLES
     OpenGL ES 1.0 constant.
 intGL_TRIANGLE_FAN
     OpenGL ES 1.0 constant.
 intGL_TRIANGLE_STRIP
     OpenGL ES 1.0 constant.
 intGL_TRUE
     OpenGL ES 1.0 constant.
 intGL_UNPACK_ALIGNMENT
     OpenGL ES 1.0 constant.
 intGL_UNSIGNED_BYTE
     OpenGL ES 1.0 constant.
 intGL_UNSIGNED_SHORT
     OpenGL ES 1.0 constant.
 intGL_UNSIGNED_SHORT_4_4_4_4
     OpenGL ES 1.0 constant.
 intGL_UNSIGNED_SHORT_5_5_5_1
     OpenGL ES 1.0 constant.
 intGL_UNSIGNED_SHORT_5_6_5
     OpenGL ES 1.0 constant.
 intGL_VENDOR
     OpenGL ES 1.0 constant.
 intGL_VERSION
     OpenGL ES 1.0 constant.
 intGL_VERTEX_ARRAY
     OpenGL ES 1.0 constant.
 intGL_XOR
     OpenGL ES 1.0 constant.
 intGL_ZERO
     OpenGL ES 1.0 constant.


Method Summary
 voidglActiveTexture(int texture)
     Select server-side active texture unit.

glActiveTexture selects which texture unit subsequent texture state calls will affect.

 voidglAlphaFunc(int func, float ref)
     Specify the alpha test function.

The alpha test discards fragments depending on the outcome of a comparison between an incoming fragment's alpha value and a constant reference value.

 voidglAlphaFuncx(int func, int ref)
     Fixed-point version of glAlphaFunc.
 voidglBindTexture(int target, int texture)
     Bind a named texture to a texturing target.

glBindTexture lets you create or use a named texture.

 voidglBlendFunc(int sfactor, int dfactor)
     Specify pixel arithmetic.

Pixels can be drawn using a function that blends the incoming (source) values with the values that are already in the color buffer (the destination values).

 voidglClear(int mask)
     Clear buffers to preset values.

glClear sets the bitplane area of the window to values previously selected by glClearColor, glClearDepth, and glClearStencil.

The pixel ownership test, the scissor test, dithering, and the color buffer masks affect the operation of glClear.

 voidglClearColor(float red, float green, float blue, float alpha)
     Specify clear values for the color buffer.

glClearColor specifies the red, green, blue, and alpha values used by glClear to clear the color buffer.

 voidglClearColorx(int red, int green, int blue, int alpha)
     Fixed-point version of glClearColor.
 voidglClearDepthf(float depth)
     Specify the clear value for the depth buffer.

glClearDepth specifies the depth value used by glClear to clear the depth buffer.

 voidglClearDepthx(int depth)
     Fixed-point version of glClearDepth.
 voidglClearStencil(int s)
     Specify the clear value for the stencil buffer.

glClearStencil specifies the index used by glClear to clear the stencil buffer.

 voidglClientActiveTexture(int texture)
     Select client-side active texture unit.

glClientActiveTexture selects the vertex array client state parameters to be modified by glTexCoordPointer, and enabled or disabled with glEnableClientState or glDisableClientState, respectively, when called with a parameter of GL_TEXTURE_COORD_ARRAY.

Notes

It is always the case that GL_TEXTUREi = GL_TEXTURE0 + i.

Errors

GL_INVALID_ENUM is generated if texture is not one of GL_TEXTUREi, where 0 <= i < GL_MAX_TEXTURE_UNITS.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_UNITS
Parameters:
  texture - Specifies which texture unit to make active.

 voidglColor4f(float red, float green, float blue, float alpha)
     Set the current color.

The GL stores a current four-valued RGBA color.

 voidglColor4x(int red, int green, int blue, int alpha)
     Fixed-point version of glColor.
 voidglColorMask(boolean red, boolean green, boolean blue, boolean alpha)
     Enable and disable writing of color buffer components.

glColorMask specifies whether the individual components in the color buffer can or cannot be written.

 voidglColorPointer(int size, int type, int stride, Buffer pointer)
     Define an array of colors.

glColorPointer specifies an array of color components to use when rendering.

 voidglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data)
     Specify a two-dimensional compressed texture image.

glCompressedTexImage2D defines a two-dimensional texture image in compressed format.

The supported compressed formats are paletted textures.

 voidglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data)
     Specify a two-dimensional compressed texture subimage.

glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional compressed texture image.

 voidglCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border)
     Specify a two-dimensional texture image with pixels from the color buffer.

glCopyTexImage2D defines a two-dimensional texture image with pixels from the color buffer.

The screen-aligned pixel rectangle with lower left corner at (x, y) and with a width of width + 2*border and a height of height + 2*border defines the texture array at the mipmap level specified by level.

 voidglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height)
     Specify a two-dimensional texture subimage with pixels from the color buffer.

glCopyTexSubImage2D replaces a rectangular portion of a two-dimensional texture image with pixels from the color buffer.

The screen-aligned pixel rectangle with lower left corner at (x, y) and with width width and height height replaces the portion of the texture array with x indices xoffset through xoffset + width - 1, inclusive, and y indices yoffset through yoffset + height - 1, inclusive, at the mipmap level specified by level.

The pixels in the rectangle are processed the same way as with glCopyTexImage2D.

glCopyTexSubImage2D requires that the internal format of the currently bound texture is such that color buffer components can be dropped during conversion to the internal format, but new components cannot be added.

 voidglCullFace(int mode)
     Specify whether front- or back-facing polygons are culled.

glCullFace specifies whether front- or back-facing polygons are culled (as specified by mode) when culling is enabled.

 voidglDeleteTextures(int n, int[] textures, int offset)
     Delete named textures.

glDeleteTextures deletes n textures named by the elements of the array textures.

 voidglDeleteTextures(int n, IntBuffer textures)
     Integer Buffer version of glDeleteTextures.
 voidglDepthFunc(int func)
     Specify the value used for depth buffer comparisons.

glDepthFunc specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer.

 voidglDepthMask(boolean flag)
     Enable or disable writing into the depth buffer.

glDepthMask specifies whether the depth buffer is enabled for writing.

 voidglDepthRangef(float zNear, float zFar)
     Specify mapping of depth values from normalized device coordinates to window coordinates.

After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes.

 voidglDepthRangex(int zNear, int zFar)
     Fixed-point version of glDepthRange.
 voidglDisable(int cap)
     Disable server-side GL capabilities.
 voidglDisableClientState(int array)
     Disable client-side capability.
 voidglDrawArrays(int mode, int first, int count)
     Render primitives from array data.

glDrawArrays specifies multiple geometric primitives with very few subroutine calls.

 voidglDrawElements(int mode, int count, int type, Buffer indices)
     Render primitives from array data.

glDrawElements specifies multiple geometric primitives with very few subroutine calls.

 voidglEnable(int cap)
     Enable server-side GL capabilities.

glEnable and glDisable enable and disable various capabilities.

 voidglEnableClientState(int array)
     Enable client-side capability.

glEnableClientState and glDisableClientState enable or disable individual client-side capabilities.

 voidglFinish()
     Block until all GL execution is complete.

glFinish does not return until the effects of all previously called GL commands are complete.

 voidglFlush()
     Force execution of GL commands in finite time.

Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself.

 voidglFogf(int pname, float param)
     Specify fog parameters.

If fog is enabled, fog affects rasterized geometry, bitmaps, and pixel blocks, but not buffer clear operations.

 voidglFogfv(int pname, float[] params, int offset)
     Specify fog parameters (array version).

If fog is enabled, fog affects rasterized geometry, bitmaps, and pixel blocks, but not buffer clear operations.

 voidglFogfv(int pname, FloatBuffer params)
     Floating-point Buffer version of glFog.
 voidglFogx(int pname, int param)
     Fixed-point version of glFog.
 voidglFogxv(int pname, int[] params, int offset)
     Fixed-point array version of glFog.
 voidglFogxv(int pname, IntBuffer params)
     Fixed-point Buffer version of glFog.
 voidglFrontFace(int mode)
     Define front- and back-facing polygons.

In a scene composed entirely of opaque closed surfaces, back-facing polygons are never visible.

 voidglFrustumf(float left, float right, float bottom, float top, float near, float far)
     Multiply the current matrix by a perspective matrix.

glFrustum describes a perspective matrix that produces a perspective projection.

 voidglFrustumx(int left, int right, int bottom, int top, int near, int far)
     Fixed-point version of glFrustum.
 voidglGenTextures(int n, int[] textures, int offset)
     Generate texture names.

glGenTextures returns n texture names in textures.

 voidglGenTextures(int n, IntBuffer textures)
     Integer Buffer version of glGenTextures.
 intglGetError()
     Return error information.

glGetError returns the value of the error flag.

 voidglGetIntegerv(int pname, int[] params, int offset)
     Return the value or values of a selected parameter.

glGet returns values for static state variables in GL.

 voidglGetIntegerv(int pname, IntBuffer params)
     Integer Buffer version of glGetIntegerv.
 StringglGetString(int name)
     Return a string describing the underlying GL implementation.
 voidglHint(int target, int mode)
     Specify implementation-specific hints.

Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints.

 voidglLightModelf(int pname, float param)
     Set the lighting model parameters.

glLightModel sets the lighting model parameter.

 voidglLightModelfv(int pname, float[] params, int offset)
     Set the lighting model parameters (array version).

glLightModel sets the lighting model parameter.

 voidglLightModelfv(int pname, FloatBuffer params)
     Floating-point Buffer version of glLightModel.
 voidglLightModelx(int pname, int param)
     Fixed-point version of glLightModel.
 voidglLightModelxv(int pname, int[] params, int offset)
     Fixed-point array version of glLightModel.
 voidglLightModelxv(int pname, IntBuffer params)
     Fixed-point Buffer version of glLightModel.
 voidglLightf(int light, int pname, float param)
     Set light source parameters.

glLight sets the values of individual light source parameters.

 voidglLightfv(int light, int pname, float[] params, int offset)
     Set light source parameters (array version).

glLight sets the values of individual light source parameters.

 voidglLightfv(int light, int pname, FloatBuffer params)
     Floating-point Buffer version of glLight.
 voidglLightx(int light, int pname, int param)
     Fixed-point version of glLight.
 voidglLightxv(int light, int pname, int[] params, int offset)
     Fixed-point array version of glLight.
 voidglLightxv(int light, int pname, IntBuffer params)
     Fixed-point Buffer version of glLight.
 voidglLineWidth(float width)
     Specify the width of rasterized lines.

glLineWidth specifies the rasterized width of both aliased and antialiased lines.

 voidglLineWidthx(int width)
     Fixed-point version of glLineWidth.
 voidglLoadIdentity()
     Replace the current matrix with the identity matrix.

glLoadIdentity replaces the current matrix with the identity matrix.

 voidglLoadMatrixf(float[] m, int offset)
     Replace the current matrix with the specified matrix.

glLoadMatrix replaces the current matrix with the one whose elements are specified by m.

 voidglLoadMatrixf(FloatBuffer m)
     Floating-point Buffer version of glLoadMatrix.
 voidglLoadMatrixx(int[] m, int offset)
     Fixed-point array version of glLoadMatrix.
 voidglLoadMatrixx(IntBuffer m)
     Fixed-point Buffer version of glLoadMatrix.
 voidglLogicOp(int opcode)
     Specify a logical pixel operation.

glLogicOp specifies a logical operation that, when enabled, is applied between the incoming color and the color at the corresponding location in the frame buffer.

 voidglMaterialf(int face, int pname, float param)
     Specify material parameters for the lighting model.

glMaterial assigns values to material parameters.

 voidglMaterialfv(int face, int pname, float[] params, int offset)
     Specify material parameters for the lighting model (array version).

glMaterial assigns values to material parameters.

 voidglMaterialfv(int face, int pname, FloatBuffer params)
     Floating-point Buffer version of glMaterial.
 voidglMaterialx(int face, int pname, int param)
     Fixed-point version of glMaterial.
 voidglMaterialxv(int face, int pname, int[] params, int offset)
     Fixed-point array version of glMaterial.
 voidglMaterialxv(int face, int pname, IntBuffer params)
     Fixed-point Buffer version of glMaterial.
 voidglMatrixMode(int mode)
     Specify which matrix is the current matrix.

glMatrixMode sets the current matrix mode.

 voidglMultMatrixf(float[] m, int offset)
     Multiply the current matrix with the specified matrix.

glMultMatrix multiplies the current matrix with the one specified using m, and replaces the current matrix with the product.

The current matrix is determined by the current matrix mode (see glMatrixMode).

 voidglMultMatrixf(FloatBuffer m)
     Floating-point Buffer version of glMultMatrix.
 voidglMultMatrixx(int[] m, int offset)
     Fixed-point array version of glMultMatrix.
 voidglMultMatrixx(IntBuffer m)
     Fixed-point Buffer version of glMultMatrix.
 voidglMultiTexCoord4f(int target, float s, float t, float r, float q)
     Set the current texture coordinates.

glMultiTexCoord specifies the four texture coordinates as (s, t, r, q).

The current texture coordinates are part of the data that is associated with each vertex.

Notes

It is always the case that GL_TEXTUREi = GL_TEXTURE0 + i.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_UNITS.
Parameters:
  target - Specifies texture unit whose coordinates should bemodified.

 voidglMultiTexCoord4x(int target, int s, int t, int r, int q)
     Fixed-point version of glMultiTexCoord.
 voidglNormal3f(float nx, float ny, float nz)
     Set the current normal vector.

The current normal is set to the given coordinates whenever glNormal is issued.

 voidglNormal3x(int nx, int ny, int nz)
     Fixed-point version of glNormal.
 voidglNormalPointer(int type, int stride, Buffer pointer)
     Define an array of normals.

glNormalPointer specifies the location and data of an array of normals to use when rendering.

 voidglOrthof(float left, float right, float bottom, float top, float near, float far)
     Multiply the current matrix with an orthographic matrix.

glOrtho describes a transformation that produces a parallel projection.

 voidglOrthox(int left, int right, int bottom, int top, int near, int far)
     Fixed-point version of glOrtho.
 voidglPixelStorei(int pname, int param)
     Set pixel storage modes.

glPixelStore sets pixel storage modes that affect the operation of subsequent glReadPixels as well as the unpacking of glTexImage2D, and glTexSubImage2D.

pname is a symbolic constant indicating the parameter to be set, and param is the new value.

 voidglPointSize(float size)
     Specify the diameter of rasterized points.

glPointSize specifies the rasterized diameter of both aliased and antialiased points.

 voidglPointSizex(int size)
     Fixed-point version of glPointSize.
 voidglPolygonOffset(float factor, float units)
     Set the scale and units used to calculate depth values.

When GL_POLYGON_OFFSET_FILL is enabled, each fragment's depth value will be offset after it is interpolated from the depth values of the appropriate vertices.

 voidglPolygonOffsetx(int factor, int units)
     Fixed-point version of glPolygonOffset.
 voidglPopMatrix()
     Pop the current matrix stack.
 voidglPushMatrix()
     Push the current matrix stack.

There is a stack of matrices for each of the matrix modes.

 voidglReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels)
     Read a block of pixels from the color buffer.

glReadPixels returns pixel data from the color buffer, starting with the pixel whose lower left corner is at location (x, y), into client memory starting at location pixels.

 voidglRotatef(float angle, float x, float y, float z)
     Multiply the current matrix by a rotation matrix.

glRotate produces a rotation of angle degrees around the vector (x, y, z) .

 voidglRotatex(int angle, int x, int y, int z)
     Fixed-point version of glRotate.
 voidglSampleCoverage(float value, boolean invert)
     Specify mask to modify multisampled pixel fragments.

glSampleCoverage defines a mask to modify the coverage of multisampled pixel fragments.

 voidglSampleCoveragex(int value, boolean invert)
     Fixed-point version of glSampleCoverage.
 voidglScalef(float x, float y, float z)
     Multiply the current matrix by a general scaling matrix.

glScale produces a nonuniform scaling along the x, y, and z axes.

 voidglScalex(int x, int y, int z)
     Fixed-point version of glScale.
 voidglScissor(int x, int y, int width, int height)
     Define the scissor box.

glScissor defines a rectangle, called the scissor box, in window coordinates.

 voidglShadeModel(int mode)
     Select flat or smooth shading.

GL primitives can have either flat or smooth shading.

 voidglStencilFunc(int func, int ref, int mask)
     Set function and reference value for stencil testing.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.

 voidglStencilMask(int mask)
     Control the writing of individual bits in the stencil planes.

glStencilMask controls the writing of individual bits in the stencil planes.

 voidglStencilOp(int fail, int zfail, int zpass)
     Set stencil test actions.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.

 voidglTexCoordPointer(int size, int type, int stride, Buffer pointer)
     Define an array of texture coordinates.

glTexCoordPointer specifies the location and data of an array of texture coordinates to use when rendering.

 voidglTexEnvf(int target, int pname, float param)
     Set texture environment parameters.

If target is GL_TEXTURE_ENV, then the following applies:

A texture environment specifies how texture values are interpreted when a fragment is textured.

 voidglTexEnvfv(int target, int pname, float[] params, int offset)
     Set texture environment parameters (array version).

A texture environment specifies how texture values are interpreted when a fragment is textured.

 voidglTexEnvfv(int target, int pname, FloatBuffer params)
     Floating-point Buffer version of glTexEnv.
 voidglTexEnvx(int target, int pname, int param)
     Fixed-point version of glTexEnv.
 voidglTexEnvxv(int target, int pname, int[] params, int offset)
     Fixed-point array version of glTexEnv.
 voidglTexEnvxv(int target, int pname, IntBuffer params)
     Fixed-point Buffer version of glTexEnv.
 voidglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels)
     Specify a two-dimensional texture image.

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled.

 voidglTexParameterf(int target, int pname, float param)
     Set texture parameters.

Texture mapping is a technique that applies an image onto an object's surface as if the image were a decal or cellophane shrink-wrap.

 voidglTexParameterx(int target, int pname, int param)
     Fixed-point version of glTexParameter.
 voidglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels)
     Specify a two-dimensional texture subimage.

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled.

 voidglTranslatef(float x, float y, float z)
     Multiply the current matrix by a translation matrix.
 voidglTranslatex(int x, int y, int z)
     Fixed-point version of glTranslate.
 voidglVertexPointer(int size, int type, int stride, Buffer pointer)
     Define an array of vertex coordinates.

glVertexPointer specifies the location and data of an array of vertex coordinates to use when rendering.

 voidglViewport(int x, int y, int width, int height)
     Set the viewport.

glViewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates.


Field Detail
GL_ADD
int GL_ADD(Code)
OpenGL ES 1.0 constant.



GL_ALIASED_LINE_WIDTH_RANGE
int GL_ALIASED_LINE_WIDTH_RANGE(Code)
OpenGL ES 1.0 constant.



GL_ALIASED_POINT_SIZE_RANGE
int GL_ALIASED_POINT_SIZE_RANGE(Code)
OpenGL ES 1.0 constant.



GL_ALPHA
int GL_ALPHA(Code)
OpenGL ES 1.0 constant.



GL_ALPHA_BITS
int GL_ALPHA_BITS(Code)
OpenGL ES 1.0 constant.



GL_ALPHA_TEST
int GL_ALPHA_TEST(Code)
OpenGL ES 1.0 constant.



GL_ALWAYS
int GL_ALWAYS(Code)
OpenGL ES 1.0 constant.



GL_AMBIENT
int GL_AMBIENT(Code)
OpenGL ES 1.0 constant.



GL_AMBIENT_AND_DIFFUSE
int GL_AMBIENT_AND_DIFFUSE(Code)
OpenGL ES 1.0 constant.



GL_AND
int GL_AND(Code)
OpenGL ES 1.0 constant.



GL_AND_INVERTED
int GL_AND_INVERTED(Code)
OpenGL ES 1.0 constant.



GL_AND_REVERSE
int GL_AND_REVERSE(Code)
OpenGL ES 1.0 constant.



GL_BACK
int GL_BACK(Code)
OpenGL ES 1.0 constant.



GL_BLEND
int GL_BLEND(Code)
OpenGL ES 1.0 constant.



GL_BLUE_BITS
int GL_BLUE_BITS(Code)
OpenGL ES 1.0 constant.



GL_BYTE
int GL_BYTE(Code)
OpenGL ES 1.0 constant.



GL_CCW
int GL_CCW(Code)
OpenGL ES 1.0 constant.



GL_CLAMP_TO_EDGE
int GL_CLAMP_TO_EDGE(Code)
OpenGL ES 1.0 constant.



GL_CLEAR
int GL_CLEAR(Code)
OpenGL ES 1.0 constant.



GL_COLOR_ARRAY
int GL_COLOR_ARRAY(Code)
OpenGL ES 1.0 constant.



GL_COLOR_BUFFER_BIT
int GL_COLOR_BUFFER_BIT(Code)
OpenGL ES 1.0 constant.



GL_COLOR_LOGIC_OP
int GL_COLOR_LOGIC_OP(Code)
OpenGL ES 1.0 constant.



GL_COLOR_MATERIAL
int GL_COLOR_MATERIAL(Code)
OpenGL ES 1.0 constant.



GL_COMPRESSED_TEXTURE_FORMATS
int GL_COMPRESSED_TEXTURE_FORMATS(Code)
OpenGL ES 1.0 constant.



GL_CONSTANT_ATTENUATION
int GL_CONSTANT_ATTENUATION(Code)
OpenGL ES 1.0 constant.



GL_COPY
int GL_COPY(Code)
OpenGL ES 1.0 constant.



GL_COPY_INVERTED
int GL_COPY_INVERTED(Code)
OpenGL ES 1.0 constant.



GL_CULL_FACE
int GL_CULL_FACE(Code)
OpenGL ES 1.0 constant.



GL_CW
int GL_CW(Code)
OpenGL ES 1.0 constant.



GL_DECAL
int GL_DECAL(Code)
OpenGL ES 1.0 constant.



GL_DECR
int GL_DECR(Code)
OpenGL ES 1.0 constant.



GL_DEPTH_BITS
int GL_DEPTH_BITS(Code)
OpenGL ES 1.0 constant.



GL_DEPTH_BUFFER_BIT
int GL_DEPTH_BUFFER_BIT(Code)
OpenGL ES 1.0 constant.



GL_DEPTH_TEST
int GL_DEPTH_TEST(Code)
OpenGL ES 1.0 constant.



GL_DIFFUSE
int GL_DIFFUSE(Code)
OpenGL ES 1.0 constant.



GL_DITHER
int GL_DITHER(Code)
OpenGL ES 1.0 constant.



GL_DONT_CARE
int GL_DONT_CARE(Code)
OpenGL ES 1.0 constant.



GL_DST_ALPHA
int GL_DST_ALPHA(Code)
OpenGL ES 1.0 constant.



GL_DST_COLOR
int GL_DST_COLOR(Code)
OpenGL ES 1.0 constant.



GL_EMISSION
int GL_EMISSION(Code)
OpenGL ES 1.0 constant.



GL_EQUAL
int GL_EQUAL(Code)
OpenGL ES 1.0 constant.



GL_EQUIV
int GL_EQUIV(Code)
OpenGL ES 1.0 constant.



GL_EXP
int GL_EXP(Code)
OpenGL ES 1.0 constant.



GL_EXP2
int GL_EXP2(Code)
OpenGL ES 1.0 constant.



GL_EXTENSIONS
int GL_EXTENSIONS(Code)
OpenGL ES 1.0 constant.



GL_FALSE
int GL_FALSE(Code)
OpenGL ES 1.0 constant.



GL_FASTEST
int GL_FASTEST(Code)
OpenGL ES 1.0 constant.



GL_FIXED
int GL_FIXED(Code)
OpenGL ES 1.0 constant.



GL_FLAT
int GL_FLAT(Code)
OpenGL ES 1.0 constant.



GL_FLOAT
int GL_FLOAT(Code)
OpenGL ES 1.0 constant.



GL_FOG
int GL_FOG(Code)
OpenGL ES 1.0 constant.



GL_FOG_COLOR
int GL_FOG_COLOR(Code)
OpenGL ES 1.0 constant.



GL_FOG_DENSITY
int GL_FOG_DENSITY(Code)
OpenGL ES 1.0 constant.



GL_FOG_END
int GL_FOG_END(Code)
OpenGL ES 1.0 constant.



GL_FOG_HINT
int GL_FOG_HINT(Code)
OpenGL ES 1.0 constant.



GL_FOG_MODE
int GL_FOG_MODE(Code)
OpenGL ES 1.0 constant.



GL_FOG_START
int GL_FOG_START(Code)
OpenGL ES 1.0 constant.



GL_FRONT
int GL_FRONT(Code)
OpenGL ES 1.0 constant.



GL_FRONT_AND_BACK
int GL_FRONT_AND_BACK(Code)
OpenGL ES 1.0 constant.



GL_GEQUAL
int GL_GEQUAL(Code)
OpenGL ES 1.0 constant.



GL_GREATER
int GL_GREATER(Code)
OpenGL ES 1.0 constant.



GL_GREEN_BITS
int GL_GREEN_BITS(Code)
OpenGL ES 1.0 constant.



GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES
int GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES(Code)
OpenGL ES 1.0 constant.



GL_IMPLEMENTATION_COLOR_READ_TYPE_OES
int GL_IMPLEMENTATION_COLOR_READ_TYPE_OES(Code)
OpenGL ES 1.0 constant.



GL_INCR
int GL_INCR(Code)
OpenGL ES 1.0 constant.



GL_INVALID_ENUM
int GL_INVALID_ENUM(Code)
OpenGL ES 1.0 constant.



GL_INVALID_OPERATION
int GL_INVALID_OPERATION(Code)
OpenGL ES 1.0 constant.



GL_INVALID_VALUE
int GL_INVALID_VALUE(Code)
OpenGL ES 1.0 constant.



GL_INVERT
int GL_INVERT(Code)
OpenGL ES 1.0 constant.



GL_KEEP
int GL_KEEP(Code)
OpenGL ES 1.0 constant.



GL_LEQUAL
int GL_LEQUAL(Code)
OpenGL ES 1.0 constant.



GL_LESS
int GL_LESS(Code)
OpenGL ES 1.0 constant.



GL_LIGHT0
int GL_LIGHT0(Code)
OpenGL ES 1.0 constant.



GL_LIGHT1
int GL_LIGHT1(Code)
OpenGL ES 1.0 constant.



GL_LIGHT2
int GL_LIGHT2(Code)
OpenGL ES 1.0 constant.



GL_LIGHT3
int GL_LIGHT3(Code)
OpenGL ES 1.0 constant.



GL_LIGHT4
int GL_LIGHT4(Code)
OpenGL ES 1.0 constant.



GL_LIGHT5
int GL_LIGHT5(Code)
OpenGL ES 1.0 constant.



GL_LIGHT6
int GL_LIGHT6(Code)
OpenGL ES 1.0 constant.



GL_LIGHT7
int GL_LIGHT7(Code)
OpenGL ES 1.0 constant.



GL_LIGHTING
int GL_LIGHTING(Code)
OpenGL ES 1.0 constant.



GL_LIGHT_MODEL_AMBIENT
int GL_LIGHT_MODEL_AMBIENT(Code)
OpenGL ES 1.0 constant.



GL_LIGHT_MODEL_TWO_SIDE
int GL_LIGHT_MODEL_TWO_SIDE(Code)
OpenGL ES 1.0 constant.



GL_LINEAR
int GL_LINEAR(Code)
OpenGL ES 1.0 constant.



GL_LINEAR_ATTENUATION
int GL_LINEAR_ATTENUATION(Code)
OpenGL ES 1.0 constant.



GL_LINEAR_MIPMAP_LINEAR
int GL_LINEAR_MIPMAP_LINEAR(Code)
OpenGL ES 1.0 constant.



GL_LINEAR_MIPMAP_NEAREST
int GL_LINEAR_MIPMAP_NEAREST(Code)
OpenGL ES 1.0 constant.



GL_LINES
int GL_LINES(Code)
OpenGL ES 1.0 constant.



GL_LINE_LOOP
int GL_LINE_LOOP(Code)
OpenGL ES 1.0 constant.



GL_LINE_SMOOTH
int GL_LINE_SMOOTH(Code)
OpenGL ES 1.0 constant.



GL_LINE_SMOOTH_HINT
int GL_LINE_SMOOTH_HINT(Code)
OpenGL ES 1.0 constant.



GL_LINE_STRIP
int GL_LINE_STRIP(Code)
OpenGL ES 1.0 constant.



GL_LUMINANCE
int GL_LUMINANCE(Code)
OpenGL ES 1.0 constant.



GL_LUMINANCE_ALPHA
int GL_LUMINANCE_ALPHA(Code)
OpenGL ES 1.0 constant.



GL_MAX_ELEMENTS_INDICES
int GL_MAX_ELEMENTS_INDICES(Code)
OpenGL ES 1.0 constant.



GL_MAX_ELEMENTS_VERTICES
int GL_MAX_ELEMENTS_VERTICES(Code)
OpenGL ES 1.0 constant.



GL_MAX_LIGHTS
int GL_MAX_LIGHTS(Code)
OpenGL ES 1.0 constant.



GL_MAX_MODELVIEW_STACK_DEPTH
int GL_MAX_MODELVIEW_STACK_DEPTH(Code)
OpenGL ES 1.0 constant.



GL_MAX_PROJECTION_STACK_DEPTH
int GL_MAX_PROJECTION_STACK_DEPTH(Code)
OpenGL ES 1.0 constant.



GL_MAX_TEXTURE_SIZE
int GL_MAX_TEXTURE_SIZE(Code)
OpenGL ES 1.0 constant.



GL_MAX_TEXTURE_STACK_DEPTH
int GL_MAX_TEXTURE_STACK_DEPTH(Code)
OpenGL ES 1.0 constant.



GL_MAX_TEXTURE_UNITS
int GL_MAX_TEXTURE_UNITS(Code)
OpenGL ES 1.0 constant.



GL_MAX_VIEWPORT_DIMS
int GL_MAX_VIEWPORT_DIMS(Code)
OpenGL ES 1.0 constant.



GL_MODELVIEW
int GL_MODELVIEW(Code)
OpenGL ES 1.0 constant.



GL_MODULATE
int GL_MODULATE(Code)
OpenGL ES 1.0 constant.



GL_MULTISAMPLE
int GL_MULTISAMPLE(Code)
OpenGL ES 1.0 constant.



GL_NAND
int GL_NAND(Code)
OpenGL ES 1.0 constant.



GL_NEAREST
int GL_NEAREST(Code)
OpenGL ES 1.0 constant.



GL_NEAREST_MIPMAP_LINEAR
int GL_NEAREST_MIPMAP_LINEAR(Code)
OpenGL ES 1.0 constant.



GL_NEAREST_MIPMAP_NEAREST
int GL_NEAREST_MIPMAP_NEAREST(Code)
OpenGL ES 1.0 constant.



GL_NEVER
int GL_NEVER(Code)
OpenGL ES 1.0 constant.



GL_NICEST
int GL_NICEST(Code)
OpenGL ES 1.0 constant.



GL_NOOP
int GL_NOOP(Code)
OpenGL ES 1.0 constant.



GL_NOR
int GL_NOR(Code)
OpenGL ES 1.0 constant.



GL_NORMALIZE
int GL_NORMALIZE(Code)
OpenGL ES 1.0 constant.



GL_NORMAL_ARRAY
int GL_NORMAL_ARRAY(Code)
OpenGL ES 1.0 constant.



GL_NOTEQUAL
int GL_NOTEQUAL(Code)
OpenGL ES 1.0 constant.



GL_NO_ERROR
int GL_NO_ERROR(Code)
OpenGL ES 1.0 constant.



GL_NUM_COMPRESSED_TEXTURE_FORMATS
int GL_NUM_COMPRESSED_TEXTURE_FORMATS(Code)
OpenGL ES 1.0 constant.



GL_ONE
int GL_ONE(Code)
OpenGL ES 1.0 constant.



GL_ONE_MINUS_DST_ALPHA
int GL_ONE_MINUS_DST_ALPHA(Code)
OpenGL ES 1.0 constant.



GL_ONE_MINUS_DST_COLOR
int GL_ONE_MINUS_DST_COLOR(Code)
OpenGL ES 1.0 constant.



GL_ONE_MINUS_SRC_ALPHA
int GL_ONE_MINUS_SRC_ALPHA(Code)
OpenGL ES 1.0 constant.



GL_ONE_MINUS_SRC_COLOR
int GL_ONE_MINUS_SRC_COLOR(Code)
OpenGL ES 1.0 constant.



GL_OR
int GL_OR(Code)
OpenGL ES 1.0 constant.



GL_OR_INVERTED
int GL_OR_INVERTED(Code)
OpenGL ES 1.0 constant.



GL_OR_REVERSE
int GL_OR_REVERSE(Code)
OpenGL ES 1.0 constant.



GL_OUT_OF_MEMORY
int GL_OUT_OF_MEMORY(Code)
OpenGL ES 1.0 constant.



GL_PACK_ALIGNMENT
int GL_PACK_ALIGNMENT(Code)
OpenGL ES 1.0 constant.



GL_PALETTE4_R5_G6_B5_OES
int GL_PALETTE4_R5_G6_B5_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE4_RGB5_A1_OES
int GL_PALETTE4_RGB5_A1_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE4_RGB8_OES
int GL_PALETTE4_RGB8_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE4_RGBA4_OES
int GL_PALETTE4_RGBA4_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE4_RGBA8_OES
int GL_PALETTE4_RGBA8_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE8_R5_G6_B5_OES
int GL_PALETTE8_R5_G6_B5_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE8_RGB5_A1_OES
int GL_PALETTE8_RGB5_A1_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE8_RGB8_OES
int GL_PALETTE8_RGB8_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE8_RGBA4_OES
int GL_PALETTE8_RGBA4_OES(Code)
OpenGL ES 1.0 constant.



GL_PALETTE8_RGBA8_OES
int GL_PALETTE8_RGBA8_OES(Code)
OpenGL ES 1.0 constant.



GL_PERSPECTIVE_CORRECTION_HINT
int GL_PERSPECTIVE_CORRECTION_HINT(Code)
OpenGL ES 1.0 constant.



GL_POINTS
int GL_POINTS(Code)
OpenGL ES 1.0 constant.



GL_POINT_SMOOTH
int GL_POINT_SMOOTH(Code)
OpenGL ES 1.0 constant.



GL_POINT_SMOOTH_HINT
int GL_POINT_SMOOTH_HINT(Code)
OpenGL ES 1.0 constant.



GL_POLYGON_OFFSET_FILL
int GL_POLYGON_OFFSET_FILL(Code)
OpenGL ES 1.0 constant.



GL_POLYGON_SMOOTH_HINT
int GL_POLYGON_SMOOTH_HINT(Code)
OpenGL ES 1.0 constant.



GL_POSITION
int GL_POSITION(Code)
OpenGL ES 1.0 constant.



GL_PROJECTION
int GL_PROJECTION(Code)
OpenGL ES 1.0 constant.



GL_QUADRATIC_ATTENUATION
int GL_QUADRATIC_ATTENUATION(Code)
OpenGL ES 1.0 constant.



GL_RED_BITS
int GL_RED_BITS(Code)
OpenGL ES 1.0 constant.



GL_RENDERER
int GL_RENDERER(Code)
OpenGL ES 1.0 constant.



GL_REPEAT
int GL_REPEAT(Code)
OpenGL ES 1.0 constant.



GL_REPLACE
int GL_REPLACE(Code)
OpenGL ES 1.0 constant.



GL_RESCALE_NORMAL
int GL_RESCALE_NORMAL(Code)
OpenGL ES 1.0 constant.



GL_RGB
int GL_RGB(Code)
OpenGL ES 1.0 constant.



GL_RGBA
int GL_RGBA(Code)
OpenGL ES 1.0 constant.



GL_SAMPLE_ALPHA_TO_COVERAGE
int GL_SAMPLE_ALPHA_TO_COVERAGE(Code)
OpenGL ES 1.0 constant.



GL_SAMPLE_ALPHA_TO_ONE
int GL_SAMPLE_ALPHA_TO_ONE(Code)
OpenGL ES 1.0 constant.



GL_SAMPLE_COVERAGE
int GL_SAMPLE_COVERAGE(Code)
OpenGL ES 1.0 constant.



GL_SCISSOR_TEST
int GL_SCISSOR_TEST(Code)
OpenGL ES 1.0 constant.



GL_SET
int GL_SET(Code)
OpenGL ES 1.0 constant.



GL_SHININESS
int GL_SHININESS(Code)
OpenGL ES 1.0 constant.



GL_SHORT
int GL_SHORT(Code)
OpenGL ES 1.0 constant.



GL_SMOOTH
int GL_SMOOTH(Code)
OpenGL ES 1.0 constant.



GL_SMOOTH_LINE_WIDTH_RANGE
int GL_SMOOTH_LINE_WIDTH_RANGE(Code)
OpenGL ES 1.0 constant.



GL_SMOOTH_POINT_SIZE_RANGE
int GL_SMOOTH_POINT_SIZE_RANGE(Code)
OpenGL ES 1.0 constant.



GL_SPECULAR
int GL_SPECULAR(Code)
OpenGL ES 1.0 constant.



GL_SPOT_CUTOFF
int GL_SPOT_CUTOFF(Code)
OpenGL ES 1.0 constant.



GL_SPOT_DIRECTION
int GL_SPOT_DIRECTION(Code)
OpenGL ES 1.0 constant.



GL_SPOT_EXPONENT
int GL_SPOT_EXPONENT(Code)
OpenGL ES 1.0 constant.



GL_SRC_ALPHA
int GL_SRC_ALPHA(Code)
OpenGL ES 1.0 constant.



GL_SRC_ALPHA_SATURATE
int GL_SRC_ALPHA_SATURATE(Code)
OpenGL ES 1.0 constant.



GL_SRC_COLOR
int GL_SRC_COLOR(Code)
OpenGL ES 1.0 constant.



GL_STACK_OVERFLOW
int GL_STACK_OVERFLOW(Code)
OpenGL ES 1.0 constant.



GL_STACK_UNDERFLOW
int GL_STACK_UNDERFLOW(Code)
OpenGL ES 1.0 constant.



GL_STENCIL_BITS
int GL_STENCIL_BITS(Code)
OpenGL ES 1.0 constant.



GL_STENCIL_BUFFER_BIT
int GL_STENCIL_BUFFER_BIT(Code)
OpenGL ES 1.0 constant.



GL_STENCIL_TEST
int GL_STENCIL_TEST(Code)
OpenGL ES 1.0 constant.



GL_SUBPIXEL_BITS
int GL_SUBPIXEL_BITS(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE
int GL_TEXTURE(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE0
int GL_TEXTURE0(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE1
int GL_TEXTURE1(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE10
int GL_TEXTURE10(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE11
int GL_TEXTURE11(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE12
int GL_TEXTURE12(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE13
int GL_TEXTURE13(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE14
int GL_TEXTURE14(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE15
int GL_TEXTURE15(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE16
int GL_TEXTURE16(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE17
int GL_TEXTURE17(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE18
int GL_TEXTURE18(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE19
int GL_TEXTURE19(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE2
int GL_TEXTURE2(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE20
int GL_TEXTURE20(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE21
int GL_TEXTURE21(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE22
int GL_TEXTURE22(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE23
int GL_TEXTURE23(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE24
int GL_TEXTURE24(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE25
int GL_TEXTURE25(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE26
int GL_TEXTURE26(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE27
int GL_TEXTURE27(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE28
int GL_TEXTURE28(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE29
int GL_TEXTURE29(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE3
int GL_TEXTURE3(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE30
int GL_TEXTURE30(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE31
int GL_TEXTURE31(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE4
int GL_TEXTURE4(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE5
int GL_TEXTURE5(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE6
int GL_TEXTURE6(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE7
int GL_TEXTURE7(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE8
int GL_TEXTURE8(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE9
int GL_TEXTURE9(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_2D
int GL_TEXTURE_2D(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_COORD_ARRAY
int GL_TEXTURE_COORD_ARRAY(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_ENV
int GL_TEXTURE_ENV(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_ENV_COLOR
int GL_TEXTURE_ENV_COLOR(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_ENV_MODE
int GL_TEXTURE_ENV_MODE(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_MAG_FILTER
int GL_TEXTURE_MAG_FILTER(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_MIN_FILTER
int GL_TEXTURE_MIN_FILTER(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_WRAP_S
int GL_TEXTURE_WRAP_S(Code)
OpenGL ES 1.0 constant.



GL_TEXTURE_WRAP_T
int GL_TEXTURE_WRAP_T(Code)
OpenGL ES 1.0 constant.



GL_TRIANGLES
int GL_TRIANGLES(Code)
OpenGL ES 1.0 constant.



GL_TRIANGLE_FAN
int GL_TRIANGLE_FAN(Code)
OpenGL ES 1.0 constant.



GL_TRIANGLE_STRIP
int GL_TRIANGLE_STRIP(Code)
OpenGL ES 1.0 constant.



GL_TRUE
int GL_TRUE(Code)
OpenGL ES 1.0 constant.



GL_UNPACK_ALIGNMENT
int GL_UNPACK_ALIGNMENT(Code)
OpenGL ES 1.0 constant.



GL_UNSIGNED_BYTE
int GL_UNSIGNED_BYTE(Code)
OpenGL ES 1.0 constant.



GL_UNSIGNED_SHORT
int GL_UNSIGNED_SHORT(Code)
OpenGL ES 1.0 constant.



GL_UNSIGNED_SHORT_4_4_4_4
int GL_UNSIGNED_SHORT_4_4_4_4(Code)
OpenGL ES 1.0 constant.



GL_UNSIGNED_SHORT_5_5_5_1
int GL_UNSIGNED_SHORT_5_5_5_1(Code)
OpenGL ES 1.0 constant.



GL_UNSIGNED_SHORT_5_6_5
int GL_UNSIGNED_SHORT_5_6_5(Code)
OpenGL ES 1.0 constant.



GL_VENDOR
int GL_VENDOR(Code)
OpenGL ES 1.0 constant.



GL_VERSION
int GL_VERSION(Code)
OpenGL ES 1.0 constant.



GL_VERTEX_ARRAY
int GL_VERTEX_ARRAY(Code)
OpenGL ES 1.0 constant.



GL_XOR
int GL_XOR(Code)
OpenGL ES 1.0 constant.



GL_ZERO
int GL_ZERO(Code)
OpenGL ES 1.0 constant.





Method Detail
glActiveTexture
void glActiveTexture(int texture)(Code)
Select server-side active texture unit.

glActiveTexture selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation dependent, it must be at least 1 for OpenGL ES 1.0, or 2 for OpenGL ES 1.1.

Notes

It is always the case that GL_TEXTUREi = GL_TEXTURE0 + i.

A texture unit consists of the texture enable state, texture matrix stack, texture environment and currently bound texture. Modifying any of these states has an effect only on the active texture unit.

Vertex arrays are client-side GL resources, which are selected by the glClientActiveTexture routine.

Errors

GL_INVALID_ENUM is generated if texture is not one of GL_TEXTUREi, where 0 <= i < GL_MAX_TEXTURE_UNITS.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_UNITS.
Parameters:
  texture - Specifies which texture unit to make active. Thenumber of texture units is implementation dependent, but must beat least one (for 1.0) or two (for 1.1). texturemust be one of GL_TEXTUREi, where 0 <=i < GL_MAX_TEXTURE_UNITS, which is animplementation-dependent value. The intial value isGL_TEXTURE0.




glAlphaFunc
void glAlphaFunc(int func, float ref)(Code)
Specify the alpha test function.

The alpha test discards fragments depending on the outcome of a comparison between an incoming fragment's alpha value and a constant reference value. glAlphaFunc specifies the reference value and the comparison function. The comparison is performed only if alpha testing is enabled. To enable and disable alpha testing, call glEnable and glDisable with argument GL_ALPHA_TEST. Alpha testing is initially disabled.

func and ref specify the conditions under which the pixel is drawn. The incoming alpha value is compared to ref using the function specified by func. If the value passes the comparison, the incoming fragment is drawn if it also passes subsequent stencil and depth buffer tests. If the value fails the comparison, no change is made to the frame buffer at that pixel location. The comparison functions are as follows:

  • GL_NEVER
  • Never passes.
  • GL_LESS
  • Passes if the incoming alpha value is less than the reference value.
  • GL_EQUAL
  • Passes if the incoming alpha value is equal to the reference value.
  • GL_LEQUAL
  • Passes if the incoming alpha value is less than or equal to the reference value.
  • GL_GREATER
  • Passes if the incoming alpha value is greater than the reference value.
  • GL_NOTEQUAL
  • Passes if the incoming alpha value is not equal to the reference value.
  • GL_GEQUAL
  • Passes if the incoming alpha value is greater than or equal to the reference value.
  • GL_ALWAYS
  • Always passes (initial value).

glAlphaFunc operates on all pixel write operations, including those resulting from the scan conversion of points, lines, and polygons. glAlphaFunc does not affect glClear.

Errors

GL_INVALID_ENUM is generated if func is not an accepted value.
Parameters:
  func - Specifies the alpha comparison function. Symbolicconstants GL_NEVER, GL_LESS,GL_EQUAL, GL_LEQUAL,GL_GREATER, GL_NOTEQUAL,GL_GEQUAL, and GL_ALWAYS are accepted. Theinitial value is GL_ALWAYS.
Parameters:
  ref - Specifies the reference value that incoming alphavalues are compared to. This value is clamped to the range[0, 1], where 0 represents the lowest possible alphavalue and 1 the highest possible value. The initial referencevalue is 0.




glAlphaFuncx
void glAlphaFuncx(int func, int ref)(Code)
Fixed-point version of glAlphaFunc.
See Also:   GL10.glAlphaFunc



glBindTexture
void glBindTexture(int target, int texture)(Code)
Bind a named texture to a texturing target.

glBindTexture lets you create or use a named texture. Calling glBindTexture with target set to GL_TEXTURE_2D, and texture set to the name of the new texture binds the texture name to the target. When a texture is bound to a target, the previous binding for that target is automatically broken.

Texture names are unsigned integers. The value 0 is reserved to represent the default texture for each texture target. Texture names and the corresponding texture contents are local to the shared texture-object space (see eglCreateContext) of the current GL rendering context.

You may use glGenTextures to generate a set of new texture names.

While a texture is bound, GL operations on the target to which it is bound affect the bound texture. If texture mapping of the dimensionality of the target to which a texture is bound is active, the bound texture is used. In effect, the texture targets become aliases for the textures currently bound to them, and the texture name 0 refers to the default textures that were bound to them at initialization.

A texture binding created with glBindTexture remains active until a different texture is bound to the same target, or until the bound texture is deleted with glDeleteTextures.

Once created, a named texture may be re-bound to the target of the matching dimensionality as often as needed. It is usually much faster to use glBindTexture to bind an existing named texture to one of the texture targets than it is to reload the texture image using glTexImage2D.

Errors

GL_INVALID_ENUM is generated if target is not one of the allowable values.
Parameters:
  target - Specifies the target to which the texture isbound. Must be GL_TEXTURE_2D.
Parameters:
  texture - Specifies the name of a texture.




glBlendFunc
void glBlendFunc(int sfactor, int dfactor)(Code)
Specify pixel arithmetic.

Pixels can be drawn using a function that blends the incoming (source) values with the values that are already in the color buffer (the destination values). Use glEnable and glDisable with argument GL_BLEND to enable and disable blending. Blending is initially disabled.

glBlendFunc defines the operation of blending when it is enabled. sfactor specifies which of eleven methods is used to scale the source color components. dfactor specifies which of ten methods is used to scale the destination color components. The eleven possible methods are described in the following table. Each method defines four scale factors, one each for red, green, blue, and alpha.

In the table and in subsequent equations, source and destination color components are referred to as (Rs, Gs, Bs, As) and (Rd, Gd, Bd, Ad). They are understood to have integer values between 0 and (kR, kG, kB, kA), where

 kc = 2mc - 1
 
and (mR, mG, mB, mA) is the number of red, green, blue, and alpha bitplanes.

Source and destination scale factors are referred to as (sR, sG, sB, sA) and (dR, dG, dB, dA). The scale factors described in the table, denoted (fR, fG, fB, fA), represent either source or destination factors. All scale factors have range [0, 1].

 Parameter               (fR, fG, fB, fA)
 GL_ZERO                 (0, 0, 0, 0)
 GL_ONE                  (1, 1, 1, 1)
 GL_SRC_COLOR            (Rs/kR, Gs/kG, Bs/kB, As/kA )
 GL_ONE_MINUS_SRC_COLOR  (1, 1, 1, 1) - (Rs/kR, Gs/kG, Bs/kB, As/kA)
 GL_DST_COLOR            (Rd/kR, Gd/kG, Bd/kB, Ad/kA )
 GL_ONE_MINUS_DST_COLOR  (1, 1, 1, 1) - (Rd/kR, Gd/kG, Bd/kB, Ad/kA)
 GL_SRC_ALPHA            (As/kA, As/kA, As/kA, As/kA )
 GL_ONE_MINUS_SRC_ALPHA  (1, 1, 1, 1) - (As/kA, As/kA, As/kA, As/kA)
 GL_DST_ALPHA            (Ad/kA, Ad/kA, Ad/kA, Ad/kA )
 GL_ONE_MINUS_DST_ALPHA  (1, 1, 1, 1) - (Ad/kA, Ad/kA, Ad/kA, Ad/kA)
 GL_SRC_ALPHA_SATURATE   (i, i, i, 1)
 

In the table,

 i = min(As, kA - Ad) / kA
 

To determine the blended values of a pixel, the system uses the following equations:

 Rd = min( kR, Rs sR + Rd dR )
 Gd = min( kG, Gs sG + Gd dG )
 Bd = min( kB, Bs sB + Bd dB )
 Ad = min( kA, As sA + Ad dA )
 

Despite the apparent precision of the above equations, blending arithmetic is not exactly specified, because blending operates with imprecise integer color values. However, a blend factor that should be equal to 1 is guaranteed not to modify its multiplicand, and a blend factor equal to 0 reduces its multiplicand to 0. For example, when sfactor is GL_SRC_ALPHA, dfactor is GL_ONE_MINUS_SRC_ALPHA, and As is equal to kA, the equations reduce to simple replacement:

 Rd = Rs
 Gd = Gs
 Bd = Bs
 Ad = As
 

glBlendFunc operates on all pixel write operations, including the scan conversion of points, lines, and polygons. glBlendFunc does not affect glClear.

Examples

Transparency is best implemented using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) with primitives sorted from farthest to nearest. Note that this transparency calculation does not require the presence of alpha bitplanes in the color buffer.

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) is also useful for rendering antialiased points and lines.

Notes

Incoming (source) alpha is correctly thought of as a material opacity, ranging from 1.0 (kA), representing complete opacity, to 0.0 (0), representing complete transparency.

Errors

GL_INVALID_ENUM is generated if either sfactor or dfactor is not an accepted value.
Parameters:
  sfactor - Specifies how the red, green, blue, and alphasource blending factors are computed. The following symbolicconstants are accepted: GL_ZERO,GL_ONE, GL_SRC_COLOR (1.1 only),GL_ONE_MINUS_SRC_COLOR (1.1 only),GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR,GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA,and GL_SRC_ALPHA_SATURATE. The initial value isGL_ONE.
Parameters:
  dfactor - Specifies how the red, green, blue, and alphadestination blending factors are computed. The following symbolicconstants are accepted: GL_ZERO,GL_ONE, GL_SRC_COLOR,GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR(1.1 only), GL_ONE_MINUS_DST_COLOR (1.1 only),GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,GL_DST_ALPHA, andGL_ONE_MINUS_DST_ALPHA. The initial value isGL_ZERO.




glClear
void glClear(int mask)(Code)
Clear buffers to preset values.

glClear sets the bitplane area of the window to values previously selected by glClearColor, glClearDepth, and glClearStencil.

The pixel ownership test, the scissor test, dithering, and the color buffer masks affect the operation of glClear. The scissor box bounds the cleared region. Alpha function, blend function, logical operation, stenciling, texture mapping, and depth-buffering are ignored by glClear.

glClear takes a single argument that is the bitwise OR of several values indicating which buffer is to be cleared.

The values are as follows:

  • GL_COLOR_BUFFER_BIT
  • Indicates the color buffer.
  • GL_DEPTH_BUFFER_BIT
  • Indicates the depth buffer.
  • GL_STENCIL_BUFFER_BIT
  • Indicates the stencil buffer.

The value to which each buffer is cleared depends on the setting of the clear value for that buffer.

Notes

If a buffer is not present, then a glClear directed at that buffer has no effect.

Errors

GL_INVALID_VALUE is generated if any bit other than the defined bits is set in mask.
Parameters:
  mask - Bitwise OR of masks that indicate the buffers to becleared. Valid masks are GL_COLOR_BUFFER_BIT,GL_DEPTH_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT.




glClearColor
void glClearColor(float red, float green, float blue, float alpha)(Code)
Specify clear values for the color buffer.

glClearColor specifies the red, green, blue, and alpha values used by glClear to clear the color buffer. Values specified by glClearColor are clamped to the range [0, 1].
Parameters:
  red - Specifies the red value used when the color buffer iscleared. The initial value is 0.
Parameters:
  green - Specifies the green value used when the color bufferis cleared. The initial value is 0.
Parameters:
  blue - Specifies the blue value used when the color buffer iscleared. The initial value is 0.
Parameters:
  alpha - Specifies the alpha value used when the color bufferis cleared. The initial value is 0.




glClearColorx
void glClearColorx(int red, int green, int blue, int alpha)(Code)
Fixed-point version of glClearColor.
See Also:   GL10.glClearColor



glClearDepthf
void glClearDepthf(float depth)(Code)
Specify the clear value for the depth buffer.

glClearDepth specifies the depth value used by glClear to clear the depth buffer. Values specified by glClearDepth are clamped to the range [0, 1].
Parameters:
  depth - Specifies the depth value used when the depth bufferis cleared. The initial value is 1.




glClearDepthx
void glClearDepthx(int depth)(Code)
Fixed-point version of glClearDepth.
See Also:   GL10.glClearDepthf



glClearStencil
void glClearStencil(int s)(Code)
Specify the clear value for the stencil buffer.

glClearStencil specifies the index used by glClear to clear the stencil buffer. s is masked with 2^m - 1, where m is the number of bits in the stencil buffer.

Associated Gets

glGetIntegerv with argument GL_STENCIL_BITS
Parameters:
  s - Specifies the index used when the stencil buffer iscleared. The initial value is 0.




glClientActiveTexture
void glClientActiveTexture(int texture)(Code)
Select client-side active texture unit.

glClientActiveTexture selects the vertex array client state parameters to be modified by glTexCoordPointer, and enabled or disabled with glEnableClientState or glDisableClientState, respectively, when called with a parameter of GL_TEXTURE_COORD_ARRAY.

Notes

It is always the case that GL_TEXTUREi = GL_TEXTURE0 + i.

Errors

GL_INVALID_ENUM is generated if texture is not one of GL_TEXTUREi, where 0 <= i < GL_MAX_TEXTURE_UNITS.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_UNITS
Parameters:
  texture - Specifies which texture unit to make active. Thenumber of texture units is implementation dependent, but must beat least one (for 1.0), or two (for 1.1). texturemust be one of GL_TEXTUREi, 0 <=i < GL_MAX_TEXTURE_UNITS, which is animplementation-dependent value. The initial value isGL_TEXTURE0.




glColor4f
void glColor4f(float red, float green, float blue, float alpha)(Code)
Set the current color.

The GL stores a current four-valued RGBA color. glColor sets a new four-valued RGBA color.

Current color values are stored in fixed-point or floating-point. In case the values are stored in floating-point, the mantissa and exponent sizes are unspecified.

Neither fixed-point nor floating-point values are clamped to the range [0, 1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into the color buffer.
Parameters:
  red - Specifies a new red value for the current color. Theinitial value is 1.
Parameters:
  green - Specifies a new green value for the current color. Theinitial value is 1.
Parameters:
  blue - Specifies a new blue value for the current color. Theinitial value is 1.
Parameters:
  alpha - Specifies a new alpha value for the current color. Theinitial value is 1.




glColor4x
void glColor4x(int red, int green, int blue, int alpha)(Code)
Fixed-point version of glColor.
See Also:   GL10.glColor4f



glColorMask
void glColorMask(boolean red, boolean green, boolean blue, boolean alpha)(Code)
Enable and disable writing of color buffer components.

glColorMask specifies whether the individual components in the color buffer can or cannot be written. If red is false, for example, no change is made to the red component of any pixel in the color buffer, regardless of the drawing operation attempted, including glClear.

Changes to individual bits of components cannot be controlled. Rather, changes are either enabled or disabled for entire color components.
Parameters:
  red - Specifies whether red can or cannot be written intothe color buffer. The initial value is true, indicatingthat the color component can be written.
Parameters:
  green - Specifies whether green can or cannot be written intothe color buffer. The initial value is true, indicatingthat the color component can be written.
Parameters:
  blue - Specifies whether blue can or cannot be written intothe color buffer. The initial value is true, indicatingthat the color component can be written.
Parameters:
  alpha - Specifies whether alpha can or cannot be writteninto the color buffer. The initial value is true,indicating that the color component can be written.




glColorPointer
void glColorPointer(int size, int type, int stride, Buffer pointer)(Code)
Define an array of colors.

glColorPointer specifies an array of color components to use when rendering. size specifies the number of components per color, and must be 4. type specifies the data type of each color component, and stride specifies the byte stride from one color to the next allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations.)

When a color array is specified, size, type, stride, and pointer are saved as client-side state.

If the color array is enabled, it is used when glDrawArrays, or glDrawElements is called. To enable and disable the color array, call glEnableClientState and glDisableClientState with the argument GL_COLOR_ARRAY. The color array is initially disabled and isn't accessed when glDrawArrays or glDrawElements is called.

Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes.

Setting pointer to null releases any previously set Buffer.

Notes

glColorPointer is typically implemented on the client side.

Errors

GL_INVALID_VALUE is generated if size is not 4.

GL_INVALID_ENUM is generated if type is not an accepted value.

GL_INVALID_VALUE is generated if stride is negative.

The pointer argument must be a direct buffer with a type matching that specified by the type argument.
Parameters:
  size - Specifies the number of components per color. Must be4. The initial value is 4.
Parameters:
  type - Specifies the data type of each color component inthe array. Symbolic constants GL_UNSIGNED_BYTE,GL_FIXED, and GL_FLOAT areaccepted. The initial value is GL_FLOAT.
Parameters:
  stride - Specifies the byte offset between consecutivecolors. If stride is 0, the colors are understood tobe tightly packed in the array. The initial value is 0.
Parameters:
  pointer - Specifies a Buffer containing thecolors.
exception:
  IllegalStateException - if OpenGL ES 1.1 is being used andVBOs are enabled.
exception:
  IllegalArgumentException - if pointer isnull.
exception:
  IllegalArgumentException - if pointer isnot direct.




glCompressedTexImage2D
void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data)(Code)
Specify a two-dimensional compressed texture image.

glCompressedTexImage2D defines a two-dimensional texture image in compressed format.

The supported compressed formats are paletted textures. The layout of the compressed image is a palette followed by multiple mip-levels of texture indices used for lookup into the palette. The palette format can be one of R5_G6_B5, RGBA4, RGB5_A1, RGB8, or RGBA8. The texture indices can have a resolution of 4 or 8 bits. As a result, the number of palette entries is either 16 or 256. If level is 0, only one mip-level of texture indices is described in data. Otherwise, the negative value of level specifies up to which mip-level the texture indices are described. A possibly remaining pad nibble (half byte) for the lowest resolution mip-level is ignored.

Notes

glPixelStore has no effect on compressed texture images.

glCompressedTexImage2D specifies the two-dimensional texture for the currently bound texture, specified with glBindTexture, and the current texture unit, specified with glActiveTexture.

Errors

GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D.

GL_INVALID_VALUE may be generated if level is greater than 0 or the absolute value of level is greater than log_2(max), where max is the returned value of GL_MAX_TEXTURE_SIZE.

(1.0) GL_INVALID_VALUE is generated if internalformat is not one of the accepted symbolic constants.

(1.1) GL_INVALID_ENUM is generated if internalformat is not one of the accepted symbolic constants.

GL_INVALID_VALUE is generated if width or height is less than 0 or greater than 2 + GL_MAX_TEXTURE_SIZE, or if either cannot be represented as 2^k + 2*border for some integer k.

GL_INVALID_VALUE is generated if border is not 0.

GL_INVALID_VALUE is generated if imageSize is not consistent with format, dimentions, and contents of the compressed image.
Parameters:
  target - Specifies the target texture. Must beGL_TEXTURE_2D.
Parameters:
  level - Specifies the level-of-detail number. Must be lessthan or equal to 0. Level 0 indicates a singlemip-level. Negative values indicate how many mip-levels aredescribed by data.
Parameters:
  internalformat - Specifies the color components in thetexture. The following symbolic constants are accepted:GL_PALETTE4_RGB8_OES,GL_PALETTE4_RGBA8_OES,GL_PALETTE4_R5_G6_B5_OES,GL_PALETTE4_RGBA4_OES,GL_PALETTE4_RGB5_A1_OES,GL_PALETTE8_RGB8_OES,GL_PALETTE8_RGBA8_OES,GL_PALETTE8_R5_G6_B5_OES,GL_PALETTE8_RGBA4_OES, andGL_PALETTE8_RGB5_A1_OES.
Parameters:
  width - Specifies the width of the texture image. Must be2^n + 2*border for some integer n. Allimplementations support texture images that are at least 64texels wide.
Parameters:
  height - Specifies the height of the texture image. Must be2^m + 2*border for some integer m. Allimplementations support texture images that are at least 64texels high.
Parameters:
  border - Specifies the width of the border. Must be 0.
Parameters:
  imageSize - Specifies the size of the compressed image datain bytes.
Parameters:
  data - Specifies a Buffer containing thecompressed image data.
exception:
  IllegalArgumentException - if data isnull.
exception:
  IllegalArgumentException - ifdata.remaining() is less thanimageSize.




glCompressedTexSubImage2D
void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data)(Code)
Specify a two-dimensional compressed texture subimage.

glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional compressed texture image. The texels referenced by pixels replace the portion of the existing texture array with x indices xoffset and xoffset + width - 1, inclusive, and y indices yoffset and yoffset + height - 1, inclusive. This region may not include any texels outside the range of the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect.

Currently, there is no supported compressed format for this function.

Notes

glPixelStore has no effect on compressed texture images.

glCompressedTexSubImage2D specifies the two-dimensional sub texture for the currently bound texture, specified with glBindTexture, and the current texture unit, specified with glActiveTexture.

Errors

GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D.

GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glCompressedTexImage2D operation.

GL_INVALID_VALUE is generated if level is less than 0.

GL_INVALID_VALUE may be generated if level is greater than log2(max), where max is the returned value of GL_MAX_TEXTURE_SIZE.

GL_INVALID_VALUE is generated if xoffset < -b, xoffset + width > (w - b), yoffset < -b, or yoffset + height > (h - b) , where w is the texture width, h is the texture height, and b is the border of the texture image being modified. Note that w and h include twice the border width.

GL_INVALID_VALUE is generated if width or height is less than 0.

GL_INVALID_ENUM is generated if type is not a type constant.

GL_INVALID_OPERATION is generated if type is GL_UNSIGNED_SHORT_5_6_5 and format is not GL_RGB.

GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_SHORT_4_4_4_4, or GL_UNSIGNED_SHORT_5_5_5_1 and format is not GL_RGBA.

GL_INVALID_OPERATION is generated if none of the above error conditions apply.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_SIZE
Parameters:
  target - Specifies the target texture. Must beGL_TEXTURE_2D.
Parameters:
  level - Specifies the level-of-detail number.
Parameters:
  xoffset - Specifies a texel offset in the x direction withinthe texture array.
Parameters:
  yoffset - Specifies a texel offset in the y direction withinthe texture array.
Parameters:
  width - Specifies the width of the texture subimage.
Parameters:
  height - Specifies the height of the texture subimage.
Parameters:
  format - Specifies the format of the pixel data. Currently,there is no supported format.
Parameters:
  imageSize - Specifies the size of the compressed pixel data in bytes.
Parameters:
  data - Specifies a Buffer containing thecompressed image data.
exception:
  IllegalArgumentException - if data isnull.
exception:
  IllegalArgumentException - ifdata.remaining() is less thanimageSize.




glCopyTexImage2D
void glCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border)(Code)
Specify a two-dimensional texture image with pixels from the color buffer.

glCopyTexImage2D defines a two-dimensional texture image with pixels from the color buffer.

The screen-aligned pixel rectangle with lower left corner at (x, y) and with a width of width + 2*border and a height of height + 2*border defines the texture array at the mipmap level specified by level. internalformat specifies the color components of the texture.

The red, green, blue, and alpha components of each pixel that is read are converted to an internal fixed-point or floating-point format with unspecified precision. The conversion maps the largest representable component value to 1.0, and component value 0 to 0.0. The values are then converted to the texture's internal format for storage in the texel array.

internalformat must be chosen such that color buffer components can be dropped during conversion to the internal format, but new components cannot be added. For example, an RGB color buffer can be used to create LUMINANCE or RGB textures, but not ALPHA, LUMINANCE_ALPHA or RGBA textures.

Pixel ordering is such that lower x and y screen coordinates correspond to lower s and t texture coordinates.

If any of the pixels within the specified rectangle of the color buffer are outside the window associated with the current rendering context, then the values obtained for those pixels are undefined.

Notes

An image with height or width of 0 indicates a null-texture.

Errors

GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D.

GL_INVALID_OPERATION is generated if internalformat is not compatible with the color buffer format.

GL_INVALID_VALUE is generated if level is less than 0.

GL_INVALID_VALUE may be generated if level is greater than log_2(max), where max is the returned value of GL_MAX_TEXTURE_SIZE.

GL_INVALID_VALUE is generated if width or height is less than 0, greater than GL_MAX_TEXTURE_SIZE, or if width or height cannot be represented as 2^k + 2*border for some integer k.

GL_INVALID_VALUE is generated if border is not 0.

(1.0) GL_INVALID_VALUE is generated if internalformat is not an accepted constant.

(1.1) GL_INVALID_ENUM is generated if internalformat is not an accepted constant.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_SIZE
Parameters:
  target - Specifies the target texture. Must beGL_TEXTURE_2D.
Parameters:
  level - Specifies the level-of-detail number. Level 0 is thebase image level. Level n is the nth mipmap reduction image.
Parameters:
  internalformat - Specifies the color components of thetexture. Must be one of the following symbolic constants:GL_ALPHA, GL_LUMINANCE,GL_LUMINANCE_ALPHA, GL_RGB, orGL_RGBA.
Parameters:
  x - Specifies the window x coordinate of the lower leftcorner of the rectangular region of pixels to be copied.
Parameters:
  y - Specifies the window y coordinate of the lower leftcorner of the rectangular region of pixels to be copied.
Parameters:
  width - Specifies the width of the texture image. Must be 0or 2^nborder for some integer n.
Parameters:
  height - Specifies the height of the texture image. Must be0 or 2^m + 2*border for some integer m.
Parameters:
  border - Specifies the width of the border. Must be 0.




glCopyTexSubImage2D
void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height)(Code)
Specify a two-dimensional texture subimage with pixels from the color buffer.

glCopyTexSubImage2D replaces a rectangular portion of a two-dimensional texture image with pixels from the color buffer.

The screen-aligned pixel rectangle with lower left corner at (x, y) and with width width and height height replaces the portion of the texture array with x indices xoffset through xoffset + width - 1, inclusive, and y indices yoffset through yoffset + height - 1, inclusive, at the mipmap level specified by level.

The pixels in the rectangle are processed the same way as with glCopyTexImage2D.

glCopyTexSubImage2D requires that the internal format of the currently bound texture is such that color buffer components can be dropped during conversion to the internal format, but new components cannot be added. For example, an RGB color buffer can be used to create LUMINANCE or RGB textures, but not ALPHA, LUMINANCE_ALPHA or RGBA textures.

The destination rectangle in the texture array may not include any texels outside the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect.

If any of the pixels within the specified rectangle of the current color buffer are outside the read window associated with the current rendering context, then the values obtained for those pixels are undefined.

No change is made to the internalformat, width, height, or border parameters of the specified texture array or to texel values outside the specified subregion.

Errors

GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D.

GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glTexImage2D or glCopyTexImage2D operation or if the internal format of the currently bound texture is not compatible with the color buffer format.

GL_INVALID_VALUE is generated if level is less than 0.

GL_INVALID_VALUE may be generated if level is greater than log_2(max), where max is the returned value of GL_MAX_TEXTURE_SIZE.

GL_INVALID_VALUE is generated if x < -b, or y < -b, where b is the border of the texture being modified.

GL_INVALID_VALUE is generated if xoffset < -b, xoffset + width > (w - b) , yoffset < -b, or yoffset + height > (h - b) , where w is the texture width, h is the texture height, and b is the border of the texture image being modified. Note that w and h include twice the border width.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_SIZE
Parameters:
  target - Specifies the target texture. Must beGL_TEXTURE_2D.
Parameters:
  level - Specifies the level-of-detail number. Level 0 is thebase image level. Level n is the nth mipmap reduction image.
Parameters:
  xoffset - Specifies a texel offset in the x direction withinthe texture array.
Parameters:
  yoffset - Specifies a texel offset in the y direction withinthe texture array.
Parameters:
  x - Specifies the window x coordinate of the lower leftcorner of the rectangular region of pixels to be copied.
Parameters:
  y - Specifies the window y coordinate of the lower leftcorner of the rectangular region of pixels to be copied.
Parameters:
  width - Specifies the width of the texture subimage.
Parameters:
  height - Specifies the height of the texture subimage.




glCullFace
void glCullFace(int mode)(Code)
Specify whether front- or back-facing polygons are culled.

glCullFace specifies whether front- or back-facing polygons are culled (as specified by mode) when culling is enabled. To enable and disable culling, call glEnable and glDisable with argument GL_CULL_FACE. Culling is initially disabled.

glFrontFace specifies which of the clockwise and counterclockwise polygons are front-facing and back-facing.

Notes

If mode is GL_FRONT_AND_BACK, no polygons are drawn, but other primitives such as points and lines are drawn.

Errors

GL_INVALID_ENUM is generated if mode is not an accepted value.
Parameters:
  mode - Specifies whether front- or back-facing polygons areculled. Symbolic constants GL_FRONT,GL_BACK, and GL_FRONT_AND_BACK areaccepted. The initial value is GL_BACK.




glDeleteTextures
void glDeleteTextures(int n, int[] textures, int offset)(Code)
Delete named textures.

glDeleteTextures deletes n textures named by the elements of the array textures. After a texture is deleted, it has no contents or dimensionality, and its name is free for reuse (for example by glGenTextures). If a texture that is currently bound is deleted, the binding reverts to 0 (the default texture).

glDeleteTextures silently ignores 0's and names that do not correspond to existing textures.

Errors

GL_INVALID_VALUE is generated if n is negative.
Parameters:
  n - Specifies the number of textures to be deleted.
Parameters:
  textures - Specifies an array of textures to be deleted.
Parameters:
  offset - the starting offset within thetextures array.
exception:
  IllegalArgumentException - if textures isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if textures.length -offset is less than n.




glDeleteTextures
void glDeleteTextures(int n, IntBuffer textures)(Code)
Integer Buffer version of glDeleteTextures.
Parameters:
  textures - an IntBuffer.
exception:
  IllegalArgumentException - if textures isnull.
exception:
  IllegalArgumentException - iftextures.remaining() is less than n.
See Also:   GL10.glDeleteTextures(int n,int[] textures,int offset)



glDepthFunc
void glDepthFunc(int func)(Code)
Specify the value used for depth buffer comparisons.

glDepthFunc specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer. The comparison is performed only if depth testing is enabled. To enable and disable depth testing, call glEnable and glDisable with argument GL_DEPTH_TEST. Depth testing is initially disabled.

func specifies the conditions under which the pixel will be drawn. The comparison functions are as follows:

  • GL_NEVER
  • Never passes.
  • GL_LESS
  • Passes if the incoming depth value is less than the stored depth value.
  • GL_EQUAL
  • Passes if the incoming depth value is equal to the stored depth value.
  • GL_LEQUAL
  • Passes if the incoming depth value is less than or equal to the stored depth value.
  • GL_GREATER
  • Passes if the incoming depth value is greater than the stored depth value.
  • GL_NOTEQUAL
  • Passes if the incoming depth value is not equal to the stored depth value.
  • GL_GEQUAL
  • Passes if the incoming depth value is greater than or equal to the stored depth value.
  • GL_ALWAYS
  • Always passes.

The initial value of func is GL_LESS. Initially, depth testing is disabled. Even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled.

Errors

GL_INVALID_ENUM is generated if func is not an accepted value.
Parameters:
  func - Specifies the depth comparison function. Symbolicconstants GL_NEVER, GL_LESS,GL_EQUAL, GL_LEQUAL,GL_GREATER, GL_NOTEQUAL,GL_GEQUAL, and GL_ALWAYS areaccepted. The initial value is GL_LESS.




glDepthMask
void glDepthMask(boolean flag)(Code)
Enable or disable writing into the depth buffer.

glDepthMask specifies whether the depth buffer is enabled for writing. If flag is false, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.

1.0 Notes

glDepthMask does not affect glClear.
Parameters:
  flag - Specifies whether the depth buffer is enabled forwriting. If flag is GL_FALSE, depth buffer writingis disabled, otherwise it is enabled. The initial value istrue.




glDepthRangef
void glDepthRangef(float zNear, float zFar)(Code)
Specify mapping of depth values from normalized device coordinates to window coordinates.

After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. glDepthRange specifies a linear mapping of the normalized depth coordinates in this range to window depth coordinates. Regardless of the actual depth buffer implementation, window coordinate depth values are treated as though they range from 0 through 1 (like color components). Thus, the values accepted by glDepthRange are both clamped to this range before they are accepted.

The setting of (0, 1) maps the near plane to 0 and the far plane to 1. With this mapping, the depth buffer range is fully utilized.

Notes

It is not necessary that near be less than far. Reverse mappings such as near = 1, and far = 0 are acceptable.
Parameters:
  zNear - Specifies the mapping of the near clipping plane towindow coordinates. The initial value is 0.
Parameters:
  zFar - Specifies the mapping of the far clipping plane towindow coordinates. The initial value is 1.




glDepthRangex
void glDepthRangex(int zNear, int zFar)(Code)
Fixed-point version of glDepthRange.
See Also:   GL10.glDepthRangef(float zNear,float zFar)



glDisable
void glDisable(int cap)(Code)
Disable server-side GL capabilities.
See Also:   GL10.glEnable



glDisableClientState
void glDisableClientState(int array)(Code)
Disable client-side capability.
See Also:   GL10.glEnableClientState



glDrawArrays
void glDrawArrays(int mode, int first, int count)(Code)
Render primitives from array data.

glDrawArrays specifies multiple geometric primitives with very few subroutine calls. You can prespecify separate arrays of vertices, normals, colors, and texture coordinates and use them to construct a sequence of primitives with a single call to glDrawArrays.

When glDrawArrays is called, it uses count sequential elements from each enabled array to construct a sequence of geometric primitives, beginning with element first. mode specifies what kind of primitives are constructed, and how the array elements construct those primitives. If GL_VERTEX_ARRAY is not enabled, no geometric primitives are generated.

Vertex attributes that are modified by glDrawArrays have an unspecified value after glDrawArrays returns. For example, if GL_COLOR_ARRAY is enabled, the value of the current color is undefined after glDrawArrays executes. Attributes that aren't modified remain well defined.

Errors

GL_INVALID_ENUM is generated if mode is not an accepted value.

GL_INVALID_VALUE is generated if count is negative.
exception:
  ArrayIndexOutOfBoundsException - if any index in thesequence first, ..., first + count - 1 will resultin a reference to an entry outside of the current vertex, color,normal, texture coordinate, point size, matrix index, or weightarray.
Parameters:
  mode - Specifies what kind of primitives to render. Symbolicconstants GL_POINTS, GL_LINE_STRIP,GL_LINE_LOOP, GL_LINES,GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, andGL_TRIANGLES are accepted.
Parameters:
  first - Specifies the starting index in the enabled arrays.
Parameters:
  count - Specifies the number of indices to be rendered.




glDrawElements
void glDrawElements(int mode, int count, int type, Buffer indices)(Code)
Render primitives from array data.

glDrawElements specifies multiple geometric primitives with very few subroutine calls. You can prespecify separate arrays of vertices, normals, colors, and texture coordinates and use them to construct a sequence of primitives with a single call to glDrawElements.

When glDrawElements is called, it uses count sequential indices from indices to lookup elements in enabled arrays to construct a sequence of geometric primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If GL_VERTEX_ARRAY is not enabled, no geometric primitives are constructed.

Vertex attributes that are modified by glDrawElements have an unspecified value after glDrawElements returns. For example, if GL_COLOR_ARRAY is enabled, the value of the current color is undefined after glDrawElements executes. Attributes that aren't modified maintain their previous values.

Errors

GL_INVALID_ENUM is generated if mode is not an accepted value.

GL_INVALID_ENUM is generated if type is not an accepted value.

GL_INVALID_VALUE is generated if count is negative.
Parameters:
  mode - Specifies what kind of primitives to render. Symbolicconstants GL_POINTS, GL_LINE_STRIP,GL_LINE_LOOP, GL_LINES,GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, andGL_TRIANGLES are accepted.
Parameters:
  count - Specifies the number of elements to be rendered.
Parameters:
  type - Specifies the type of the values in indices. Must beeither GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT.
Parameters:
  indices - Specifies a pointer to the location where theindices are stored.
exception:
  IllegalStateException - if the most recent call toglBindBuffer for theGL_ELEMENT_ARRAY_BUFFER target had a non-zerobuffer parameter (i.e., an index buffer is bound).
exception:
  IllegalArgumentException - if indices isnull.
exception:
  ArrayIndexOutOfBoundsException - if any index in thesequence of indices from 0 to count - 1would result in a reference to an entry outside of the currentlybound index or data (vertex, color, normal, texture coordinatearray, weight, matrix index, or point size) array.




glEnable
void glEnable(int cap)(Code)
Enable server-side GL capabilities.

glEnable and glDisable enable and disable various capabilities. The initial value for each capability with the exception of GL_DITHER and GL_MULTISAMPLE is GL_FALSE. The initial value for GL_DITHER and GL_MULTISAMPLE is GL_TRUE.

Both glEnable and glDisable take a single argument, cap, which can assume one of the following values:

  • GL_ALPHA_TEST
  • If enabled, do alpha testing. See glAlphaFunc.

  • GL_BLEND
  • If enabled, blend the incoming color values with the values in the color buffers. See glBlendFunc.

  • GL_COLOR_LOGIC_OP
  • If enabled, apply the currently selected logical operation to the incoming color and color buffer values. See glLogicOp.

  • GL_COLOR_MATERIAL
  • If enabled, have ambient and diffuse material parameters track the current color.

  • GL_CULL_FACE
  • If enabled, cull polygons based on their winding in window coordinates. See glCullFace.

  • GL_DEPTH_TEST
  • If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See glDepthFunc, glDepthMask, and glDepthRange.

  • GL_DITHER
  • If enabled, dither color components or indices before they are written to the color buffer.

  • GL_FOG
  • If enabled, blend a fog color into the posttexturing color. See glFog.

  • GL_LIGHTi
  • If enabled, include light i in the evaluation of the lighting equation. See glLightModel and glLight.

  • GL_LIGHTING
  • If enabled, use the current lighting parameters to compute the vertex color. Otherwise, simply associate the current color with each vertex. See glMaterial, glLightModel, and glLight.

  • GL_LINE_SMOOTH
  • If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See glLineWidth.

  • GL_MULTISAMPLE
  • If enabled, perform multisampling of fragments for single-pass antialiasing and other effects. See glSampleCoverage.

  • GL_NORMALIZE
  • If enabled, normal vectors are scaled to unit length after transformation. See glNormal and glNormalPointer.

  • GL_POINT_SMOOTH
  • If enabled, draw points with proper filtering. Otherwise, draw aliased points. See glPointSize.

  • GL_POLYGON_OFFSET_FILL
  • If enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset.

  • GL_RESCALE_NORMAL
  • If enabled, normal vectors are scaled by a factor derived from the modelview matrix. See glNormal and glNormalPointer.

  • GL_SAMPLE_ALPHA_TO_MASK (1.0 only)
  • If enabled, convert fragment alpha values to multisample coverage modification masks. See glSampleCoverage.

  • GL_SAMPLE_ALPHA_TO_COVERAGE (1.1 only)
  • If enabled, a temporary coverage value is generated where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value. Otherwise the fragment coverage value is unchanged at this point. See glSampleCoverage.

  • GL_SAMPLE_ALPHA_TO_ONE
  • If enabled, set fragment alpha to the maximum permissible value after computing multisample coverage modification masks. See glSampleCoverage.

  • GL_SAMPLE_MASK (1.0 only)
  • If enabled, apply a mask to modify fragment coverage during multisampling. See glSampleCoverage.

  • GL_SAMPLE_COVERAGE (1.1 only)
  • If enabled, the fragment coverage is ANDed with another temporary coverage. This temporary coverage is generated in the same manner as for GL_SAMPLE_ALPHA_TO_COVERAGE described above, but as a function of the value of GL_SAMPLE_COVERAGE_VALUE. If GL_SAMPLE_COVERAGE_INVERT is GL_TRUE, the temporary coverage is inverted (all bit values are inverted) before it is ANDed with the fragment coverage. See glSampleCoverage.

  • GL_SCISSOR_TEST
  • If enabled, discard fragments that are outside the scissor rectangle. See glScissor.

  • GL_STENCIL_TEST
  • If enabled, do stencil testing and update the stencil buffer. See glStencilFunc, glStencilMask, and glStencilOp.

  • GL_TEXTURE_2D
  • If enabled, two-dimensional texturing is performed for the active texture unit. See glActiveTexture, glTexImage2D, glCompressedTexImage2D, and glCopyTexImage2D.

  • GL_CLIP_PLANEi (1.1 only)
  • If enabled, clipping plane i is enabled. See glClipPlane.

  • GL_POINT_SPRITE_OES (1.1 + OES_point_sprite extension)
  • If enabled, point sprites are enabled. See glPointSize and glTexEnv.

Errors

GL_INVALID_ENUM is generated if cap is not one of the values listed previously.
Parameters:
  cap - Specifies a symbolic constant indicating a GL capability.




glEnableClientState
void glEnableClientState(int array)(Code)
Enable client-side capability.

glEnableClientState and glDisableClientState enable or disable individual client-side capabilities. By default, all client-side capabilities are disabled. Both glEnableClientState and glDisableClientState take a single argument, array, which can assume one of the following values:

  • GL_COLOR_ARRAY
  • If enabled, the color array is enabled for writing and used during rendering when glDrawArrays, or glDrawElements is called. See glColorPointer.

  • GL_NORMAL_ARRAY
  • If enabled, the normal array is enabled for writing and used during rendering when glDrawArrays, or glDrawElements is called. See glNormalPointer.

  • GL_TEXTURE_COORD_ARRAY
  • If enabled, the texture coordinate array is enabled for writing and used during rendering when glDrawArrays, or glDrawElements is called. See glTexCoordPointer.

  • GL_VERTEX_ARRAY
  • If enabled, the vertex array is enabled for writing and used during rendering when glDrawArrays, or glDrawElements is called. See glVertexPointer.

  • GL_POINT_SIZE_ARRAY_OES (OES_point_size_array extension)
  • If enabled, the point size array controls the sizes used to render points and point sprites. In this case the point size defined by glPointSize is ignored. The point sizes supplied in the point size arrays will be the sizes used to render both points and point sprites. See glPointSize.

Notes

Enabling and disabling GL_TEXTURE_COORD_ARRAY affects the active client texture unit. The active client texture unit is controlled with glClientActiveTexture.

Errors

GL_INVALID_ENUM is generated if array is not an accepted value.
Parameters:
  array - Specifies the capability to enable ordisable. Symbolic constants GL_COLOR_ARRAY,GL_NORMAL_ARRAY,GL_TEXTURE_COORD_ARRAY,GL_VERTEX_ARRAY, andGL_POINT_SIZE_ARRAY_OES(OES_point_size_array extension) are accepted.




glFinish
void glFinish()(Code)
Block until all GL execution is complete.

glFinish does not return until the effects of all previously called GL commands are complete. Such effects include all changes to GL state, all changes to connection state, and all changes to the frame buffer contents.

Notes

glFinish requires a round trip to the server.




glFlush
void glFlush()(Code)
Force execution of GL commands in finite time.

Different GL implementations buffer commands in several different locations, including network buffers and the graphics accelerator itself. glFlush empties all of these buffers, causing all issued commands to be executed as quickly as they are accepted by the actual rendering engine. Though this execution may not be completed in any particular time period, it does complete in finite time.

Because any GL program might be executed over a network, or on an accelerator that buffers commands, all programs should call glFlush whenever they count on having all of their previously issued commands completed. For example, call glFlush before waiting for user input that depends on the generated image.

Notes

glFlush can return at any time. It does not wait until the execution of all previously issued GL commands is complete.




glFogf
void glFogf(int pname, float param)(Code)
Specify fog parameters.

If fog is enabled, fog affects rasterized geometry, bitmaps, and pixel blocks, but not buffer clear operations. To enable and disable fog, call glEnable and glDisable with argument GL_FOG. Fog is initially disabled.

glFog assigns the value in param to the fog parameter specified by pname. The following values are accepted for pname:

  • GL_FOG_MODE
  • param is a single value that specifies the equation to be used to compute the fog blend factor f. Three symbolic constants are accepted: GL_LINEAR, GL_EXP, and GL_EXP2. The equations corresponding to these symbolic constants are defined below. The initial fog mode is GL_EXP.

  • GL_FOG_DENSITY
  • param is a single value that specifies density, the fog density used in both exponential fog equations. Only nonnegative densities are accepted. The initial fog density is 1.

  • GL_FOG_START
  • param is a single value that specifies start, the near distance used in the linear fog equation. The initial near distance is 0.

  • GL_FOG_END
  • param is a single value that specifies end, the far distance used in the linear fog equation. The initial far distance is 1.

Errors

GL_INVALID_ENUM is generated if pname is not an accepted value, or if pname is GL_FOG_MODE and param is not an accepted value.

GL_INVALID_VALUE is generated if pname is GL_FOG_DENSITY, and param is negative.
Parameters:
  pname - Specifies a single-valued fogparameter. GL_FOG_MODE, GL_FOG_DENSITY,GL_FOG_START, and GL_FOG_END areaccepted.
Parameters:
  param - Specifies the value that pname will beset to.




glFogfv
void glFogfv(int pname, float[] params, int offset)(Code)
Specify fog parameters (array version).

If fog is enabled, fog affects rasterized geometry, bitmaps, and pixel blocks, but not buffer clear operations. To enable and disable fog, call glEnable and glDisable with argument GL_FOG. Fog is initially disabled.

glFog assigns the value or values in params to the fog parameter specified by pname. The following values are accepted for pname:

  • GL_FOG_MODE
  • params contains a single value that specifies the equation to be used to compute the fog blend factor f. Three symbolic constants are accepted: GL_LINEAR, GL_EXP, and GL_EXP2. The equations corresponding to these symbolic constants are defined below. The initial fog mode is GL_EXP.

  • GL_FOG_DENSITY
  • params contains a single value that specifies density, the fog density used in both exponential fog equations. Only nonnegative densities are accepted. The initial fog density is 1.

  • GL_FOG_START
  • params contains a single value that specifies start, the near distance used in the linear fog equation. The initial near distance is 0.

  • GL_FOG_END
  • params contains a single value that specifies end, the far distance used in the linear fog equation. The initial far distance is 1.

  • GL_FOG_COLOR
  • params contains four values that specify Cf, the fog color. Both fixed-point and floating-point values are mapped directly. After conversion, all color components are clamped to the range [0, 1]. The initial fog color is (0, 0, 0, 0).

Fog blends a fog color with each rasterized pixel fragment's posttexturing color using a blending factor f. Factor f is computed in one of three ways, depending on the fog mode. Let z be the distance in eye coordinates from the origin to the fragment being fogged. The equation for GL_LINEAR fog is

 f = (end - z)/(end - start)
 

The equation for GL_EXP fog is

 f = e -(density - z)
 

The equation for GL_EXP2 fog is

 f = e -(density - z)2
 

Regardless of the fog mode, f is clamped to the range [0, 1] after it is computed. Then, the fragment's red, green, and blue colors, represented by Cr, are replaced by:

 C'r = f Cr + (1 - f) Cf
 

Fog does not affect a fragment's alpha component.

Errors

GL_INVALID_ENUM is generated if pname is not an accepted value, or if pname is GL_FOG_MODE and params is not an accepted value.

GL_INVALID_VALUE is generated if pname is GL_FOG_DENSITY, and the first value in params is negative.
Parameters:
  pname - Specifies a fog parameter. GL_FOG_MODE,GL_FOG_DENSITY, GL_FOG_START,GL_FOG_END, and GL_FOG_COLOR areaccepted.
Parameters:
  params - Specifies the value or values to be assigned topname. GL_FOG_COLOR requires an arrayof four values. All other parameters accept an array containingonly a single value.
Parameters:
  offset - the starting offset within theparams array.
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.




glFogfv
void glFogfv(int pname, FloatBuffer params)(Code)
Floating-point Buffer version of glFog.
See Also:   GL10.glFogfv(int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glFogx
void glFogx(int pname, int param)(Code)
Fixed-point version of glFog.
See Also:   GL10.glFogf(int pname,float param)



glFogxv
void glFogxv(int pname, int[] params, int offset)(Code)
Fixed-point array version of glFog.
See Also:   GL10.glFogfv(int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.



glFogxv
void glFogxv(int pname, IntBuffer params)(Code)
Fixed-point Buffer version of glFog.
See Also:   GL10.glFogfv(int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glFrontFace
void glFrontFace(int mode)(Code)
Define front- and back-facing polygons.

In a scene composed entirely of opaque closed surfaces, back-facing polygons are never visible. Eliminating (culling) these invisible polygons has the obvious benefit of speeding up the rendering of the image. To enable and disable culling, call glEnable and glDisable with argument GL_CULL_FACE. Culling is initially disabled.

The projection of a polygon to window coordinates is said to have clockwise winding if an imaginary object following the path from its first vertex, its second vertex, and so on, to its last vertex, and finally back to its first vertex, moves in a clockwise direction about the interior of the polygon. The polygon's winding is said to be counterclockwise if the imaginary object following the same path moves in a counterclockwise direction about the interior of the polygon. glFrontFace specifies whether polygons with clockwise winding in window coordinates, or counterclockwise winding in window coordinates, are taken to be front-facing. Passing GL_CCW to mode selects counterclockwise polygons as front-facing. GL_CW selects clockwise polygons as front-facing. By default, counterclockwise polygons are taken to be front-facing.

Errors

GL_INVALID_ENUM is generated if mode is not an accepted value.
Parameters:
  mode - Specifies the orientation of front-facingpolygons. GL_CW and GL_CCW areaccepted. The initial value is GL_CCW.




glFrustumf
void glFrustumf(float left, float right, float bottom, float top, float near, float far)(Code)
Multiply the current matrix by a perspective matrix.

glFrustum describes a perspective matrix that produces a perspective projection. The current matrix (see glMatrixMode) is multiplied by this matrix and the result replaces the current matrix, as if glMultMatrix were called with the following matrix as its argument:

 ( 2/(right - left)        0            A        0 )
 ( 0                2/(top - bottom)    B        0 )
 ( 0                       0            C        D )
 ( 0                       0           -1        0 )
 

where

 A = - (right + left)/(right - left)
 B = - (top + bottom)/(top - bottom)
 C = - (far + near)/(far - near)
 D = - 2farnear/(far - near)
 

Typically, the matrix mode is GL_PROJECTION, and (left, bottom, -near) and (right, top, -near) specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, assuming that the eye is located at (0, 0, 0). -far specifies the location of the far clipping plane. Both near and far must be positive.

Use glPushMatrix and glPopMatrix to save and restore the current matrix stack.

Notes

Depth buffer precision is affected by the values specified for near and far. The greater the ratio of far to near is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other. If

 r = far/near
 
roughly log_2(r) bits of depth buffer precision are lost. Because r approaches infinity as near approaches 0, near must never be set to 0.

Errors

GL_INVALID_VALUE is generated if near or far is not positive, or if left = right, or bottom = top.
Parameters:
  left - Specifies the coordinate for the left verticalclipping plane.
Parameters:
  right - Specifies the coordinate for the right verticalclipping plane.
Parameters:
  bottom - Specifies the coordinate for the bottom horizontalclipping plane.
Parameters:
  top - Specifies the coordinate for the top horizontalclipping plane.
Parameters:
  near - Specifies the distances to the near depth clippingplane. The distance must be positive.
Parameters:
  far - Specifies the distances to the near depth clippingplane. The distance must be positive.




glFrustumx
void glFrustumx(int left, int right, int bottom, int top, int near, int far)(Code)
Fixed-point version of glFrustum.
See Also:   GL10.glFrustumf



glGenTextures
void glGenTextures(int n, int[] textures, int offset)(Code)
Generate texture names.

glGenTextures returns n texture names in textures. There is no guarantee that the names form a contiguous set of integers. However, it is guaranteed that none of the returned names was in use immediately before the call to glGenTextures.

The generated textures have no dimensionality; they assume the dimensionality of the texture target to which they are first bound (see glBindTexture).

Texture names returned by a call to glGenTextures are not returned by subsequent calls, unless they are first deleted with glDeleteTextures.

Errors

GL_INVALID_VALUE is generated if n is negative.
Parameters:
  n - Specifies the number of texture names to be generated.
Parameters:
  textures - Specifies an array in which the generated texturenames are stored.
Parameters:
  offset - the starting offset within thetextures array.
exception:
  IllegalArgumentException - if textures isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if textures.length -offset is less than n.




glGenTextures
void glGenTextures(int n, IntBuffer textures)(Code)
Integer Buffer version of glGenTextures.
See Also:   GL10.glGenTextures(int n,int[] textures,int offset)
exception:
  IllegalArgumentException - if textures isnull.
exception:
  IllegalArgumentException - iftextures.remaining() is less than n.



glGetError
int glGetError()(Code)
Return error information.

glGetError returns the value of the error flag. Each detectable error is assigned a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until glGetError is called, the error code is returned, and the flag is reset to GL_NO_ERROR. If a call to glGetError returns GL_NO_ERROR, there has been no detectable error since the last call to glGetError, or since the GL was initialized.

To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of that flag is returned and that flag is reset to GL_NO_ERROR when glGetError is called. If more than one flag has recorded an error, glGetError returns and clears an arbitrary error flag value. Thus, glGetError should always be called in a loop, until it returns GL_NO_ERROR, if all error flags are to be reset.

Initially, all error flags are set to GL_NO_ERROR.

The following errors are currently defined:

  • GL_NO_ERROR
  • No error has been recorded. The value of this symbolic constant is guaranteed to be 0.

  • GL_INVALID_ENUM
  • An unacceptable value is specified for an enumerated argument. The offending command is ignored, and has no other side effect than to set the error flag.

  • GL_INVALID_VALUE
  • A numeric argument is out of range. The offending command is ignored, and has no other side effect than to set the error flag.

  • GL_INVALID_OPERATION
  • The specified operation is not allowed in the current state. The offending command is ignored, and has no other side effect than to set the error flag.

  • GL_STACK_OVERFLOW
  • This command would cause a stack overflow. The offending command is ignored, and has no other side effect than to set the error flag.

  • GL_STACK_UNDERFLOW
  • This command would cause a stack underflow. The offending command is ignored, and has no other side effect than to set the error flag.

  • GL_OUT_OF_MEMORY
  • There is not enough memory left to execute the command. The state of the GL is undefined, except for the state of the error flags, after this error is recorded.

When an error flag is set, results of a GL operation are undefined only if GL_OUT_OF_MEMORY has occurred. In all other cases, the command generating the error is ignored and has no effect on the GL state or frame buffer contents. If the generating command returns a value, it returns 0. If glGetError itself generates an error, it returns 0. One of the error codes listed above.




glGetIntegerv
void glGetIntegerv(int pname, int[] params, int offset)(Code)
Return the value or values of a selected parameter.

glGet returns values for static state variables in GL. pname is a symbolic constant indicating the static state variable to be returned, and params is an array of integers in which to place the returned data.

A boolean value is interpreted as either 1 or 0, and a floating-point value is rounded to the nearest integer, unless the value is an RGBA color component, a DepthRange value, a depth buffer clear value, or a normal coordinate. In these cases, the glGet command does a linear mapping that maps 1.0 to the most positive representable integer value, and -1.0 to the most negative representable integer value.

In OpenGL ES 1.0, on glGetIntegerv is provided. OpenGL ES 1.1 additionally provides glGetBooleanv, glGetFixedv, and glGetFloatv.

The following symbolic constants are accepted by pname:

  • GL_ALIASED_POINT_SIZE_RANGE
  • params returns two values, the smallest and largest supported sizes for aliased points. The range must include 1. See glPointSize.

  • GL_ALIASED_LINE_WIDTH_RANGE
  • params returns two values, the smallest and largest supported widths for aliased lines. The range must include 1. See glLineWidth.

  • GL_ALPHA_BITS
  • params returns one value, the number of alpha bitplanes in the color buffer.

  • GL_ALPHA_TEST_FUNC (1.1 only)
  • params returns one value, the symbolic name of the alpha test function. See glAlphaFunc.

  • GL_ALPHA_TEST_REF (1.1 only)
  • params returns one value, the reference value for the alpha test. An integer value, if requested, is linearly mapped from the internal floating-point representation such that 1.0 returns the most positive representable integer value, and -1.0 returns the most negative representable integer value. See glAlphaFunc.

  • GL_BLEND_DST (1.1 only)
  • params returns one value, the symbolic constant identifying the destination blend function set by glBlendFunc, or the destination RGB blend function set by glBlendFuncSeparate. See glBlendFunc and glBlendFuncSeparate.

  • GL_BLUE_BITS
  • params returns one value, the number of blue bitplanes in the color buffer.

  • GL_COLOR_ARRAY_BUFFER_BINDING (1.1 only)
  • params returns one value, the color array buffer binding. See glColorPointer.

  • GL_COLOR_ARRAY_SIZE (1.1 only)
  • params returns one value, the number of components per color in the color array. See glColorPointer.

  • GL_COLOR_ARRAY_STRIDE (1.1 only)
  • params returns one value, the byte offset between consecutive colors in the color array. See glColorPointer.

  • GL_COLOR_ARRAY_TYPE (1.1 only)
  • params returns one value, returns the data type of each component in the color array. See glColorPointer.

  • GL_COLOR_CLEAR_VALUE (1.1 only)
  • params returns four values: the red, green, blue, and alpha values used to clear the color buffers. See glClearColor

  • GL_COLOR_WRITEMASK (1.1 only)
  • params returns four boolean values: the red, green, blue, and alpha write enables for the color buffers. See glColorMask.

  • GL_COMPRESSED_TEXTURE_FORMATS
  • params returns GL_NUM_COMPRESSED_TEXTURE_FORMATS values, the supported compressed texture formats. See glCompressedTexImage2D and glCompressedTexSubImage2D.

  • GL_CULL_FACE (1.1 only)
  • params returns one value, a symbolic constant indicating which polygon faces are to be culled. See glCullFace.

  • GL_DEPTH_BITS
  • params returns one value, the number of bitplanes in the depth buffer.

  • GL_DEPTH_CLEAR_VALUE (1.1 only)
  • params returns one value, the value that is used to clear the depth buffer. See glClearDepth.

  • GL_DEPTH_FUNC (1.1 only)
  • params returns one value, the symbolic name of the depth comparision function. See glDepthFunc.

  • GL_DEPTH_RANGE (1.1 only)
  • params returns two values: the near and far mapping limits for the depth buffer. See glDepthRange.

  • GL_DEPTH_WRITEMASK (1.1 only)
  • params returns a single boolean value indicating if the depth buffer is enabled for writing. See glDepthMask.

  • GL_FOG_COLOR (1.1 only)
  • params returns four values: the red, green, blue, and alpha components of the fog color. See glFog.

  • GL_FOG_DENSITY (1.1 only)
  • params returns one value, the fog density parameter. See glFog.

  • GL_FOG_END (1.1 only)
  • params returns one value, the end factor for the linear fog equation. See glFog.

  • GL_FOG_HINT (1.1 only)
  • params returns one value, a symbolic constant indicating the mode of the fog hint. See glHint.

  • GL_FOG_MODE (1.1 only)
  • params returns one value, a symbolic constant indicating which fog equation is selected. See glFog.

  • GL_FOG_START (1.1 only)
  • params returns one value, the start factor for the linear fog equation. See glFog.

  • GL_FRONT_FACE (1.1 only)
  • params returns one value, a symbolic constant indicating whether clockwise or counterclockwise polygon winding is treated as front-facing. See glFrontFace.

  • GL_GREEN_BITS
  • params returns one value, the number of green bitplanes in the color buffer.

  • GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES (OES_read_format extension)
  • params returns one value, the preferred format for pixel read back. See glReadPixels.

  • GL_IMPLEMENTATION_COLOR_READ_TYPE_OES ( (OES_read_format extension)
  • params returns one value, the preferred type for pixel read back. See glReadPixels.

  • GL_LIGHT_MODEL_AMBIENT (1.1 only)
  • params returns four values: the red, green, blue, and alpha components of the ambient intensity of the entire scene. See glLightModel.

  • GL_LIGHT_MODEL_TWO_SIDE (1.1 only)
  • params returns a single boolean value indicating whether separate materials are used to compute lighting for front and back facing polygons. See glLightModel.

  • GL_LINE_SMOOTH_HINT (1.1 only)
  • params returns one value, a symbolic constant indicating the mode of the line antialiasing hint. See glHint.

  • GL_LINE_WIDTH (1.1 only)
  • params returns one value, the line width as specified with glLineWidth.

  • GL_LOGIC_OP_MODE (1.1 only)
  • params returns one value, a symbolic constant indicating the selected logic operation mode. See glLogicOp.

  • GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES (OES_matrix_palette extension)
  • params returns one value, the matrix index array buffer binding. See glMatrixIndexPointer.

  • GL_MATRIX_INDEX_ARRAY_SIZE_OES (OES_matrix_palette extension)
  • params returns one value, the number of matrix indices per vertex. See glMatrixIndexPointer.

  • GL_MATRIX_INDEX_ARRAY_STRIDE_OES (OES_matrix_palette extension)
  • params returns one value, the byte offset between matrix indices. See glMatrixIndexPointer.

  • GL_MATRIX_INDEX_ARRAY_TYPE_OES (OES_matrix_palette extension)
  • params returns one value, the data type of each matrix index in the matrix indices array. See glMatrixIndexPointer.

  • GL_MATRIX_MODE (1.1 only)
  • params returns one value, a symbolic constant indicating which matrix stack is currently the target of all matrix operations. See glMatrixMode.

  • GL_MAX_CLIP_PLANES (1.1 only)
  • params returns one value, the maximum number of application defined clipping planes. The value must be at least 6. See glClipPlane.

  • GL_MAX_ELEMENTS_INDICES
  • params returns one value, the recommended maximum number of vertex array indices. See glDrawElements.

  • GL_MAX_ELEMENTS_VERTICES
  • params returns one value, the recommended maximum number of vertex array vertices. See glDrawArrays and glDrawElements.

  • GL_MAX_LIGHTS
  • params returns one value, the maximum number of lights. The value must be at least 8. See glLight.

  • GL_MAX_MODELVIEW_STACK_DEPTH
  • params returns one value, the maximum supported depth of the modelview matrix stack. The value must be at least 16. See glPushMatrix.

  • GL_MAX_PALETTE_MATRICES_OES (OES_matrix_palette extension)
  • params returns the size of the matrix palette. The initial value is 9.

  • GL_MAX_PROJECTION_STACK_DEPTH
  • params returns one value, the maximum supported depth of the projection matrix stack. The value must be at least 2. See glPushMatrix.

  • GL_MAX_TEXTURE_SIZE
  • params returns one value. The value gives a rough estimate of the largest texture that the GL can handle. The value must be at least 64. See glTexImage2D, glCompressedTexImage2D, and glCopyTexImage2D.

  • GL_MAX_TEXTURE_STACK_DEPTH
  • params returns one value, the maximum supported depth of the texture matrix stack. The value must be at least 2. See glPushMatrix.

  • GL_MAX_TEXTURE_UNITS
  • params returns a single value indicating the number of texture units supported. The value must be at least 1. See glActiveTexture, glClientActiveTexture and glMultiTexCoord.

  • GL_MAX_VERTEX_UNITS_OES

    params returns the number of matrices per vertex. The initial value is 3.

  • GL_MAX_VIEWPORT_DIMS
  • params returns two values: the maximum supported width and height of the viewport. These must be at least as large as the visible dimensions of the display being rendered to. See glViewport.

  • GL_MODELVIEW_MATRIX (1.1 only)
  • params returns sixteen values: the modelview matrix on the top of the modelview matrix stack. See glPushMatrix.

  • GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES (OES_matrix_get extension)
  • params returns a representation of the floating point Model View matrix elements as as an array of integers, according to the IEEE 754 floating point "single format" bit layout. See glMatrixMode.

  • GL_MODELVIEW_STACK_DEPTH (1.1 only)
  • params returns one value, the number of matrices on the modelview matrix stack. See glPushMatrix.

  • GL_NORMAL_ARRAY_BUFFER_BINDING (1.1 only)
  • params returns one value, the normal array buffer binding. See glNormalPointer.

  • GL_NORMAL_ARRAY_STRIDE (1.1 only)
  • params returns one value, the byte offset between consective normals in the normal array. See glNormalPointer.

  • GL_NORMAL_ARRAY_TYPE (1.1 only)
  • params returns one value, the data type of each normal in the normal array. See glNormalPointer.

  • GL_NUM_COMPRESSED_TEXTURE_FORMATS
  • params returns one value, the number of supported compressed texture formats. The value must be at least 10. See glCompressedTexImage2D and glCompressedTexSubImage2D.

  • GL_PACK_ALIGNMENT (1.1 only)
  • params returns one value, the byte alignment used for writing pixel data to memory. See glPixelStore.

  • GL_PERSPECTIVE_CORRECTION_HINT (1.1 only)
  • params returns one value, a symbolic constant indicating the mode of the perspective correction hint. See glHint.

  • GL_POINT_SIZE (1.1 only)
  • params returns one value, the point size as specified by glPointSize.

  • GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES (OES_point_size_array extension)
  • params returns one value, the point size array buffer binding. See glPointSizePointer.

  • GL_POINT_SIZE_ARRAY_STRIDE_OES (OES_point_size_array extension)
  • params returns one value, the byte offset between consecutive point sizes in the point size array. See glPointSizePointer.

  • GL_POINT_SIZE_ARRAY_TYPE_OES (OES_point_size_array extension)
  • params returns one value, the data type of each point size in the point array. See glPointSizePointer.

  • GL_POINT_SMOOTH_HINT (1.1 only)
  • params returns one value, a symbolic constant indicating the mode of the point antialiasing hint. See glHint.

  • GL_POLYGON_OFFSET_FACTOR (1.1 only)
  • params returns one value, the scaling factor used to determine the variable offset that is added to the depth value of each fragment generated when a polygon is rasterized. See glPolygonOffset.

  • GL_POLYGON_OFFSET_UNITS (1.1 only)
  • params returns one value. This value is multiplied by an implementation-specific value and then added to the depth value of each fragment generated when a polygon is rasterized. See glPolygonOffset.

  • GL_PROJECTION_MATRIX (1.1 only)
  • params returns sixteen values: the projection matrix on the top of the projection matrix stack. See glPushMatrix.

  • GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES (OES_matrix_get extension)
  • params returns a representation of the floating point Projection matrix elements as as an array of integers, according to the IEEE 754 floating point "single format" bit layout. See glMatrixMode.

  • GL_PROJECTION_STACK_DEPTH (1.1 only)
  • params returns one value, the number of matrices on the projection matrix stack. See glPushMatrix.

  • GL_RED_BITS
  • params returns one value, the number of red bitplanes in each color buffer.

  • GL_SCISSOR_BOX (1.1 only)
  • params returns four values: the x and y window coordinates of the scissor box, followed by its width and height. See glScissor.

  • GL_SHADE_MODEL (1.1 only)
  • params returns one value, a symbolic constant indicating whether the shading mode is flat or smooth. See glShadeModel.

  • GL_SMOOTH_LINE_WIDTH_RANGE
  • params returns two values, the smallest and largest supported widths for antialiased lines. The range must include 1. See glLineWidth.

  • GL_SMOOTH_POINT_SIZE_RANGE
  • params returns two values, the smallest and largest supported widths for antialiased points. The range must include 1. See glPointSize.

  • GL_STENCIL_BITS
  • params returns one value, the number of bitplanes in the stencil buffer.

  • GL_STENCIL_CLEAR_VALUE (1.1 only)
  • params returns one value, the index to which the stencil bitplanes are cleared. See glClearStencil.

  • GL_STENCIL_FAIL (1.1 only)
  • params returns one value, a symbolic constant indicating what action is taken when the stencil test fails. See glStencilOp.

  • GL_STENCIL_FUNC (1.1 only)
  • params returns one value, a symbolic constant indicating what function is used to compare the stencil reference value with the stencil buffer value. See glStencilFunc.

  • GL_STENCIL_PASS_DEPTH_FAIL (1.1 only)
  • params returns one value, a symbolic constant indicating what action is taken when the stencil test passes, but the depth test fails. See glStencilOp.

  • GL_STENCIL_PASS_DEPTH_PASS (1.1 only)
  • params returns one value, a symbolic constant indicating what action is taken when the stencil test passes, and the depth test passes. See glStencilOp.

  • GL_STENCIL_REF (1.1 only)
  • params returns one value, the reference value that is compared with the contents of the stencil buffer. See glStencilFunc.

  • GL_STENCIL_VALUE_MASK (1.1 only)
  • params returns one value, the mask that is used to mask both the stencil reference value and the stencil buffer value before they are compared. See glStencilFunc.

  • GL_STENCIL_WRITEMASK (1.1 only)
  • params returns one value, the mask that controls writing of the stencil bitplanes. See glStencilMask.

  • GL_SUBPIXEL_BITS
  • params returns one value, an estimate of the number of bits of subpixel resolution that are used to position rasterized geometry in window coordinates. The value must be at least 4.

  • GL_TEXTURE_BINDING_2D (1.1 only)
  • params returns one value, the name of the texture currently bound to the target GL_TEXTURE_2D. See glBindTexture.

  • GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING (1.1 only)
  • params returns one value, the texture coordinate array buffer binding. See glTexCoordPointer.

  • GL_TEXTURE_COORD_ARRAY_SIZE (1.1 only)
  • params returns one value, the number of coordinates per element in the texture coordinate array. See glTexCoordPointer.

  • GL_TEXTURE_COORD_ARRAY_STRIDE (1.1 only)
  • params returns one value, the byte offset between consecutive elements in the texture coordinate array. See glTexCoordPointer.

  • GL_TEXTURE_COORD_ARRAY_TYPE (1.1 only)
  • params returns one value, returns the data type of each coordinate in the texture coordinate array. See glTexCoordPointer.

  • GL_TEXTURE_MATRIX (1.1 only)
  • params returns sixteen values: the texture matrix on the top of the texture matrix stack. See glPushMatrix.

  • GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES (OES_matrix_get extension)
  • params returns a representation of the floating point Texture matrix elements as as an array of integers, according to the IEEE 754 floating point "single format" bit layout. See glMatrixMode.

  • GL_TEXTURE_STACK_DEPTH (1.1 only)
  • params returns one value, the number of matrices on the texture matrix stack. See glBindTexture.

  • GL_UNPACK_ALIGNMENT (1.1 only)
  • params returns one value, the byte alignment used for reading pixel data from memory. See glPixelStore.

  • GL_VIEWPORT (1.1 only)
  • params returns four values:, the x and y window coordinates of the viewport, followed by its width and height. See glViewport.

  • GL_VERTEX_ARRAY_BUFFER_BINDING (1.1 only)
  • params returns one value, the vertex array buffer binding. See glVertexPointer.

  • GL_VERTEX_ARRAY_SIZE (1.1 only)
  • params returns one value, number of coordinates per vertex in the vertex array. See glVertexPointer.

  • GL_VERTEX_ARRAY_STRIDE (1.1 only)
  • params returns one value, the byte offset between consecutive vertexes in the vertex array. See glVertexPointer.

  • GL_VERTEX_ARRAY_TYPE (1.1 only)
  • params returns one value, returns the data type of each coordinate in the vertex array. See glVertexPointer.

  • GL_WEIGHT_ARRAY_BUFFER_BINDING_OES (OES_matrix_palette extension)
  • params returns one value, the weight array buffer binding. See glWeightPointer.

  • GL_WEIGHT_ARRAY_SIZE_OES (OES_matrix_palette extension)
  • params returns one value, the number of weights per vertex. See glWeightPointer.

  • GL_WEIGHT_ARRAY_STRIDE_OES (OES_matrix_palette extension)
  • params returns one value, the byte offset between weights per vertex. See glWeightPointer.

  • GL_WEIGHT_ARRAY_TYPE_OES (OES_matrix_palette extension)
  • params returns one value, the data type of each weight in the weight array. See glWeightPointer.

Errors

GL_INVALID_ENUM is generated if pname is not an accepted value.
Parameters:
  pname - Specifies the parameter value to be returned. Thesymbolic constants in the list above are accepted.
Parameters:
  params - Returns the value or values of the specifiedparameter.
Parameters:
  offset - the starting offset within theparams array.
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.




glGetIntegerv
void glGetIntegerv(int pname, IntBuffer params)(Code)
Integer Buffer version of glGetIntegerv.
See Also:   GL10.glGetIntegerv(int pname,int[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glGetString
String glGetString(int name)(Code)
Return a string describing the underlying GL implementation. The GL string is converted to UTF8 format to produce a standard Java String object.

glGetString returns a String describing some aspect of the current GL implementation. name can be one of the following:

  • GL_VENDOR
  • Returns the company responsible for this GL implementation. This name does not change from release to release.

  • GL_RENDERER
  • Returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release.

  • GL_VERSION
  • Returns the particular OpenGL ES profile as well as the version of that profile.

  • GL_EXTENSIONS
  • Returns a space-separated list of supported extensions to GL.

Because the GL does not include queries for the performance characteristics of an implementation, some applications are written to recognize known platforms and modify their GL usage based on known performance characteristics of these platforms. Strings GL_VENDOR and GL_RENDERER together uniquely specify a platform. They do not change from release to release and should be used by platform-recognition algorithms.

Some applications want to make use of features that are not part of the standard GL. These features may be implemented as extensions to the standard GL. The GL_EXTENSIONS string is a space-separated list of supported GL extensions. (Extension names never contain a space character.)

The GL_VERSION string begins with a version number. The version number uses one of these forms:

major_number.minor_number (1.0 only)

major_number.minor_number.release_number (1.0 only)

OpenGL ES-CM followed by major_number.minor_number for the common profile (1.1 only).

OpenGL ES-CL followed by major_number.minor_number for the common-lite profile (1.1 only).

On 1.0 implementations, vendor-specific information may follow the version number. A space always separates the version number and the vendor-specific information.

Notes

If an error is generated, glGetString returns NULL.

The client and server may support different versions or extensions. glGetString always returns a compatible version number or list of extensions. The release number always describes the server.

Errors

GL_INVALID_ENUM is generated if name is not an accepted value.
Parameters:
  name - Specifies a symbolic constant, one ofGL_VENDOR, GL_RENDERER,GL_VERSION, or GL_EXTENSIONS. A String formatted as described above.




glHint
void glHint(int target, int mode)(Code)
Specify implementation-specific hints.

Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints. A hint is specified with two arguments. target is a symbolic constant indicating the behavior to be controlled, and mode is another symbolic constant indicating the desired behavior. The initial value for each target is GL_DONT_CARE. mode can be one of the following:

  • GL_FASTEST
  • The most efficient option should be chosen.

  • GL_NICEST
  • The most correct, or highest quality, option should be chosen.

  • GL_DONT_CARE
  • No preference.

Though the implementation aspects that can be hinted are well defined, the interpretation of the hints depends on the implementation. The hint aspects that can be specified with target, along with suggested semantics, are as follows:

  • GL_FOG_HINT
  • Indicates the accuracy of fog calculation. If per-pixel fog calculation is not efficiently supported by the GL implementation, hinting GL_DONT_CARE or GL_FASTEST can result in per-vertex calculation of fog effects.

  • GL_LINE_SMOOTH_HINT
  • Indicates the sampling quality of antialiased lines. If a larger filter function is applied, hinting GL_NICEST can result in more pixel fragments being generated during rasterization,

  • GL_PERSPECTIVE_CORRECTION_HINT
  • Indicates the quality of color and texture coordinate interpolation. If perspective-corrected parameter interpolation is not efficiently supported by the GL implementation, hinting GL_DONT_CARE or GL_FASTEST can result in simple linear interpolation of colors and/or texture coordinates.

  • GL_POINT_SMOOTH_HINT
  • Indicates the sampling quality of antialiased points. If a larger filter function is applied, hinting GL_NICEST can result in more pixel fragments being generated during rasterization.

  • GL_GENERATE_MIPMAP_HINT (1.1 only)
  • Indicates the desired quality and performance of automatic mipmap level generation.

Notes

The interpretation of hints depends on the implementation. Some implementations ignore glHint settings.

Errors

GL_INVALID_ENUM is generated if either target or mode is not an accepted value.
Parameters:
  target - Specifies a symbolic constant indicating thebehavior to be controlled. GL_FOG_HINT ,GL_LINE_SMOOTH_HINT ,GL_PERSPECTIVE_CORRECTION_HINT, andGL_POINT_SMOOTH_HINT are accepted. On 1.1,GL_GENERATE_MIPMAP_HINT is additionally accepted.
Parameters:
  mode - Specifies a symbolic constant indicating the desiredbehavior. GL_FASTEST, GL_NICEST, andGL_DONT_CARE are accepted.




glLightModelf
void glLightModelf(int pname, float param)(Code)
Set the lighting model parameters.

glLightModel sets the lighting model parameter. pname names a parameter and param gives the new value. There is one single-valued lighting model parameter:

  • GL_LIGHT_MODEL_TWO_SIDE
  • param specifies whether one- or two-sided lighting calculations are done for polygons. It has no effect on the lighting calculations for points, lines, or bitmaps. If param is 0, one-sided lighting is specified, and only the front material parameters are used in the lighting equation. Otherwise, two-sided lighting is specified. In this case, vertices of back-facing polygons are lighted using the back material parameters, and have their normals reversed before the lighting equation is evaluated. Vertices of front-facing polygons are always lighted using the front material parameters, with no change to their normals. The initial value is 0.

Errors

GL_INVALID_ENUM is generated if pname is not an accepted value.
Parameters:
  pname - Specifies a single-valued lighting modelparameter. Must be GL_LIGHT_MODEL_TWO_SIDE.
Parameters:
  param - Specifies the value that param will beset to.




glLightModelfv
void glLightModelfv(int pname, float[] params, int offset)(Code)
Set the lighting model parameters (array version).

glLightModel sets the lighting model parameter. pname names a parameter and params gives the new value. There are two lighting model parameters:

  • GL_LIGHT_MODEL_AMBIENT
  • params contains four values that specify the ambient intensity of the entire scene. The values are not clamped. The initial value is (0.2, 0.2, 0.2, 1.0).

  • GL_LIGHT_MODEL_TWO_SIDE
  • params contains a single value that specifies whether one- or two-sided lighting calculations are done for polygons. It has no effect on the lighting calculations for points, lines, or bitmaps. If params contains 0, one-sided lighting is specified, and only the front material parameters are used in the lighting equation. Otherwise, two-sided lighting is specified. In this case, vertices of back-facing polygons are lighted using the back material parameters, and have their normals reversed before the lighting equation is evaluated. Vertices of front-facing polygons are always lighted using the front material parameters, with no change to their normals. The initial value is 0.

The lighted color of a vertex is the sum of the material emission intensity, the product of the material ambient reflectance and the lighting model full-scene ambient intensity, and the contribution of each enabled light source. Each light source contributes the sum of three terms: ambient, diffuse, and specular. The ambient light source contribution is the product of the material ambient reflectance and the light's ambient intensity. The diffuse light source contribution is the product of the material diffuse reflectance, the light's diffuse intensity, and the dot product of the vertex's normal with the normalized vector from the vertex to the light source. The specular light source contribution is the product of the material specular reflectance, the light's specular intensity, and the dot product of the normalized vertex-to-eye and vertex-to-light vectors, raised to the power of the shininess of the material. All three light source contributions are attenuated equally based on the distance from the vertex to the light source and on light source direction, spread exponent, and spread cutoff angle. All dot products are replaced with 0 if they evaluate to a negative value.

The alpha component of the resulting lighted color is set to the alpha value of the material diffuse reflectance.

Errors

GL_INVALID_ENUM is generated if pname is not an accepted value.
Parameters:
  pname - Specifies a lighting modelparameter. GL_LIGHT_MODEL_AMBIENT andGL_LIGHT_MODEL_TWO_SIDE are accepted.
Parameters:
  params - Specifies an array containing values that parameterpname will be set to.
Parameters:
  offset - the starting offset within theparams array.
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.




glLightModelfv
void glLightModelfv(int pname, FloatBuffer params)(Code)
Floating-point Buffer version of glLightModel.
See Also:   GL10.glLightModelfv(int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glLightModelx
void glLightModelx(int pname, int param)(Code)
Fixed-point version of glLightModel.
See Also:   GL10.glLightModelf(int pname,float param)



glLightModelxv
void glLightModelxv(int pname, int[] params, int offset)(Code)
Fixed-point array version of glLightModel.
See Also:   GL10.glLightModelfv(int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.



glLightModelxv
void glLightModelxv(int pname, IntBuffer params)(Code)
Fixed-point Buffer version of glLightModel.
See Also:   GL10.glLightModelfv(int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glLightf
void glLightf(int light, int pname, float param)(Code)
Set light source parameters.

glLight sets the values of individual light source parameters. light names the light and is a symbolic name of the form GL_LIGHTi, where 0 <= i < GL_MAX_LIGHTS. pname specifies one of ten light source parameters, again by symbolic name. param contains the new value.

To enable and disable lighting calculation, call glEnable and glDisable with argument GL_LIGHTING. Lighting is initially disabled. When it is enabled, light sources that are enabled contribute to the lighting calculation. Light source i is enabled and disabled using glEnable and glDisable with argument GL_LIGHTi.

The light parameters are as follows:

  • GL_SPOT_EXPONENT
  • param is a single value that specifies the intensity distribution of the light. Fixed-point and floating-point values are mapped directly. Only values in the range [0, 128] are accepted.

    Effective light intensity is attenuated by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lighted, raised to the power of the spot exponent. Thus, higher spot exponents result in a more focused light source, regardless of the spot cutoff angle (see GL_SPOT_CUTOFF, next paragraph). The initial spot exponent is 0, resulting in uniform light distribution.

  • GL_SPOT_CUTOFF
  • param is a single value that specifies the maximum spread angle of a light source. Fixed-point and floating-point values are mapped directly. Only values in the range [0, 90] and the special value 180 are accepted. If the angle between the direction of the light and the direction from the light to the vertex being lighted is greater than the spot cutoff angle, the light is completely masked. Otherwise, its intensity is controlled by the spot exponent and the attenuation factors. The initial spot cutoff is 180, resulting in uniform light distribution.

  • GL_CONSTANT_ATTENUATION, GL_LINEAR_ATTENUATION, GL_QUADRATIC_ATTENUATION
  • param is a single value that specifies one of the three light attenuation factors. Fixed-point and floating-point values are mapped directly. Only nonnegative values are accepted. If the light is positional, rather than directional, its intensity is attenuated by the reciprocal of the sum of the constant factor, the linear factor times the distance between the light and the vertex being lighted, and the quadratic factor times the square of the same distance. The initial attenuation factors are (1, 0, 0), resulting in no attenuation.

Notes

It is always the case that GL_LIGHTi = GL_LIGHT0 + i.

Errors

GL_INVALID_ENUM is generated if either light or pname is not an accepted value.

GL_INVALID_VALUE is generated if a spot exponent value is specified outside the range [0, 128], or if spot cutoff is specified outside the range [0, 90] (except for the special value 180), or if a negative attenuation factor is specified.
Parameters:
  light - Specifies a light. The number of lights depends onthe implementation, but at least eight lights are supported. Theyare identified by symbolic names of the formGL_LIGHTi where 0 <= i .
Parameters:
  pname - Specifies a single-valued light source parameter forlight. GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION, andGL_QUADRATIC_ATTENUATION are accepted.
Parameters:
  param - Specifies the value that parameterpname of light source light will be set to.




glLightfv
void glLightfv(int light, int pname, float[] params, int offset)(Code)
Set light source parameters (array version).

glLight sets the values of individual light source parameters. light names the light and is a symbolic name of the form GL_LIGHTi, where 0 <= i < GL_MAX_LIGHTS. pname specifies one of ten light source parameters, again by symbolic name. params is an array that contains the new values.

To enable and disable lighting calculation, call glEnable and glDisable with argument GL_LIGHTING. Lighting is initially disabled. When it is enabled, light sources that are enabled contribute to the lighting calculation. Light source i is enabled and disabled using glEnable and glDisable with argument GL_LIGHTi.

The light parameters are as follows:

  • GL_AMBIENT
  • params contains four values that specify the ambient RGBA intensity of the light. Both fixed-point and floating-point values are mapped directly. Neither fixed-point nor floating-point values are clamped. The initial ambient light intensity is (0, 0, 0, 1).

  • GL_DIFFUSE
  • params contains four values that specify the diffuse RGBA intensity of the light. Both fixed-point and floating-point values are mapped directly. Neither fixed-point nor floating-point values are clamped. The initial value for GL_LIGHT0 is (1, 1, 1, 1). For other lights, the initial value is (0, 0, 0, 0).

  • GL_SPECULAR
  • params contains four values that specify the specular RGBA intensity of the light. Both fixed-point and floating-point values are mapped directly. Neither fixed-point nor floating-point values are clamped. The initial value for GL_LIGHT0 is (1, 1, 1, 1). For other lights, the initial value is (0, 0, 0, 0).

  • GL_POSITION (1.0 only)
  • params contains four values that specify the position of the light in homogeneous object coordinates. Both fixed-point and floating-point values are mapped directly. Neither fixed-point nor floating-point values are clamped.

    The position is transformed by the modelview matrix when glLight is called (just as if it were a point), and it is stored in eye coordinates. If the w component of the position is 0, the light is treated as a directional source. Diffuse and specular lighting calculations take the light's direction, but not its actual position, into account, and attenuation is disabled. Otherwise, diffuse and specular lighting calculations are based on the actual location of the light in eye coordinates, and attenuation is enabled. The initial position is (0, 0, 1, 0). Thus, the initial light source is directional, parallel to, and in the direction of the -z axis.

  • GL_SPOT_DIRECTION
  • params contains three values that specify the direction of the light in homogeneous object coordinates. Both fixed-point and floating-point values are mapped directly. Neither fixed-point nor floating-point values are clamped.

    The spot direction is transformed by the inverse of the modelview matrix when glLight is called (just as if it were a normal), and it is stored in eye coordinates. It is significant only when GL_SPOT_CUTOFF is not 180, which it is initially. The initial direction is (0, 0, -1).

  • GL_SPOT_EXPONENT
  • params is a single value that specifies the intensity distribution of the light. Fixed-point and floating-point values are mapped directly. Only values in the range [0, 128] are accepted.

    Effective light intensity is attenuated by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lighted, raised to the power of the spot exponent. Thus, higher spot exponents result in a more focused light source, regardless of the spot cutoff angle (see GL_SPOT_CUTOFF, next paragraph). The initial spot exponent is 0, resulting in uniform light distribution.

  • GL_SPOT_CUTOFF
  • params is a single value that specifies the maximum spread angle of a light source. Fixed-point and floating-point values are mapped directly. Only values in the range [0, 90] and the special value 180 are accepted. If the angle between the direction of the light and the direction from the light to the vertex being lighted is greater than the spot cutoff angle, the light is completely masked. Otherwise, its intensity is controlled by the spot exponent and the attenuation factors. The initial spot cutoff is 180, resulting in uniform light distribution.

  • GL_CONSTANT_ATTENUATION, GL_LINEAR_ATTENUATION, GL_QUADRATIC_ATTENUATION
  • params is a single value that specifies one of the three light attenuation factors. Fixed-point and floating-point values are mapped directly. Only nonnegative values are accepted. If the light is positional, rather than directional, its intensity is attenuated by the reciprocal of the sum of the constant factor, the linear factor times the distance between the light and the vertex being lighted, and the quadratic factor times the square of the same distance. The initial attenuation factors are (1, 0, 0), resulting in no attenuation.

Notes

It is always the case that GL_LIGHTi = GL_LIGHT0 + i.

Errors

GL_INVALID_ENUM is generated if either light or pname is not an accepted value.

GL_INVALID_VALUE is generated if a spot exponent value is specified outside the range [0, 128], or if spot cutoff is specified outside the range [0, 90] (except for the special value 180), or if a negative attenuation factor is specified.
Parameters:
  light - Specifies a light. The number of lights depends onthe implementation, but at least eight lights are supported. Theyare identified by symbolic names of the formGL_LIGHTi where 0 <= i .
Parameters:
  pname - Specifies a light source parameter forlight. GL_AMBIENT, GL_DIFFUSE,GL_SPECULAR, GL_POSITION (1.0 only),GL_SPOT_CUTOFF, GL_SPOT_DIRECTION,GL_SPOT_EXPONENT,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION, andGL_QUADRATIC_ATTENUATION are accepted.
Parameters:
  params - Specifies an array containing values that parameterpname of light source light will be set to.
Parameters:
  offset - the starting offset within theparams array.
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.




glLightfv
void glLightfv(int light, int pname, FloatBuffer params)(Code)
Floating-point Buffer version of glLight.
See Also:   GL10.glLightfv(int light,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glLightx
void glLightx(int light, int pname, int param)(Code)
Fixed-point version of glLight.
See Also:   GL10.glLightf(int light,int pname,float param)



glLightxv
void glLightxv(int light, int pname, int[] params, int offset)(Code)
Fixed-point array version of glLight.
See Also:   GL10.glLightfv(int light,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.



glLightxv
void glLightxv(int light, int pname, IntBuffer params)(Code)
Fixed-point Buffer version of glLight.
See Also:   GL10.glLightfv(int light,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glLineWidth
void glLineWidth(float width)(Code)
Specify the width of rasterized lines.

glLineWidth specifies the rasterized width of both aliased and antialiased lines. Using a line width other than 1 has different effects, depending on whether line antialiasing is enabled. To enable and disable line antialiasing, call glEnable and glDisable with argument GL_LINE_SMOOTH. Line antialiasing is initially disabled.

If line antialiasing is disabled, the actual width is determined by rounding the supplied width to the nearest integer. (If the rounding results in the value 0, it is as if the line width were 1.) If |delta x| >= |delta y|, i pixels are filled in each column that is rasterized, where i is the rounded value of width. Otherwise, i pixels are filled in each row that is rasterized.

If antialiasing is enabled, line rasterization produces a fragment for each pixel square that intersects the region lying within the rectangle having width equal to the current line width, length equal to the actual length of the line, and centered on the mathematical line segment. The coverage value for each fragment is the window coordinate area of the intersection of the rectangular region with the corresponding pixel square. This value is saved and used in the final rasterization step.

Not all widths can be supported when line antialiasing is enabled. If an unsupported width is requested, the nearest supported width is used. Only width 1 is guaranteed to be supported; others depend on the implementation. Likewise, there is a range for aliased line widths as well. To query the range of supported widths and the size difference between supported widths within the range, call glGetIntegerv with arguments GL_ALIASED_LINE_WIDTH_RANGE, GL_SMOOTH_LINE_WIDTH_RANGE, GL_SMOOTH_LINE_WIDTH_GRANULARITY.

Notes

Nonantialiased line width may be clamped to an implementation-dependent maximum. Call glGetIntegerv with GL_ALIASED_LINE_WIDTH_RANGE to determine the maximum width.

Errors

GL_INVALID_VALUE is generated if width is less than or equal to 0.

Associated Gets

glGetIntegerv with argument GL_ALIASED_LINE_WIDTH_RANGE

glGetIntegerv with argument GL_SMOOTH_LINE_WIDTH_RANGE
Parameters:
  width - Specifies the width of rasterized lines. The initialvalue is 1.




glLineWidthx
void glLineWidthx(int width)(Code)
Fixed-point version of glLineWidth.
See Also:   GL10.glLineWidth



glLoadIdentity
void glLoadIdentity()(Code)
Replace the current matrix with the identity matrix.

glLoadIdentity replaces the current matrix with the identity matrix. It is semantically equivalent to calling glLoadMatrix with the identity matrix

 ( 1       0       0       0 )
 ( 0       1       0       0 )
 ( 0       0       1       0 )
 ( 0       0       0       1 )
 
but in some cases it is more efficient.



glLoadMatrixf
void glLoadMatrixf(float[] m, int offset)(Code)
Replace the current matrix with the specified matrix.

glLoadMatrix replaces the current matrix with the one whose elements are specified by m. The current matrix is the projection matrix, modelview matrix, or texture matrix, depending on the current matrix mode (see glMatrixMode).

The current matrix, M, defines a transformation of coordinates. For instance, assume M refers to the modelview matrix. If v = (v[0], v[1], v[2], v[3]) is the set of object coordinates of a vertex, and m is an array of 16 fixed-point or single-precision floating-point values m[0], m[1], ..., m[15], then the modelview transformation M(v) does the following:

 ( m[0] m[4] m[8]  m[12] )   ( v[0] )
 M(v) = ( m[1] m[5] m[9]  m[13] ) x ( v[1] )
 ( m[2] m[6] m[10] m[14] )   ( v[2] )
 ( m[3] m[7] m[11] m[15] )   ( v[3] )
 
where "x" denotes matrix multiplication.

Projection and texture transformations are similarly defined.

Notes

While the elements of the matrix may be specified with single or double precision, the GL implementation may store or operate on these values in less than single precision.
Parameters:
  m - Specifies an array of at least 16 consecutive values,the first 16 of which are used as the elements of a 4 × 4column-major matrix.
Parameters:
  offset - the starting offset within them array.
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if m.length -offset is less than 16.




glLoadMatrixf
void glLoadMatrixf(FloatBuffer m)(Code)
Floating-point Buffer version of glLoadMatrix.
See Also:   GL10.glLoadMatrixf(float[] m,int offset)
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if m.remaining()is less than 16.



glLoadMatrixx
void glLoadMatrixx(int[] m, int offset)(Code)
Fixed-point array version of glLoadMatrix.
See Also:   GL10.glLoadMatrixf(float[] m,int offset)
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if m.length -offset is less than 16.



glLoadMatrixx
void glLoadMatrixx(IntBuffer m)(Code)
Fixed-point Buffer version of glLoadMatrix.
See Also:   GL10.glLoadMatrixf(float[] m,int offset)
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if m.remaining()is less than 16.



glLogicOp
void glLogicOp(int opcode)(Code)
Specify a logical pixel operation.

glLogicOp specifies a logical operation that, when enabled, is applied between the incoming color and the color at the corresponding location in the frame buffer. To enable or disable the logical operation, call glEnable and glDisable with argument GL_COLOR_LOGIC_OP. Logical operation is initially disabled.

 Opcode            Resulting Operation
 GL_CLEAR                     0
 GL_SET                       1
 GL_COPY                      s
 GL_COPY_INVERTED           ~ s
 GL_NOOP                      d
 GL_INVERT                  ~ d
 GL_AND                 s &   d
 GL_NAND             ~ (s &   d)
 GL_OR                  s |   d
 GL_NOR              ~ (s |   d)
 GL_XOR                 s ^   d
 GL_EQUIV            ~ (s ^   d)
 GL_AND_REVERSE         s & ~ d
 GL_AND_INVERTED      ~ s &   d
 GL_OR_REVERSE          s | ~ d
 GL_OR_INVERTED       ~ s |   d
 

opcode is a symbolic constant chosen from the list above. In the explanation of the logical operations, s represents the incoming color and d represents the color in the frame buffer. As in the Java language, "~" represents bitwise negation, "&" represents bitwise AND, "|" represents bitwise OR, and "^" represents bitwise XOR. As these bitwise operators suggest, the logical operation is applied independently to each bit pair of the source and destination indices or colors.

Errors

GL_INVALID_ENUM is generated if opcode is not an accepted value.
Parameters:
  opcode - Specifies a symbolic constant that selects alogical operation. The following symbols are accepted:GL_CLEAR, GL_SET, GL_COPY,GL_COPY_INVERTED, GL_NOOP,GL_INVERT, GL_AND,GL_NAND, GL_OR, GL_NOR,GL_XOR, GL_EQUIV,GL_AND_REVERSE, GL_AND_INVERTED,GL_OR_REVERSE, and GL_OR_INVERTED. Theinitial value is GL_COPY.




glMaterialf
void glMaterialf(int face, int pname, float param)(Code)
Specify material parameters for the lighting model.

glMaterial assigns values to material parameters. There are two matched sets of material parameters. One, the front-facing set, is used to shade points, lines, and all polygons (when two-sided lighting is disabled), or just front-facing polygons (when two-sided lighting is enabled). The other set, back-facing, is used to shade back-facing polygons only when two-sided lighting is enabled. Refer to the glLightModel reference page for details concerning one- and two-sided lighting calculations.

glMaterial takes three arguments. The first, face, must be GL_FRONT_AND_BACK and specifies that both front and back materials will be modified. The second, pname, specifies which of several parameters in one or both sets will be modified. The third, params, specifies what value or values will be assigned to the specified parameter.

Material parameters are used in the lighting equation that is optionally applied to each vertex. The equation is discussed in the glLightModel reference page. The parameters that can be specified using glMaterial, and their interpretations by the lighting equation, are as follows:

  • GL_AMBIENT
  • params contains four fixed-point or floating-point values that specify the ambient RGBA reflectance of the material. The values are not clamped. The initial ambient reflectance is (0.2, 0.2, 0.2, 1.0).

  • GL_DIFFUSE
  • params contains four fixed-point or floating-point values that specify the diffuse RGBA reflectance of the material. The values are not clamped. The initial diffuse reflectance is (0.8, 0.8, 0.8, 1.0).

  • GL_SPECULAR
  • params contains four fixed-point or floating-point values that specify the specular RGBA reflectance of the material. The values are not clamped. The initial specular reflectance is (0, 0, 0, 1).

  • GL_EMISSION
  • params contains four fixed-point or floating-point values that specify the RGBA emitted light intensity of the material. The values are not clamped. The initial emission intensity is (0, 0, 0, 1).

  • GL_SHININESS
  • params is a single fixed-point or floating-point value that specifies the RGBA specular exponent of the material. Only values in the range [0, 128] are accepted. The initial specular exponent is 0.

  • GL_AMBIENT_AND_DIFFUSE
  • Equivalent to calling glMaterial twice with the same parameter values, once with GL_AMBIENT and once with GL_DIFFUSE.

Notes

To change the diffuse and ambient material per vertex, color material can be used. To enable and disable GL_COLOR_MATERIAL, call glEnable and glDisable with argument GL_COLOR_MATERIAL. Color material is initially disabled.

While the ambient, diffuse, specular and emission material parameters all have alpha components, only the diffuse alpha component is used in the lighting computation.

Errors

GL_INVALID_ENUM is generated if either face or pname is not an accepted value.

GL_INVALID_VALUE is generated if a specular exponent outside the range [0, 128] is specified.
Parameters:
  face - Specifies which face or faces are being updated. Mustbe GL_FRONT_AND_BACK.
Parameters:
  pname - Specifies the single-valued material parameter ofthe face or faces that is being updated. Must beGL_SHININESS.
Parameters:
  param - Specifies the value that parameterGL_SHININESS will be set to.




glMaterialfv
void glMaterialfv(int face, int pname, float[] params, int offset)(Code)
Specify material parameters for the lighting model (array version).

glMaterial assigns values to material parameters. There are two matched sets of material parameters. One, the front-facing set, is used to shade points, lines, and all polygons (when two-sided lighting is disabled), or just front-facing polygons (when two-sided lighting is enabled). The other set, back-facing, is used to shade back-facing polygons only when two-sided lighting is enabled. Refer to the glLightModel reference page for details concerning one- and two-sided lighting calculations.

glMaterial takes three arguments. The first, face, must be GL_FRONT_AND_BACK and specifies that both front and back materials will be modified. The second, pname, specifies which of several parameters in one or both sets will be modified. The third, params, specifies what value or values will be assigned to the specified parameter.

Material parameters are used in the lighting equation that is optionally applied to each vertex. The equation is discussed in the glLightModel reference page. The parameters that can be specified using glMaterial, and their interpretations by the lighting equation, are as follows:

  • GL_AMBIENT
  • params contains four fixed-point or floating-point values that specify the ambient RGBA reflectance of the material. The values are not clamped. The initial ambient reflectance is (0.2, 0.2, 0.2, 1.0).

  • GL_DIFFUSE
  • params contains four fixed-point or floating-point values that specify the diffuse RGBA reflectance of the material. The values are not clamped. The initial diffuse reflectance is (0.8, 0.8, 0.8, 1.0).

  • GL_SPECULAR
  • params contains four fixed-point or floating-point values that specify the specular RGBA reflectance of the material. The values are not clamped. The initial specular reflectance is (0, 0, 0, 1).

  • GL_EMISSION
  • params contains four fixed-point or floating-point values that specify the RGBA emitted light intensity of the material. The values are not clamped. The initial emission intensity is (0, 0, 0, 1).

  • GL_SHININESS
  • params is a single fixed-point or floating-point value that specifies the RGBA specular exponent of the material. Only values in the range [0, 128] are accepted. The initial specular exponent is 0.

  • GL_AMBIENT_AND_DIFFUSE
  • Equivalent to calling glMaterial twice with the same parameter values, once with GL_AMBIENT and once with GL_DIFFUSE.

Notes

To change the diffuse and ambient material per vertex, color material can be used. To enable and disable GL_COLOR_MATERIAL, call glEnable and glDisable with argument GL_COLOR_MATERIAL. Color material is initially disabled.

While the ambient, diffuse, specular and emission material parameters all have alpha components, only the diffuse alpha component is used in the lighting computation.

Errors

GL_INVALID_ENUM is generated if either face or pname is not an accepted value.

GL_INVALID_VALUE is generated if a specular exponent outside the range [0, 128] is specified.
Parameters:
  face - Specifies which face or faces are being updated. Mustbe GL_FRONT_AND_BACK.
Parameters:
  pname - Specifies the material parameter of the face orfaces that is being updated. Must be one ofGL_AMBIENT, GL_DIFFUSE,GL_SPECULAR, GL_EMISSION,GL_SHININESS, orGL_AMBIENT_AND_DIFFUSE.
Parameters:
  params - Specifies a pointer to the value or values thatpname will be set to.
Parameters:
  offset - the starting offset within theparams array.
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.




glMaterialfv
void glMaterialfv(int face, int pname, FloatBuffer params)(Code)
Floating-point Buffer version of glMaterial.
See Also:   GL10.glMaterialfv(int face,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glMaterialx
void glMaterialx(int face, int pname, int param)(Code)
Fixed-point version of glMaterial.
See Also:   GL10.glMaterialf(int face,int pname,float param)



glMaterialxv
void glMaterialxv(int face, int pname, int[] params, int offset)(Code)
Fixed-point array version of glMaterial.
See Also:   GL10.glMaterialfv(int face,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.



glMaterialxv
void glMaterialxv(int face, int pname, IntBuffer params)(Code)
Fixed-point Buffer version of glMaterial.
See Also:   GL10.glMaterialfv(int face,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glMatrixMode
void glMatrixMode(int mode)(Code)
Specify which matrix is the current matrix.

glMatrixMode sets the current matrix mode. mode can assume one of three values:

  • GL_MODELVIEW
  • Applies subsequent matrix operations to the modelview matrix stack.

  • GL_PROJECTION
  • Applies subsequent matrix operations to the projection matrix stack.

  • GL_TEXTURE
  • Applies subsequent matrix operations to the texture matrix stack.

  • GL_MATRIX_PALETTE_OES (OES_matrix_palette extension)
  • Enables the matrix palette stack extension, and applies subsequent matrix operations to the matrix palette stack.

Errors

GL_INVALID_ENUM is generated if mode is not an accepted value.
Parameters:
  mode - Specifies which matrix stack is the target forsubsequent matrix operations. These values are accepted:GL_MODELVIEW, GL_PROJECTION, andGL_TEXTURE. In the OES_matrix_paletteextension is available, GL_MATRIX_PALETTE_OES isadditionally accepted. The initial value isGL_MODELVIEW.




glMultMatrixf
void glMultMatrixf(float[] m, int offset)(Code)
Multiply the current matrix with the specified matrix.

glMultMatrix multiplies the current matrix with the one specified using m, and replaces the current matrix with the product.

The current matrix is determined by the current matrix mode (see glMatrixMode). It is either the projection matrix, modelview matrix, or the texture matrix.

Examples

If the current matrix is C, and the coordinates to be transformed are, v = (v[0], v[1], v[2], v[3]), then the current transformation is C x v, or

 ( c[0] c[4] c[8]  c[12] )   ( v[0] )
 ( c[1] c[5] c[9]  c[13] ) x ( v[1] )
 ( c[2] c[6] c[10] c[14] )   ( v[2] )
 ( c[3] c[7] c[11] c[15] )   ( v[3] )
 

Calling glMultMatrix with an argument of m = m[0], m[1], ..., m[15] replaces the current transformation with (C x M) x v, or

 ( c[0] c[4] c[8]  c[12] )   ( m[0] m[4] m[8]  m[12] )   ( v[0] )
 ( c[1] c[5] c[9]  c[13] ) x ( m[1] m[5] m[9]  m[13] ) x ( v[1] )
 ( c[2] c[6] c[10] c[14] )   ( m[2] m[6] m[10] m[14] )   ( v[2] )
 ( c[3] c[7] c[11] c[15] )   ( m[3] m[7] m[11] m[15] )   ( v[3] )
 

where "x" denotes matrix multiplication, and v is represented as a 4 × 1 matrix.

Notes

While the elements of the matrix may be specified with single or double precision, the GL may store or operate on these values in less than single precision.

The array elements are passed in as a one-dimensional array in column-major order. The order of the multiplication is important. For example, if the current transformation is a rotation, and glMultMatrix is called with a translation matrix, the translation is done directly on the coordinates to be transformed, while the rotation is done on the results of that translation.
Parameters:
  m - Specifies an array of at least 16 consecutive values,the first 16 of which are used as the elements of a 4 × 4column-major matrix.
Parameters:
  offset - the starting offset within them array.
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if m.length -offset is less than 16.




glMultMatrixf
void glMultMatrixf(FloatBuffer m)(Code)
Floating-point Buffer version of glMultMatrix.
See Also:   GL10.glMultMatrixf(float[] m,int offset)
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if m.remaining()is less than 16.



glMultMatrixx
void glMultMatrixx(int[] m, int offset)(Code)
Fixed-point array version of glMultMatrix.
See Also:   GL10.glMultMatrixf(float[] m,int offset)
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if m.length -offset is less than 16.



glMultMatrixx
void glMultMatrixx(IntBuffer m)(Code)
Fixed-point Buffer version of glMultMatrix.
See Also:   GL10.glMultMatrixf(float[] m,int offset)
exception:
  IllegalArgumentException - if m isnull.
exception:
  IllegalArgumentException - if m.remaining()is less than 16.



glMultiTexCoord4f
void glMultiTexCoord4f(int target, float s, float t, float r, float q)(Code)
Set the current texture coordinates.

glMultiTexCoord specifies the four texture coordinates as (s, t, r, q).

The current texture coordinates are part of the data that is associated with each vertex.

Notes

It is always the case that GL_TEXTUREi = GL_TEXTURE0 + i.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_UNITS.
Parameters:
  target - Specifies texture unit whose coordinates should bemodified. The number of texture units is implementationdependent, but must be at least one. Must be one ofGL_TEXTUREi, where 0 <= i , which is an implementation-dependentvalue.
Parameters:
  s - Specifies an s texture coordinate for target textureunit. The initial value is 0.
Parameters:
  t - Specifies a t texture coordinate fortarget texture unit. The initial value is 0.
Parameters:
  r - Specifies an r texture coordinate fortarget texture unit. The initial value is 0.
Parameters:
  q - Specifies a q texture coordinate fortarget texture unit. The initial value is 1.




glMultiTexCoord4x
void glMultiTexCoord4x(int target, int s, int t, int r, int q)(Code)
Fixed-point version of glMultiTexCoord.
See Also:   GL10.glMultiTexCoord4f



glNormal3f
void glNormal3f(float nx, float ny, float nz)(Code)
Set the current normal vector.

The current normal is set to the given coordinates whenever glNormal is issued. Byte, short, or integer arguments are converted to floating-point with a linear mapping that maps the most positive representable integer value to 1.0, and the most negative representable integer value to -1.0.

Normals specified with glNormal need not have unit length. If GL_NORMALIZE is enabled, then normals of any length specified with glNormal are normalized after transformation. If GL_RESCALE_NORMAL is enabled, normals are scaled by a scaling factor derived from the modelview matrix. GL_RESCALE_NORMAL requires that the originally specified normals were of unit length, and that the modelview matrix contain only uniform scales for proper results. To enable and disable normalization, call glEnable and glDisable with either GL_NORMALIZE or GL_RESCALE_NORMAL. Normalization is initially disabled.
Parameters:
  nx - Specifies the x coordinate of the newcurrent normal. The initial value is 0.
Parameters:
  ny - Specifies the y coordinate of the newcurrent normal. The initial value is 0.
Parameters:
  nz - Specifies the z coordinate of the newcurrent normal. The initial value is 1.




glNormal3x
void glNormal3x(int nx, int ny, int nz)(Code)
Fixed-point version of glNormal.
See Also:   GL10.glNormal3f



glNormalPointer
void glNormalPointer(int type, int stride, Buffer pointer)(Code)
Define an array of normals.

glNormalPointer specifies the location and data of an array of normals to use when rendering. type specifies the data type of the normal coordinates and stride gives the byte stride from one normal to the next, allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations.) When a normal array is specified, type , stride , and pointer are saved as client-side state.

If the normal array is enabled, it is used when glDrawArrays or glDrawElements is called. To enable and disable the normal array, call glEnableClientState and glDisableClientState with the argument GL_NORMAL_ARRAY. The normal array is initially disabled and isn't accessed when glDrawArrays or glDrawElements is called.

Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes.

Notes

glNormalPointer is typically implemented on the client side.

Errors

GL_INVALID_ENUM is generated if type is not an accepted value.

GL_INVALID_VALUE is generated if stride is negative.

The pointer argument must be a direct buffer with a type matching that specified by the type argument.
Parameters:
  type - Specifies the data type of each coordinate in thearray. Symbolic constants GL_BYTE,GL_SHORT, GL_FIXED, andGL_FLOAT are accepted. The initial value isGL_FLOAT.
Parameters:
  stride - Specifies the byte offset between consecutivenormals. If stride is 0, the normals are understood to be tightlypacked in the array. The initial value is 0.
Parameters:
  pointer - Specifies a pointer to the first coordinate of thefirst normal in the array. The initial value is 0.
exception:
  IllegalStateException - if OpenGL ES 1.1 is being used andVBOs are enabled.
exception:
  IllegalArgumentException - if pointer isnull.
exception:
  IllegalArgumentException - if pointer is not direct.




glOrthof
void glOrthof(float left, float right, float bottom, float top, float near, float far)(Code)
Multiply the current matrix with an orthographic matrix.

glOrtho describes a transformation that produces a parallel projection. The current matrix (see glMatrixMode) is multiplied by this matrix and the result replaces the current matrix, as if glMultMatrix were called with the following matrix as its argument:

 ( 2/(right - left)           0                    0            tx )
 (          0          2/(top - bottom)            0            ty )
 (          0                 0          (-2)/(far - near)      tz )
 (          0                 0                    0             1 )
 

where

 tx = - (right + left)/(right - left)
 ty = - (top + bottom)/(top - bottom)
 tz = - (far + near)  /(far - near)
 

Typically, the matrix mode is GL_PROJECTION, and (left, bottom, -near) and (right, top, -near) specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, respectively, assuming that the eye is located at (0, 0, 0). -far specifies the location of the far clipping plane. Both near and far can be either positive or negative.

Use glPushMatrix and glPopMatrix to save and restore the current matrix stack.
Parameters:
  left - Specifies the coordinate for the leftvertical clipping plane.
Parameters:
  right - Specifies the coordinate for the rightvertical clipping plane.
Parameters:
  bottom - Specifies the coordinate for the bottomhorizontal clipping plane.
Parameters:
  top - Specifies the coordinate for the tophorizontal clipping plane.
Parameters:
  near - Specifies the distance to the nearerdepth clipping plane. This value is negative if the plane isto be behind the viewer.
Parameters:
  far - Specifies the distance to the fartherdepth clipping plane. This value is negative if the plane isto be behind the viewer.




glOrthox
void glOrthox(int left, int right, int bottom, int top, int near, int far)(Code)
Fixed-point version of glOrtho.
See Also:   GL10.glOrthof



glPixelStorei
void glPixelStorei(int pname, int param)(Code)
Set pixel storage modes.

glPixelStore sets pixel storage modes that affect the operation of subsequent glReadPixels as well as the unpacking of glTexImage2D, and glTexSubImage2D.

pname is a symbolic constant indicating the parameter to be set, and param is the new value. The following storage parameter affects how pixel data is returned to client memory. This value is significant for glReadPixels:

  • GL_PACK_ALIGNMENT
  • Specifies the alignment requirements for the start of each pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). The initial value is 4.

    The following storage parameter affects how pixel data is read from client memory. This value is significant for glTexImage2D and glTexSubImage2D:

  • GL_UNPACK_ALIGNMENT
  • Specifies the alignment requirements for the start of each pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). The initial value is 4.

Notes

Pixel storage modes are client states.

glCompressedTexImage2D and glCompressedTexSubImage2D are not affected by glPixelStore.

Errors

GL_INVALID_ENUM is generated if pname is not an accepted value.

GL_INVALID_VALUE is generated if alignment is specified as other than 1, 2, 4, or 8.
Parameters:
  pname - Specifies the symbolic name of the parameter to beset. GL_PACK_ALIGNMENT affects the packing of pixeldata into memory. GL_UNPACK_ALIGNMENT affects theunpacking of pixel data from memory.
Parameters:
  param - Specifies the value that pname is setto.




glPointSize
void glPointSize(float size)(Code)
Specify the diameter of rasterized points.

glPointSize specifies the rasterized diameter of both aliased and antialiased points. Using a point size other than 1 has different effects, depending on whether point antialiasing is enabled. To enable and disable point antialiasing, call glEnable and glDisable with argument GL_POINT_SMOOTH. Point antialiasing is initially disabled.

If point antialiasing is disabled, the actual size is determined by rounding the supplied size to the nearest integer. (If the rounding results in the value 0, it is as if the point size were 1.) If the rounded size is odd, then the center point (x, y) of the pixel fragment that represents the point is computed as

 (floor(xw) + 1/2, floor(yw) + 1/2)
 

where w subscripts indicate window coordinates. All pixels that lie within the square grid of the rounded size centered at (x, y) make up the fragment. If the size is even, the center point is

 (floor(xw + 1/2), floor(yw + 1/2))
 

and the rasterized fragment's centers are the half-integer window coordinates within the square of the rounded size centered at (x, y). All pixel fragments produced in rasterizing a nonantialiased point are assigned the same associated data, that of the vertex corresponding to the point.

If antialiasing is enabled, then point rasterization produces a fragment for each pixel square that intersects the region lying within the circle having diameter equal to the current point size and centered at the point's (xw, yw) . The coverage value for each fragment is the window coordinate area of the intersection of the circular region with the corresponding pixel square. This value is saved and used in the final rasterization step. The data associated with each fragment is the data associated with the point being rasterized.

Not all sizes are supported when point antialiasing is enabled. If an unsupported size is requested, the nearest supported size is used. Only size 1 is guaranteed to be supported; others depend on the implementation. To query the range of supported sizes, call glGetIntegerv with the argument GL_SMOOTH_POINT_SIZE_RANGE. For aliased points, query the supported ranges glGetIntegerv with the argument GL_ALIASED_POINT_SIZE_RANGE.

Notes

A non-antialiased point size may be clamped to an implementation-dependent maximum. Although this maximum cannot be queried, it must be no less than the maximum value for antialiased points, rounded to the nearest integer value.

Errors

GL_INVALID_VALUE is generated if size is less than or equal to 0.

Associated Gets

glGetIntegerv with argument GL_ALIASED_POINT_SIZE_RANGE

glGetIntegerv with argument GL_SMOOTH_POINT_SIZE_RANGE
Parameters:
  size - Specifies the diameter of rasterized points. Theinitial value is 1.




glPointSizex
void glPointSizex(int size)(Code)
Fixed-point version of glPointSize.
See Also:   GL10.glPointSize



glPolygonOffset
void glPolygonOffset(float factor, float units)(Code)
Set the scale and units used to calculate depth values.

When GL_POLYGON_OFFSET_FILL is enabled, each fragment's depth value will be offset after it is interpolated from the depth values of the appropriate vertices. The value of the offset is m * factor + r * units, where m is a measurement of the change in depth relative to the screen area of the polygon, and r is the smallest value that is guaranteed to produce a resolvable offset for a given implementation. The offset is added before the depth test is performed and before the value is written into the depth buffer.

glPolygonOffset is useful for for applying decals to surfaces.
Parameters:
  factor - Specifies a scale factor that is used to create avariable depth offset for each polygon. The initial value is 0.
Parameters:
  units - Is multiplied by an implementation-specific value tocreate a constant depth offset. The initial value is 0.




glPolygonOffsetx
void glPolygonOffsetx(int factor, int units)(Code)
Fixed-point version of glPolygonOffset.
See Also:   GL10.glPolygonOffset



glPopMatrix
void glPopMatrix()(Code)
Pop the current matrix stack.
See Also:   GL10.glPushMatrix



glPushMatrix
void glPushMatrix()(Code)
Push the current matrix stack.

There is a stack of matrices for each of the matrix modes. In GL_MODELVIEW mode, the stack depth is at least 16. In the other modes, GL_PROJECTION, and GL_TEXTURE, the depth is at least 2. The current matrix in any mode is the matrix on the top of the stack for that mode.

glPushMatrix pushes the current matrix stack down by one, duplicating the current matrix. That is, after a glPushMatrix call, the matrix on top of the stack is identical to the one below it.

glPopMatrix pops the current matrix stack, replacing the current matrix with the one below it on the stack.

Initially, each of the stacks contains one matrix, an identity matrix.

It is an error to push a full matrix stack, or to pop a matrix stack that contains only a single matrix. In either case, the error flag is set and no other change is made to GL state.

Notes

Each texture unit has its own texture matrix stack. Use glActiveTexture to select the desired texture matrix stack.

Errors

GL_STACK_OVERFLOW is generated if glPushMatrix is called while the current matrix stack is full.

GL_STACK_UNDERFLOW is generated if glPopMatrix is called while the current matrix stack contains only a single matrix.

Associated Gets

glGetIntegerv with argument GL_MAX_MODELVIEW_STACK_DEPTH

glGetIntegerv with argument GL_MAX_PROJECTION_STACK_DEPTH

glGetIntegerv with argument GL_MAX_TEXTURE_STACK_DEPTH

glGetIntegerv with argument GL_MAX_TEXTURE_UNITS




glReadPixels
void glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels)(Code)
Read a block of pixels from the color buffer.

glReadPixels returns pixel data from the color buffer, starting with the pixel whose lower left corner is at location (x, y), into client memory starting at location pixels. The processing of the pixel data before it is placed into client memory can be controlled with glPixelStore.

glReadPixels returns values from each pixel with lower left corner at (x + i, y + j) for 0 <= i < width and 0 <= j < height. This pixel is said to be the ith pixel in the jth row. Pixels are returned in row order from the lowest to the highest row, left to right in each row.

format specifies the format of the returned pixel values. GL_RGBA is always accepted, the value of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES may allow another format:

  • GL_RGBA
  • Each color component is converted to floating point such that zero intensity maps to 0 and full intensity maps to 1.

  • GL_RGB
  • Each element is an RGB triple. The GL converts it to floating point and assembles it into an RGBA element by attaching 1 for alpha.

  • GL_LUMINANCE
  • Each element is a single luminance value. The GL converts it to floating point and assembles it into an RGBA element by replicating the luminance value three times for red, green and blue and attaching 1 for alpha.

  • GL_LUMINANCE_ALPHA
  • Each element is a luminance/alpha pair. The GL converts it to floating point and assembles it into an RGBA element by replicating the luminance value three times for red, green and blue.

  • GL_ALPHA
  • Each element is a single alpha component. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for red, green and blue.

Unneeded data is then discarded. For example, GL_ALPHA discards the red, green, and blue components, while GL_RGB discards only the alpha component. GL_LUMINANCE computes a single-component value as the sum of the red, green, and blue components, and GL_LUMINANCE_ALPHA does the same, while keeping alpha as a second value. The final values are clamped to the range [0, 1].

Finally, the components are converted to the proper, as specified by type where each component is multiplied by 2^n - 1, where n is the number of bits per component.

Return values are placed in memory as follows. If format is GL_ALPHA, or GL_LUMINANCE, a single value is returned and the data for the ith pixel in the jth row is placed in location j * width + i. GL_RGB returns three values, GL_RGBA returns four values, and GL_LUMINANCE_ALPHA returns two values for each pixel, with all values corresponding to a single pixel occupying contiguous space in pixels. Storage parameter GL_PACK_ALIGNMENT set by glPixelStore, affects the way that data is written into memory. See glPixelStore for a description.

Notes

Values for pixels that lie outside the window connected to the current GL context are undefined.

If an error is generated, no change is made to the contents of pixels.

Errors

GL_INVALID_ENUM is generated if format is not GL_RGBA or the value of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES.

GL_INVALID_ENUM is generated if type is not GL_UNSIGNED_BYTE or the value of GL_IMPLEMENTATION_COLOR_READ_TYPE_OES.

GL_INVALID_VALUE is generated if either width or height is negative.

GL_INVALID_OPERATION is generated if format and type are neither (GL_RGBA, GL_UNSIGNED_BYTE) nor the values of (GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, GL_IMPLEMENTATION_COLOR_READ_TYPE_OES).

Associated Gets

glGetIntegerv with argument GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES

glGetIntegerv with argument GL_IMPLEMENTATION_COLOR_READ_TYPE_OES
Parameters:
  x - Specifies the window x coordinate of the first pixelthat is read from the color buffer. This location is the lowerleft corner of a rectangular block of pixels.
Parameters:
  y - Specifies the window y coordinate of the first pixelthat is read from the color buffer. This location is the lowerleft corner of a rectangular block of pixels.
Parameters:
  width - Specifies the width of the pixelrectangle. width and height of one correspond to a single pixel.
Parameters:
  height - Specifies the height of the pixelrectangle. width and height of one correspond to a single pixel.
Parameters:
  format - Specifies the format of the pixel data. Must beeither GL_RGBA or the value ofGL_IMPLEMENTATION_COLOR_READ_FORMAT_OES.
Parameters:
  type - Specifies the data type of the pixel data. Must beeither GL_UNSIGNED_BYTE or the value ofGL_IMPLEMENTATION_COLOR_READ_TYPE_OES.
Parameters:
  pixels - Returns the pixel data.
exception:
  IllegalArgumentException - if pixels isnull.
exception:
  IllegalArgumentException - if pixels doesnot contain enough room for the pixel data.




glRotatef
void glRotatef(float angle, float x, float y, float z)(Code)
Multiply the current matrix by a rotation matrix.

glRotate produces a rotation of angle degrees around the vector (x, y, z) . The current matrix (see glMatrixMode) is multiplied by a rotation matrix with the product replacing the current matrix, as if glMultMatrix were called with the following matrix as its argument:

 ( x^2(1 - c) + c        xy (1 - c) - zs       xz (1 - c) + ys       0 )
 ( xy (1 - c) + zs       y^2(1 - c) + c        yz (1 - c) - xs       0 )
 ( xz (1 - c) - ys       yz (1 - c) + xs       z^2(1 - c) + c        0 )
 (         0                    0                     0              1 )
 

Where c = cos (angle), s = sin (angle), and ||(x, y, z)|| = 1, (if not, the GL will normalize this vector).

If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects drawn after glRotate is called are rotated. Use glPushMatrix and glPopMatrix to save and restore the unrotated coordinate system.

Notes

This rotation follows the right-hand rule, so if the vector (x, y, z) points toward the user, the rotation will be counterclockwise.
Parameters:
  angle - Specifies the angle of rotation, in degrees.
Parameters:
  x - Specifies the x coordinate of a vector.
Parameters:
  y - Specifies the y coordinate of a vector.
Parameters:
  z - Specifies the z coordinate of a vector.




glRotatex
void glRotatex(int angle, int x, int y, int z)(Code)
Fixed-point version of glRotate.
See Also:   GL10.glRotatef



glSampleCoverage
void glSampleCoverage(float value, boolean invert)(Code)
Specify mask to modify multisampled pixel fragments.

glSampleCoverage defines a mask to modify the coverage of multisampled pixel fragments. This capability is used for antialiased screen-door transparency and smooth transitions between two renderings of an object (often for level-of-detail management in simulation systems).

When multisampling is enabled (see glEnable with argument GL_MULTISAMPLE) a ``fragment mask'' is computed for each fragment generated by a primitive. This mask reflects the amount of the pixel covered by the fragment, and determines the frame buffer samples that may be affected by the fragment.

If conversion of alpha values to masks is enabled (glEnable with argument GL_SAMPLE_ALPHA_TO_MASK), the fragment alpha value is used to generate a temporary modification mask which is then ANDed with the fragment mask. One way to interpret this is as a form of dithering: a multivalued alpha (coverage or opacity) for the whole fragment is converted to simple binary values of coverage at many locations (the samples).

After conversion of alpha values to masks, if replacement of alpha values is enabled (glEnable with argument GL_SAMPLE_ALPHA_TO_ONE), the fragment's alpha is set to the maximum allowable value.

Finally, if fragment mask modification is enabled (glEnable with argument GL_SAMPLE_MASK), glSampleCoverage defines an additional modification mask. value is used to generate a modification mask in much the same way alpha was used above. If invert is GL_TRUE, then the modification mask specified by value will be inverted. The final modification mask will then be ANDed with the fragment mask resulting from the previous steps. This can be viewed as an ``override'' control that selectively fades the effects of multisampled fragments.

Note that glSampleCoverage(value, GL_TRUE) is not necessarily equivalent to glSampleCoverage(1.0 - value, GL_FALSE); due to round-off and other issues, complementing the coverage will not necessarily yield an inverted modification mask.
Parameters:
  value - Specifies the coverage of the modification mask. Thevalue is clamped to the range [0, 1], where 0represents no coverage and 1 full coverage. The initial value is1.
Parameters:
  invert - Specifies whether the modification mask implied byvalue is inverted or not. The initial value is GL_FALSE.




glSampleCoveragex
void glSampleCoveragex(int value, boolean invert)(Code)
Fixed-point version of glSampleCoverage.
See Also:   GL10.glSampleCoverage



glScalef
void glScalef(float x, float y, float z)(Code)
Multiply the current matrix by a general scaling matrix.

glScale produces a nonuniform scaling along the x, y, and z axes. The three parameters indicate the desired scale factor along each of the three axes.

The current matrix (see glMatrixMode) is multiplied by this scale matrix, and the product replaces the current matrix as if glScale were called with the following matrix as its argument:

 
 ( x       0       0       0 )
 ( 0       y       0       0 )
 ( 0       0       z       0 )
 ( 0       0       0       1 )
 

If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects drawn after glScale is called are scaled.

Use glPushMatrix and glPopMatrix to save and restore the unscaled coordinate system.

Notes

If scale factors other than 1 are applied to the modelview matrix and lighting is enabled, lighting often appears wrong. In that case, enable automatic normalization of normals by calling glEnable with the argument GL_NORMALIZE.
Parameters:
  x - Specifies the scale factor along the x axis.
Parameters:
  y - Specifies the scale factor along the y axis.
Parameters:
  z - Specifies the scale factor along the z axis.




glScalex
void glScalex(int x, int y, int z)(Code)
Fixed-point version of glScale.
See Also:   GL10.glScalef



glScissor
void glScissor(int x, int y, int width, int height)(Code)
Define the scissor box.

glScissor defines a rectangle, called the scissor box, in window coordinates. The first two arguments, x and y, specify the lower left corner of the box. width and height specify the width and height of the box.

To enable and disable the scissor test, call glEnable and glDisable with argument GL_SCISSOR_TEST. The scissor test is initially disabled. While scissor test is enabled, only pixels that lie within the scissor box can be modified by drawing commands. Window coordinates have integer values at the shared corners of frame buffer pixels. glScissor(0, 0, 1, 1) allows modification of only the lower left pixel in the window, and glScissor(0, 0, 0, 0) doesn't allow modification of any pixels in the window.

When the scissor test is disabled, it is as though the scissor box includes the entire window.

Errors

GL_INVALID_VALUE is generated if either width or height is negative.
Parameters:
  x - Specifies the x coordinate of the lower left cornerof the scissor box, in pixels. The initial value is 0.
Parameters:
  y - Specifies the y coordinate of the lower left cornerof the scissor box, in pixels. The initial value is 0.
Parameters:
  width - Specifies the width of the scissor box. When a GLcontext is first attached to a surface (e.g. window), width andheight are set to the dimensions of that surface.
Parameters:
  height - Specifies the height of the scissor box. When a GLcontext is first attached to a surface (e.g. window), width andheight are set to the dimensions of that surface.




glShadeModel
void glShadeModel(int mode)(Code)
Select flat or smooth shading.

GL primitives can have either flat or smooth shading. Smooth shading, the default, causes the computed colors of vertices to be interpolated as the primitive is rasterized, typically assigning different colors to each resulting pixel fragment. Flat shading selects the computed color of just one vertex and assigns it to all the pixel fragments generated by rasterizing a single primitive. In either case, the computed color of a vertex is the result of lighting if lighting is enabled, or it is the current color at the time the vertex was specified if lighting is disabled.

Flat and smooth shading are indistinguishable for points. Starting at the beginning of the vertex array and counting vertices and primitives from 1, the GL gives each flat-shaded line segment i the computed color of vertex i + 1, its second vertex. Counting similarly from 1, the GL gives each flat-shaded polygon the computed color of vertex i + 2, which is the last vertex to specify the polygon.

Flat and smooth shading are specified by glShadeModel with mode set to GL_FLAT and GL_SMOOTH, respectively.

Errors

GL_INVALID_ENUM is generated if mode is any value other than GL_FLAT or GL_SMOOTH.
Parameters:
  mode - Specifies a symbolic value representing a shadingtechnique. Accepted values are GL_FLAT andGL_SMOOTH. The initial value isGL_SMOOTH.




glStencilFunc
void glStencilFunc(int func, int ref, int mask)(Code)
Set function and reference value for stencil testing.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.

The stencil test conditionally eliminates a pixel based on the outcome of a comparison between the reference value and the value in the stencil buffer. To enable and disable stencil test, call glEnable and glDisable with argument GL_STENCIL_TEST. Stencil test is initially disabled. To specify actions based on the outcome of the stencil test, call glStencilOp.

func is a symbolic constant that determines the stencil comparison function. It accepts one of eight values, shown in the following list. ref is an integer reference value that is used in the stencil comparison. It is clamped to the range [0, 2^n - 1], where n is the number of bitplanes in the stencil buffer. mask is bitwise ANDed with both the reference value and the stored stencil value, with the ANDed values participating in the comparison.

If stencil represents the value stored in the corresponding stencil buffer location, the following list shows the effect of each comparison function that can be specified by func. Only if the comparison succeeds is the pixel passed through to the next stage in the rasterization process (see glStencilOp). All tests treat stencil values as unsigned integers in the range [0, 2^n - 1], where n is the number of bitplanes in the stencil buffer.

The following values are accepted by func:

  • GL_NEVER
  • Always fails.

  • GL_LESS
  • Passes if (ref & mask) < (stencil & mask) .

  • GL_LEQUAL
  • Passes if (ref & mask) <= (stencil & mask) .

  • GL_GREATER
  • Passes if (ref & mask) > (stencil & mask) .

  • GL_GEQUAL
  • Passes if (ref & mask) >= (stencil & mask) .

  • GL_EQUAL
  • Passes if (ref & mask) == (stencil & mask) .

  • GL_NOTEQUAL
  • Passes if (ref & mask) != (stencil & mask) .

  • GL_ALWAYS
  • Always passes.

Notes

Initially, the stencil test is disabled. If there is no stencil buffer, no stencil modification can occur and it is as if the stencil test always passes.

Errors

GL_INVALID_ENUM is generated if func is not one of the eight accepted values.

Associated Gets

glGetIntegerv with argument GL_STENCIL_BITS
Parameters:
  func - Specifies the test function. Eight tokens are valid:GL_NEVER, GL_LESS,GL_LEQUAL, GL_GREATER,GL_GEQUAL, GL_EQUAL,GL_NOTEQUAL, and GL_ALWAYS. The initialvalue is GL_ALWAYS.
Parameters:
  ref - Specifies the reference value for the stenciltest. ref is clamped to the range [0, 2^n -1], where n is the number of bitplanes in thestencil buffer. The initial value is 0.
Parameters:
  mask - Specifies a mask that is ANDed with both thereference value and the stored stencil value when the test isdone. The initial value is all 1's.




glStencilMask
void glStencilMask(int mask)(Code)
Control the writing of individual bits in the stencil planes.

glStencilMask controls the writing of individual bits in the stencil planes. The least significant n bits of mask, where n is the number of bits in the stencil buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected. Initially, all bits are enabled for writing.

Associated Gets

glGetIntegerv with argument GL_STENCIL_BITS
Parameters:
  mask - Specifies a bit mask to enable and disable writing ofindividual bits in the stencil planes. The initial value is all1's.




glStencilOp
void glStencilOp(int fail, int zfail, int zpass)(Code)
Set stencil test actions.

Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.

The stencil test conditionally eliminates a pixel based on the outcome of a comparison between the value in the stencil buffer and a reference value. To enable and disable stencil test, call glEnable and glDisable with argument GL_STENCIL_TEST. To control it, call glStencilFunc. Stenciling is initially disabled.

glStencilOp takes three arguments that indicate what happens to the stored stencil value while stenciling is enabled. If the stencil test fails, no change is made to the pixel's color or depth buffers, and fail specifies what happens to the stencil buffer contents. The following six actions are possible.

  • GL_KEEP
  • Keeps the current value.

  • GL_ZERO
  • Sets the stencil buffer value to 0.

  • GL_REPLACE
  • Sets the stencil buffer value to ref, as specified by glStencilFunc.

  • GL_INCR
  • Increments the current stencil buffer value. Clamps to the maximum representable unsigned value.

  • GL_DECR
  • Decrements the current stencil buffer value. Clamps to 0.

  • GL_INVERT
  • Bitwise inverts the current stencil buffer value. <--

  • (OES_stencil_wrap extension) GL_DECR_WRAP
  • Decrements the current stencil buffer value, wrapping around to the maximum representable unsigned value if less than 0.

  • (OES_stencil_wrap extension) GL_INCR
  • Increments the current stencil buffer value, wrapping around to 0 if greater than the maximum representable unsigned value. -->

Stencil buffer values are treated as unsigned integers. When incremented and decremented, values are clamped to 0 and 2^n - 1, where n is the value returned by querying GL_STENCIL_BITS.

The other two arguments to glStencilOp specify stencil buffer actions that depend on whether subsequent depth buffer tests succeed (zpass) or fail (zfail) (see glDepthFunc). The actions are specified using the same six symbolic constants as fail. Note that zfail is ignored when there is no depth buffer, or when the depth buffer is not enabled. In these cases, fail and zpass specify stencil action when the stencil test fails and passes, respectively.

Notes

If there is no stencil buffer, no stencil modification can occur and it is as if the stencil tests always pass, regardless of any call to glStencilOp.

Errors

GL_INVALID_ENUM is generated if fail, zfail, or zpass is any value other than the six defined constant values.

Associated Gets

glGetIntegerv with argument GL_STENCIL_BITS
Parameters:
  fail - Specifies the action to take when the stencil testfails. Six symbolic constants are accepted: GL_KEEP,GL_ZERO, GL_REPLACE,GL_INCR, GL_DECR, andGL_INVERT . The initial value is GL_KEEP.
Parameters:
  zfail - Specifies the stencil action when the stencil testpasses, but the depth test fails. zfail accepts thesame symbolic constants as fail. The initial valueis GL_KEEP.
Parameters:
  zpass - Specifies the stencil action when both the stenciltest and the depth test pass, or when the stencil test passes andeither there is no depth buffer or depth testing is notenabled. zpass accepts the same symbolic constantsas fail. The initial value is GL_KEEP.




glTexCoordPointer
void glTexCoordPointer(int size, int type, int stride, Buffer pointer)(Code)
Define an array of texture coordinates.

glTexCoordPointer specifies the location and data of an array of texture coordinates to use when rendering. size specifies the number of coordinates per element, and must be 2, 3, or 4. type specifies the data type of each texture coordinate and stride specifies the byte stride from one array element to the next allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations.)

When a texture coordinate array is specified, size, type, stride, and pointer are saved as client-side state.

If the texture coordinate array is enabled, it is used when glDrawArrays, or glDrawElements is called. To enable and disable the texture coordinate array for the client-side active texture unit, call glEnableClientState and glDisableClientState with the argument GL_TEXTURE_COORD_ARRAY. The texture coordinate array is initially disabled for all client-side active texture units and isn't accessed when glDrawArrays or glDrawElements is called.

Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes.

Notes

glTexCoordPointer is typically implemented on the client side.

glTexCoordPointer updates the texture coordinate array state of the client-side active texture unit, specified with glClientActiveTexture.

Errors

GL_INVALID_VALUE is generated if size is not 2, 3, or 4.

GL_INVALID_ENUM is generated if type is not an accepted value.

GL_INVALID_VALUE is generated if stride is negative.

The pointer argument must be a direct buffer with a type matching that specified by the type argument.
Parameters:
  size - Specifies the number of coordinates per arrayelement. Must be 2, 3 or 4. The initial value is 4.
Parameters:
  type - Specifies the data type of each texturecoordinate. Symbolic constants GL_BYTE,GL_SHORT, GL_FIXED,andGL_FLOAT are accepted. The initial value isGL_FLOAT.
Parameters:
  stride - Specifies the byte offset between consecutive arrayelements. If stride is 0, the array elements are understood to betightly packed. The initial value is 0.
Parameters:
  pointer - Specifies a pointer to the first coordinate of thefirst element in the array. The initial value is 0.
exception:
  IllegalStateException - if OpenGL ES 1.1 is being used andVBOs are enabled.
exception:
  IllegalArgumentException - if pointer isnull or is not direct.




glTexEnvf
void glTexEnvf(int target, int pname, float param)(Code)
Set texture environment parameters.

If target is GL_TEXTURE_ENV, then the following applies:

A texture environment specifies how texture values are interpreted when a fragment is textured. target must be GL_TEXTURE_ENV. pname can be either GL_TEXTURE_ENV_MODE or GL_TEXTURE_ENV_COLOR.

If pname is GL_TEXTURE_ENV_MODE, then params contains the symbolic name of a texture function. Four texture functions may be specified: GL_MODULATE, GL_DECAL, GL_BLEND, and GL_REPLACE.

A texture function acts on the fragment to be textured using the texture image value that applies to the fragment (see glTexParameter) and produces an RGBA color for that fragment. The following table shows how the RGBA color is produced for each of the three texture functions that can be chosen. C is a triple of color values (RGB) and A is the associated alpha value. RGBA values extracted from a texture image are in the range [0, 1]. The subscript f refers to the incoming fragment, the subscript t to the texture image, the subscript c to the texture environment color, and subscript v indicates a value produced by the texture function.

A texture image can have up to four components per texture element (see glTexImage2D, and glCopyTexImage2D). In a one-component image, Lt indicates that single component. A two-component image uses Lt and At. A three-component image has only a color value, Ct. A four-component image has both a color value Ct and an alpha value At.

For texture functions: GL_REPLACE, GL_MODULATE, GL_DECAL, GL_BLEND, or GL_ADD:

 Base internal          Texture functions
 format                 GL_MODULATE                GL_DECAL
 

GL_ALPHA Cv = Cf undefined Av = Af*At

GL_LUMINANCE Cv = Cf*Lt undefined Av = Af

GL_LUMINANCE_ALPHA Cv = Cf*Lt undefined Av = Af*At

GL_RGB Cv = Cf*Ct Cv = Ct Av = Af Av = Af

GL_RGBA Cv = Cf*Ct Cv = Cf*(1 - At) + Ct*At Av = Af*At Av = Af

Base internal Texture functions format GL_BLEND GL_REPLACE

GL_ALPHA Cv = Cf Cv = Cf Av = Af*At Av = At

GL_LUMINANCE Cv = Cf*(1 - Lt) + Cc*Lt Cv = Lt Av = Af Av = Af

GL_LUMINANCE_ALPHA Cv = Cf*(1 - Lt) + Cc*Lt Cv = Lt Av = Af*At Av = At

GL_RGB Cv = Cf*(1 - Ct) + Cc*Ct Cv = Ct Av = Af Av = Af

GL_RGBA Cv = Cf*(1 - Ct) + Cc*Ct Cv = Ct Av = Af*At Av = At

Base internal Texture functions format GL_ADD

GL_ALPHA Cv = Cf Av = Af*At

GL_LUMINANCE Cv = Cf + Lt Av = Af

GL_LUMINANCE_ALPHA Cv = Cf + Lt Av = Af*At

GL_RGB Cv = Cf + Ct Av = Af

GL_RGBA Cv = Cf + Ct Av = Af*At

If pname is GL_TEXTURE_ENV_COLOR, params is a pointer to an array that holds an RGBA color consisting of four values. The values are clamped to the range [0, 1] when they are specified. Cc takes these four values.

The initial value of GL_TEXTURE_ENV_MODE is GL_MODULATE. The initial value of GL_TEXTURE_ENV_COLOR is (0, 0, 0, 0).

1.1 Notes

If the value of GL_TEXTURE_ENV_MODE is GL_COMBINE, then the form of the texture function depends on the values of GL_COMBINE_RGB and GL_COMBINE_ALPHA.

The RGB and ALPHA results of the texture function are then multiplied by the values of GL_RGB_SCALE and GL_ALPHA_SCALE, respectively.

The results are clamped to [0, 1].

The arguments Arg0, Arg1, Arg2 are determined by the values of GL_SRCn_RGB, GL_SRCn_ALPHA, GL_OPERANDn_RGB, GL_OPERANDn_ALPHA, where n = 0, 1, or 2, Cs and As denote the texture source color and alpha from the texture image bound to texture unit n.

The state required for the current texture environment, for each texture unit, consists of a six-valued integer indicating the texture function, an eight-valued integer indicating the RGB combiner function and a six-valued integer indicating the ALPHA combiner function, six four-valued integers indicating the combiner RGB and ALPHA source arguments, three four-valued integers indicating the combiner RGB operands, three two-valued integers indicating the combiner ALPHA operands, and four floating-point environment color values. In the initial state, the texture and combiner functions are each GL_MODULATE, the combiner RGB and ALPHA sources are each GL_TEXTURE, GL_PREVIOUS, and GL_CONSTANT for sources 0, 1, and 2 respectively, the combiner RGB operands for sources 0 and 1 are each SRC_COLOR, the combiner RGB operand for source 2, as well as for the combiner ALPHA operands, are each GL_SRC_ALPHA, and the environment color is (0, 0, 0, 0).

The state required for the texture filtering parameters, for each texture unit, consists of a single floating-point level of detail bias. The initial value of the bias is 0.0.

If pname is GL_TEXTURE_ENV_COLOR, then params is an array that holds an RGBA color consisting of four values. The values are clamped to the range [0, 1] when they are specified. Cc takes these four values.

The initial value of GL_TEXTURE_ENV_MODE is GL_MODULATE. The initial value of GL_TEXTURE_ENV_COLOR is (0, 0, 0, 0).

If target is GL_POINT_SPRITE_OES then the following applies:

If pname is GL_COORD_REPLACE_OES, then the point sprite texture coordinate replacement mode is set from the value given by param, which may either be GL_FALSE or GL_TRUE. The default value for each texture unit is for point sprite texture coordinate replacement to be disabled.

Errors

GL_INVALID_ENUM is generated when target or pname is not one of the accepted values, or when params should have a defined constant value (based on the value of pname) and does not.

Associated Gets (1.1 only)

glGetTexEnv
Parameters:
  target - Specifies a texture environment. Can be eitherGL_TEXTURE_ENV or GL_POINT_SPRITE_OES(OES_point_sprite extension).
Parameters:
  pname - Specifies the symbolic name of a single-valuedtexture environment parameter. Must be one ofGL_TEXTURE_ENV_MODE,GL_TEXTURE_ENV_COLOR (1.1 only),GL_COMBINE_RGB (1.1 only),GL_COMBINE_ALPHA (1.1 only), orGL_COORD_REPLACE_OES (OES_point_spriteextension).
Parameters:
  param - Specifies a single symbolic constant, one ofGL_REPLACE, GL_MODULATE,GL_DECAL, GL_BLEND, orGL_ADD (1.1 only).




glTexEnvfv
void glTexEnvfv(int target, int pname, float[] params, int offset)(Code)
Set texture environment parameters (array version).

A texture environment specifies how texture values are interpreted when a fragment is textured. target must be GL_TEXTURE_ENV. pname can be either GL_TEXTURE_ENV_MODE or GL_TEXTURE_ENV_COLOR.

If pname is GL_TEXTURE_ENV_MODE, then params contains the symbolic name of a texture function. Four texture functions may be specified: GL_MODULATE, GL_DECAL, GL_BLEND, and GL_REPLACE.

A texture function acts on the fragment to be textured using the texture image value that applies to the fragment (see glTexParameter) and produces an RGBA color for that fragment. The following table shows how the RGBA color is produced for each of the three texture functions that can be chosen. C is a triple of color values (RGB) and A is the associated alpha value. RGBA values extracted from a texture image are in the range [0, 1]. The subscript f refers to the incoming fragment, the subscript t to the texture image, the subscript c to the texture environment color, and subscript v indicates a value produced by the texture function.

A texture image can have up to four components per texture element (see glTexImage2D, and glCopyTexImage2D). In a one-component image, Lt indicates that single component. A two-component image uses Lt and At. A three-component image has only a color value, Ct. A four-component image has both a color value Ct and an alpha value At.

 Base internal          Texture functions
 format                 GL_MODULATE                GL_DECAL
 

GL_ALPHA Cv = Cf undefined Av = At Af

GL_LUMINANCE Cv = Lt Cf undefined Av = Af

GL_LUMINANCE_ALPHA Cv = Lt Cf undefined Av = At Af

GL_RGB Cv = Ct Cf Cv = Ct Av = Af Av = Af

GL_RGBA Cv = Ct Cf Cv = (1 - At) Cf + At Ct Av = At Af Av = Af

Base internal Texture functions format GL_BLEND GL_REPLACE

GL_ALPHA Cv = Cf Cv = Cf Av = At Af Av = At

GL_LUMINANCE Cv = (1 - Lt) Cf + Lt Cc Cv = Lt Av = Af Av = Af

GL_LUMINANCE_ALPHA Cv = (1 - Lt) Cf + Lt Cc Cv = Lt Av = At Af Av = At

GL_RGB Cv = (1 - Ct) Cf + Ct Cc Cv = Ct Av = Af Av = Af

GL_RGBA Cv = (1 - Ct) Cf + Ct Cc Cv = Ct Av = At Af Av = At

If pname is GL_TEXTURE_ENV_COLOR, params holds an RGBA color consisting of four values. The values are clamped to the range [0, 1] when they are specified. Cc takes these four values.

The initial value of GL_TEXTURE_ENV_MODE is GL_MODULATE. The initial value of GL_TEXTURE_ENV_COLOR is (0, 0, 0, 0).

Errors

GL_INVALID_ENUM is generated when target or pname is not one of the accepted values, or when params should have a defined constant value (based on the value of pname) and does not.
Parameters:
  target - Specifies a texture environment. Must beGL_TEXTURE_ENV.
Parameters:
  pname - Specifies the symbolic name of a texture environmentparameter. Accepted values are GL_TEXTURE_ENV_MODE andGL_TEXTURE_ENV_COLOR.
Parameters:
  params - Specifies a parameter array that contains either asingle symbolic constant or an RGBA color.
Parameters:
  offset - the starting offset within theparams array.
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.




glTexEnvfv
void glTexEnvfv(int target, int pname, FloatBuffer params)(Code)
Floating-point Buffer version of glTexEnv.
See Also:   GL10.glTexEnvfv(int target,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glTexEnvx
void glTexEnvx(int target, int pname, int param)(Code)
Fixed-point version of glTexEnv.
See Also:   GL10.glTexEnvf(int target,int pname,float param)



glTexEnvxv
void glTexEnvxv(int target, int pname, int[] params, int offset)(Code)
Fixed-point array version of glTexEnv.
See Also:   GL10.glTexEnvfv(int target,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - if offset isless than 0.
exception:
  IllegalArgumentException - if params.length -offset is smaller than the number of values required bythe parameter.



glTexEnvxv
void glTexEnvxv(int target, int pname, IntBuffer params)(Code)
Fixed-point Buffer version of glTexEnv.
See Also:   GL10.glTexEnvfv(int target,int pname,float[] params,int offset)
exception:
  IllegalArgumentException - if params isnull.
exception:
  IllegalArgumentException - ifparams.remaining() is smaller than the number ofvalues required by the parameter.



glTexImage2D
void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels)(Code)
Specify a two-dimensional texture image.

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable two-dimensional texturing, call glEnable and glDisable with argument GL_TEXTURE_2D. Two-dimensional texturing is initially disabled.

To define texture images, call glTexImage2D. The arguments describe the parameters of the texture image, such as height, width, width of the border, level-of-detail number (see glTexParameter), and number of color components provided. The last three arguments describe how the image is represented in memory.

Data is read from pixels as a sequence of unsigned bytes or shorts, depending on type. These values are grouped into sets of one, two, three, or four values, depending on format, to form elements.

When type is GL_UNSIGNED_BYTE, each of these bytes is interpreted as one color component, depending on format. When type is one of GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_5_5_5_1, each unsigned value is interpreted as containing all the components for a single pixel, with the color components arranged according to format.

The first element corresponds to the lower left corner of the texture image. Subsequent elements progress left-to-right through the remaining texels in the lowest row of the texture image, and then in successively higher rows of the texture image. The final element corresponds to the upper right corner of the texture image.

By default, adjacent pixels are taken from adjacent memory locations, except that after all width pixels are read, the read pointer is advanced to the next four-byte boundary. The four-byte row alignment is specified by glPixelStore with argument GL_UNPACK_ALIGNMENT, and it can be set to one, two, four, or eight bytes.

format determines the composition of each element in pixels. It can assume one of the following symbolic values:

  • GL_ALPHA
  • Each element is a single alpha component. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for red, green, and blue.

  • GL_RGB
  • Each element is an RGB triple. The GL converts it to fixed-point or floating-point and assembles it into an RGBA element by attaching 1 for alpha.

  • GL_RGBA
  • Each element contains all four components. The GL converts it to fixed-point or floating-point.

  • GL_LUMINANCE
  • Each element is a single luminance value. The GL converts it to fixed-point or floating-point, then assembles it into an RGBA element by replicating the luminance value three times for red, green, and blue and attaching 1 for alpha.

  • GL_LUMINANCE_ALPHA
  • Each element is a luminance/alpha pair. The GL converts it to fixed-point or floating point, then assembles it into an RGBA element by replicating the luminance value three times for red, green, and blue.

Notes

pixels may be NULL. In this case texture memory is allocated to accommodate a texture of width width and height height. You can then download subtextures to initialize this texture memory. The image is undefined if the user tries to apply an uninitialized portion of the texture image to a primitive.

glTexImage2D specifies the two-dimensional texture for the currently bound texture specified with glBindTexture, and the current texture unit, specified with glActiveTexture.

Errors

GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D.

GL_INVALID_ENUM is generated if format is not an accepted constant.

GL_INVALID_ENUM is generated if type is not a type constant.

GL_INVALID_VALUE is generated if level is less than 0.

GL_INVALID_VALUE may be generated if level is greater than log2max, where max is the returned value of GL_MAX_TEXTURE_SIZE.

GL_INVALID_VALUE is generated if internalformat is not an accepted constant.

GL_INVALID_VALUE is generated if width or height is less than 0 or greater than GL_MAX_TEXTURE_SIZE, or if either cannot be represented as 2^k + 2*border for some integer k.

GL_INVALID_VALUE is generated if border is not 0.

GL_INVALID_OPERATION is generated if internalformat and format are not the same.

GL_INVALID_OPERATION is generated if type is GL_UNSIGNED_SHORT_5_6_5 and format is not GL_RGB.

GL_INVALID_OPERATION is generated if typeis one of GL_UNSIGNED_SHORT_4_4_4_4, or GL_UNSIGNED_SHORT_5_5_5_1 and formatis not GL_RGBA.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_SIZE
Parameters:
  target - Specifies the target texture. Must beGL_TEXTURE_2D.
Parameters:
  level - Specifies the level-of-detail number. Level 0 is thebase image level. Level n is the nth mipmap reduction image. Mustbe greater or equal 0.
Parameters:
  internalformat - Specifies the color components in thetexture. Must be same as format. The following symbolic valuesare accepted: GL_ALPHA, GL_RGB,GL_RGBA, GL_LUMINANCE, orGL_LUMINANCE_ALPHA.
Parameters:
  width - Specifies the width of the texture image. Must be2^n + 2*border for some integer n. All implementations supporttexture images that are at least 64 texels wide.
Parameters:
  height - Specifies the height of the texture image. Must be2^m + 2*border for some integer m. All implementations supporttexture images that are at least 64 texels high.
Parameters:
  border - Specifies the width of the border. Must be 0.
Parameters:
  format - Specifies the format of the pixel data. Must besame as internalformat. The following symbolic values areaccepted: GL_ALPHA, GL_RGB,GL_RGBA, GL_LUMINANCE, andGL_LUMINANCE_ALPHA.
Parameters:
  type - Specifies the data type of the pixel data. Thefollowing symbolic values are accepted:GL_UNSIGNED_BYTE,GL_UNSIGNED_SHORT_5_6_5,GL_UNSIGNED_SHORT_4_4_4_4, andGL_UNSIGNED_SHORT_5_5_5_1.
Parameters:
  pixels - Specifies a pointer to the image data in memory.
exception:
  IllegalArgumentException - if pixels isnull.
exception:
  IllegalArgumentException - if pixels doesnot contain the desired number of pixels.




glTexParameterf
void glTexParameterf(int target, int pname, float param)(Code)
Set texture parameters.

Texture mapping is a technique that applies an image onto an object's surface as if the image were a decal or cellophane shrink-wrap. The image is created in texture space, with an (s, t) coordinate system. A texture is a one- or two-dimensional image and a set of parameters that determine how samples are derived from the image.

glTexParameter assigns the value or values in param to the texture parameter specified as pname. target defines the target texture, which must be GL_TEXTURE_2D. The following symbols are accepted in pname:

  • GL_TEXTURE_MIN_FILTER
  • The texture minifying function is used whenever the pixel being textured maps to an area greater than one texture element. There are six defined minifying functions. Two of them use the nearest one or nearest four texture elements to compute the texture value. The other four use mipmaps.

    A mipmap is an ordered set of arrays representing the same image at progressively lower resolutions. If the texture has dimensions 2^n × 2^m, there are max (n, m) + 1 mipmaps. The first mipmap is the original texture, with dimensions 2^n × 2^m. Each subsequent mipmap has dimensions 2^(k - 1) × 2^(l - 1), where 2^k × 2^l are the dimensions of the previous mipmap, until either k = 0 or l = 0. At that point, subsequent mipmaps have dimension 1 × 2^(l - 1) or 2^(k - 1) × 1 until the final mipmap, which has dimension 1 × 1. To define the mipmaps, call glTexImage2D or glCopyTexImage2D with the level argument indicating the order of the mipmaps. Level 0 is the original texture. Level max (n, m) is the final 1 × 1 mipmap.

    param supplies a function for minifying the texture as one of the following:

    • GL_NEAREST
    • Returns the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured.

    • GL_LINEAR
    • Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can include border texture elements, depending on the values of GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, and on the exact mapping.

    • GL_NEAREST_MIPMAP_NEAREST
    • Chooses the mipmap that most closely matches the size of the pixel being textured and uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value.

    • GL_LINEAR_MIPMAP_NEAREST
    • Chooses the mipmap that most closely matches the size of the pixel being textured and uses the GL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value.

    • GL_NEAREST_MIPMAP_LINEAR
    • Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

    • GL_LINEAR_MIPMAP_LINEAR
    • Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the GL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

    As more texture elements are sampled in the minification process, fewer aliasing artifacts will be apparent. While the GL_NEAREST and GL_LINEAR minification functions can be faster than the other four, they sample only one or four texture elements to determine the texture value of the pixel being rendered and can produce moire patterns or ragged transitions.

    The initial value of GL_TEXTURE_MIN_FILTER is GL_NEAREST_MIPMAP_LINEAR.

  • GL_TEXTURE_MAG_FILTER
  • The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element. It sets the texture magnification function to either GL_NEAREST or GL_LINEAR (see below). GL_NEAREST is generally faster than GL_LINEAR, but it can produce textured images with sharper edges because the transition between texture elements is not as smooth.

    The initial value of GL_TEXTURE_MAG_FILTER is GL_LINEAR.

  • GL_NEAREST
  • Returns the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured.

  • GL_LINEAR
  • Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can include border texture elements, depending on the values of GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, and on the exact mapping.

  • GL_TEXTURE_WRAP_S
  • Sets the wrap parameter for texture coordinate s to either GL_CLAMP, GL_CLAMP_TO_EDGE, or GL_REPEAT . GL_CLAMP causes s coordinates to be clamped to the range [0, 1] and is useful for preventing wrapping artifacts when mapping a single image onto an object. GL_CLAMP_TO_EDGE causes s coordinates to be clamped to the range [1/(2N), 1 - 1/(2N)], where N is the size of the texture in the direction of clamping. GL_REPEAT causes the integer part of the s coordinate to be ignored; the GL uses only the fractional part, thereby creating a repeating pattern. Border texture elements are accessed only if wrapping is set to GL_CLAMP.

    Initially, GL_TEXTURE_WRAP_S is set to GL_REPEAT.

  • GL_TEXTURE_WRAP_T
  • Sets the wrap parameter for texture coordinate t to either GL_CLAMP, GL_CLAMP_TO_EDGE, or GL_REPEAT . See the discussion under GL_TEXTURE_WRAP_S.

    Initially, GL_TEXTURE_WRAP_T is set to GL_REPEAT.

  • GL_GENERATE_MIPMAP (1.1 only)
  • Sets the automatic mipmap generation parameter. If set to GL_TRUE, making any change to the interior or border texels of the levelbase array of a mipmap will also compute a complete set of mipmap arrays derived from the modified levelbase array. Array levels levelbase + 1 through p are replaced with the derived arrays, regardless of their previous contents. All other mipmap arrays, including the levelbase array, are left unchanged by this computation.

    The initial value of GL_GENERATE_MIPMAP is GL_FALSE.

Notes

Suppose that a program has enabled texturing (by calling glEnable with argument GL_TEXTURE_2D and has set GL_TEXTURE_MIN_FILTER to one of the functions that requires a mipmap. If either the dimensions of the texture images currently defined (with previous calls to glTexImage2D, or glCopyTexImage2D) do not follow the proper sequence for mipmaps (described above), or there are fewer texture images defined than are needed, or the set of texture images have differing numbers of texture components, then it is as if texture mapping were disabled.

Linear filtering accesses the four nearest texture elements.

glTexParameter specifies the texture parameters for the active texture unit, specified by calling glActiveTexture.

Errors

GL_INVALID_ENUM is generated if target or pname is not one of the accepted defined values.

GL_INVALID_ENUM is generated if param should have a defined constant value (based on the value of pname) and does not.
Parameters:
  target - Specifies the target texture, which must be GL_TEXTURE_2D.
Parameters:
  pname - Specifies the symbolic name of a single-valuedtexture parameter. pname can be one of thefollowing: GL_TEXTURE_MIN_FILTER,GL_TEXTURE_MAG_FILTER,GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, orGL_GENERATE_MIPMAP (1.1 only) .
Parameters:
  param - Specifies the value of pname.




glTexParameterx
void glTexParameterx(int target, int pname, int param)(Code)
Fixed-point version of glTexParameter.
See Also:   GL10.glTexParameterf(int target,int pname,float param)



glTexSubImage2D
void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels)(Code)
Specify a two-dimensional texture subimage.

Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable two-dimensional texturing, call glEnable and glDisable with argument GL_TEXTURE_2D. Two-dimensional texturing is initially disabled.

glTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture image. The texels referenced by pixels replace the portion of the existing texture array with x indices xoffset and xoffset + width - 1, inclusive, and y indices yoffset and yoffset + height - 1, inclusive. This region may not include any texels outside the range of the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect.

Notes

glPixelStore affects texture images in exactly the way it affects glTexImage2D.

glTexSubImage2D specifies a two-dimensional sub texture for the currently bound texture, specified with glBindTexture and current texture unit, specified with glActiveTexture.

Errors

GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D.

GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glTexImage2D or glCopyTexImage2D operation.

GL_INVALID_VALUE is generated if level is less than 0.

GL_INVALID_VALUE may be generated if level is greater than log2max, where max is the returned value of GL_MAX_TEXTURE_SIZE.

GL_INVALID_VALUE is generated if xoffset < - b, xoffset + width > (w - b) , yoffset < - b, or yoffset + height > (h - b) , where w is the texture width, h is the texture height, and b is the border of the texture image being modified. Note that w and h include twice the border width.

GL_INVALID_VALUE is generated if width or height is less than 0.

GL_INVALID_ENUM is generated if format is not an accepted constant.

GL_INVALID_ENUM is generated if type is not a type constant.

GL_INVALID_OPERATION is generated if type is GL_UNSIGNED_SHORT_5_6_5 and format is not GL_RGB.

GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_SHORT_4_4_4_4, or GL_UNSIGNED_SHORT_5_5_5_1 and format is not GL_RGBA.

Associated Gets

glGetIntegerv with argument GL_MAX_TEXTURE_SIZE
Parameters:
  target - Specifies the target texture. Must beGL_TEXTURE_2D.
Parameters:
  level - Specifies the level-of-detail number. Level 0 is thebase image level. Level n is the nth mipmap reduction image.
Parameters:
  xoffset - Specifies a texel offset in the x direction withinthe texture array.
Parameters:
  yoffset - Specifies a texel offset in the y direction withinthe texture array.
Parameters:
  width - Specifies the width of the texture subimage.
Parameters:
  height - Specifies the height of the texture subimage.
Parameters:
  format - Specifies the of the pixel data. The followingsymbolic values are accepted: GL_ALPHA,GL_RGB, GL_RGBA,GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
Parameters:
  type - Specifies the data type of the pixel data. Thefollowing symbolic values are accepted:GL_UNSIGNED_BYTE,GL_UNSIGNED_SHORT_5_6_5,GL_UNSIGNED_SHORT_4_4_4_4, andGL_UNSIGNED_SHORT_5_5_5_1.
Parameters:
  pixels - Specifies the image data.
exception:
  IllegalArgumentException - if pixels isnull.
exception:
  IllegalArgumentException - if pixels doesnot contain the desired number of pixels.




glTranslatef
void glTranslatef(float x, float y, float z)(Code)
Multiply the current matrix by a translation matrix.

glTranslate produces a translation by (x, y, z). The current matrix (see glMatrixMode) is multiplied by this translation matrix, with the product replacing the current matrix, as if glMultMatrix were called with the following matrix for its argument:

 ( 1       0       0       x )
 ( 0       1       0       y )
 ( 0       0       1       z )
 ( 0       0       0       1 )
 

If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects drawn after a call to glTranslate are translated.

Use glPushMatrix and glPopMatrix to save and restore the untranslated coordinate system.
Parameters:
  x - Specifies the x coordinate of a translation vector.
Parameters:
  y - Specifies the y coordinate of a translation vector.
Parameters:
  z - Specifies the z coordinate of a translation vector.




glTranslatex
void glTranslatex(int x, int y, int z)(Code)
Fixed-point version of glTranslate.
See Also:   GL10.glTranslatef



glVertexPointer
void glVertexPointer(int size, int type, int stride, Buffer pointer)(Code)
Define an array of vertex coordinates.

glVertexPointer specifies the location and data of an array of vertex coordinates to use when rendering. size specifies the number of coordinates per vertex and type the data type of the coordinates. stride specifies the byte stride from one vertex to the next allowing vertices and attributes to be packed into a single array or stored in separate arrays. (Single-array storage may be more efficient on some implementations.)

When a vertex array is specified, size, type, stride, and pointer are saved as client-side state.

If the vertex array is enabled, it is used when glDrawArrays, or glDrawElements is called. To enable and disable the vertex array, call glEnableClientState and glDisableClientState with the argument GL_VERTEX_ARRAY. The vertex array is initially disabled and isn't accessed when glDrawArrays or glDrawElements is called.

Use glDrawArrays to construct a sequence of primitives (all of the same type) from prespecified vertex and vertex attribute arrays. Use glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes.

Notes

glVertexPointer is typically implemented on the client side.

Errors

GL_INVALID_VALUE is generated if size is not 2, 3, or 4.

GL_INVALID_ENUM is generated if type is is not an accepted value.

GL_INVALID_VALUE is generated if stride is negative.

The pointer argument must be a direct buffer with a type matching that specified by the type argument.
Parameters:
  size - Specifies the number of coordinates per vertex. Mustbe 2, 3, or 4. The initial value is 4.
Parameters:
  type - Specifies the data type of each vertex coordinate inthe array. Symbolic constants GL_BYTE,GL_SHORT, GL_FIXED, andGL_FLOAT are accepted. The initial value isGL_FLOAT.
Parameters:
  stride - Specifies the byte offset between consecutivevertices. If stride is 0, the vertices are understood to betightly packed in the array. The initial value is 0.
Parameters:
  pointer - Specifies a Buffer containing the coordinates ofthe vertices.
exception:
  IllegalStateException - if OpenGL ES 1.1 is being used andVBOs are enabled.
exception:
  IllegalArgumentException - if pointeris not direct.




glViewport
void glViewport(int x, int y, int width, int height)(Code)
Set the viewport.

glViewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let (xnd, ynd) be normalized device coordinates. Then the window coordinates (xw, yw) are computed as follows:

 xw = ( xnd + 1 ) width/2 + x
 yw = ( ynd + 1 ) height/2 + y
 

Viewport width and height are silently clamped to a range that depends on the implementation. To query this range, call glGetIntegerv with argument GL_MAX_VIEWPORT_DIMS.

Errors

GL_INVALID_VALUE is generated if either width or height is negative.

Associated Gets

glGetIntegerv with argument GL_MAX_VIEWPORT_DIMS
Parameters:
  x - Specifies the x coordinate of the lower left corner ofthe viewport rectangle, in pixels. The initial value is 0.
Parameters:
  y - Specifies the y coordinate of the lower left corner ofthe viewport rectangle, in pixels. The initial value is 0.
Parameters:
  width - Specifies the width of the viewport. When a GLcontext is first attached to a surface (e.g. window), width andheight are set to the dimensions of that surface.
Parameters:
  height - Specifies the height of the viewport. When a GLcontext is first attached to a surface (e.g. window), width andheight are set to the dimensions of that surface.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.