12.07.2015 Views

OpenGL ES* Framework Software Developer's Guide White Paper

OpenGL ES* Framework Software Developer's Guide White Paper

OpenGL ES* Framework Software Developer's Guide White Paper

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

R<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong><strong>Software</strong> Developer’s <strong>Guide</strong><strong>White</strong> <strong>Paper</strong>For the Intel ® 2700G Multimedia AcceleratorJuly 2004Document Number: 303272-001


RINFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL ® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BYESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED ININTEL’S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTELDISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY ORWARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT,COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical, life saving, or life sustainingapplications.Intel may make changes to specifications and product descriptions at any time, without notice.Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these forfuture definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.The Intel ® 2700G Multimedia Accelerator may contain design defects or errors known as errata which may cause the product to deviate frompublished specifications. Current characterized errata are available on request.Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.Intel, XScale, PXA250, PXA255, PXA26X, PXA27X family and the Intel logo are trademarks or registered trademarks of Intel Corporation or itssubsidiaries in the United States and other countries.*Other names and brands may able claimed as the property of others.Copyright © 2004, Intel Corporation2 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


RContents1 Introduction.......................................................................................................................... 71.1 Terminology............................................................................................................ 71.2 References ............................................................................................................. 71.3 Architecture Overview............................................................................................. 81.3.11.3.2Typical configurations ............................................................................. 9Display Rotation .................................................................................... 101.4 Other APIs Available............................................................................................. 122 Intel 2700G 3D Features................................................................................................... 132.1 Screen Tiling......................................................................................................... 132.2 Culling................................................................................................................... 142.3 Texturing............................................................................................................... 142.3.1 Deferred Texturing................................................................................ 142.3.2 Multi-pass Texturing.............................................................................. 142.3.3 Single-Pass Multi-texturing ................................................................... 142.3.4 Perspective Correct Texture Support.................................................... 152.3.5 Texture Compression............................................................................ 152.3.6 Mipmapping........................................................................................... 152.3.7 Texture Mapping and Filtering .............................................................. 163 <strong>OpenGL</strong> ES <strong>Framework</strong> Implementation .......................................................................... 173.1 Overview............................................................................................................... 173.2 Functions Supported ............................................................................................ 173.3 States Supported.................................................................................................. 233.4 Extensions Supported .......................................................................................... 25<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 3


RFiguresFigure 1. Carbonado – Reference PDA Platform................................................................ 9Figure 2. Portrait Display Orientation ................................................................................ 10Figure 3. Left-handed Landscape Display Orientation...................................................... 11Figure 4. Right-handed Landscape Display Orientation.................................................... 11Figure 5. Tiling Example.................................................................................................... 13TablesTable 1. <strong>OpenGL</strong> ES Functions Supported in the Common-Lite Profile........................... 17Table 2. <strong>OpenGL</strong> ES Native Platform Graphics Interface (EGL) Supported Functions.... 22Table 3. <strong>OpenGL</strong> ES Supported States ............................................................................ 23Table 4. Texture Environment Function Extensions ......................................................... 25Table 5. Specific Compressed Texture Formats............................................................... 264 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


RRevision HistoryRevisionNumberDescriptionRevision Date-001 Initial Release. July 2004<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 5


RThis page is intentionally left blank.6 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


IntroductionR1 IntroductionThe intent of this specification is to provide an introduction to 3D graphics programming using the<strong>OpenGL</strong>* Embedded Systems (<strong>OpenGL</strong> <strong>ES*</strong>) implementation for the Intel ® 2700G MultimediaAccelerator. <strong>OpenGL</strong> ES is a low-level, lightweight applications programming interface (API) foradvanced embedded graphics using well-defined subset profiles of <strong>OpenGL</strong>. It provides a lowlevelAPI between software applications and hardware or software graphics engines.1.1 TerminologyTermDescriptionAPIGAPI<strong>OpenGL</strong> (OGL)<strong>OpenGL</strong> ESEGLPocketPCApplication Programming InterfaceMicrosoft Game APIOpen GL Application Programming InterfaceOpen GL for Embedded Systems Application Programming Interface<strong>OpenGL</strong> ES Platform Interface LayerMicrosoft specification for functionality of PDA-like devices. PocketPC2003 alsodescribes the operating system running on PocketPC devices.1.2 ReferencesReferenceDocument No. / LocationIntel 2700G Product BriefIntel 2700G DatasheetIntel 2700G Programmers Reference ManualIntel 2700G Display Management API ReferenceIntel 2700G Power Management API ReferenceIntel 2700G Video API Reference<strong>OpenGL</strong>*Khronos* <strong>OpenGL</strong> Embedded Systems (<strong>OpenGL</strong> ES)(http://www.intel.com/design/pca/prodbref/300571pb.htm)(http://www.intel.com/design/pca/companion/datashts/300948.htm)14419 (Contact your IntelRepresentative)Available on premier.intel.comAvailable on premier.intel.comAvailable on premier.intel.comwww.opengl.orgwww.khronos.org<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 7


IntroductionR1.3 Architecture OverviewThe Intel ® 2700G Multimedia Accelerator family contains three components: Intel 2700G7Multimedia Accelerator with stacked package local memory, Intel 2700G5 MultimediaAccelerator for performance, Intel 2700G3 Multimedia Accelerator for value. The majordifferences between 2700G3 Multimedia Accelerator and 2700G5 Multimedia Acceleratorcomponents are the size of the on-die frame buffer and the power savings associated with usingthis frame buffer for display updates and refreshes. The 2700G7 is a stacked package containinglocal memory for space constrained applications. The 2700G5 Multimedia Accelerator isoptimized for a VGA (640x480) display and incorporates a 704 KB on-die frame buffer. The2700G3 Multimedia Accelerator is optimized for half-VGA and smaller displays and incorporatesa 384 KB on-die frame buffer. The 2700G family can support a maximum screen resolution of1280 x 1024.Note: The descriptions contained in this document apply to the 2700G3 Multimedia Accelerator, the2700G5 Multimedia Accelerator, and the 2700G7 Multimedia Accelerator, unless otherwisenoted. The term 2700G or 2700G Multimedia Accelerator is used in this paper and refers to all ofthe above noted products.The 2700G Multimedia Accelerator 3D acceleration provides a complete hardware 3D renderingpipeline. This includes 831K triangles per second processing capability and 84 million pixels-persecond fill rate. Advanced 3D hardware acceleration includes features, such as texture and lightmapping, point, bilinear, trilinear and anisotropic filtering, alpha blending, dual texturing support,deferred texturing, screen tiling, texture compression, and full-screen anti-aliasing.The 2700G Multimedia Accelerator 2D acceleration includes support for clipping, anti-aliasing,alpha blending as well as a variety of BLT functions. The 2700G Multimedia Accelerator supportsall 256 raster operations (Source, Pattern, and Destination) defined by Microsoft*.8 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


IntroductionR1.3.1 Typical configurationsThe 2700G Multimedia Accelerator is designed to be used in embedded applications where powerconsumption, size, and price are of concern. The two most common platforms for the 2700GMultimedia Accelerator are likely to be Personal Digital Assistant (PDA) and Cellular PhoneHandsetPersonal Digital Assistant (PDA)The PDAs specified with the Intel 2700G Multimedia Accelerator will typically be high-endindustry leading configurations.A typical configuration for 2004-2005 will consist of:• at least 128 MB SDRAM• 16-bit color VGA resolution (640x480) 3.5” touch-sensitive LCD display,• AC-97 audio with internal speaker and headphone jack• Standard PocketPC controls (Navigation button, 4 program buttons, jog-wheel/button, voicerecordbutton, power button)• Rotate-able display for portrait or landscape mode viewing• VGA output jack for dual-display support of up to 24-bit color and 1024x768 (XGA)• Expansion slot (ex. Compact Flash (CF) or Secure Digital (SD))• Optional CameraFigure 1. Carbonado – Reference PDA Platform<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 9


IntroductionRGame input on a PDA generally consists of the standard PocketPC controls – a 4-way directionalnavigation control, an action button, four program buttons, a jog wheel, and the touch-sensitiveLCD display.Cellular Phone HandsetThe cell phones specified with the Intel 2700G in the 2004-2005 timeframe may be equipped with:• At least 64 MB SDRAM• 16-bit color QVGA resolution (240x320) to VGA resolution (640x480) 2.5” touch-sensitiveLCD display• AC-97 audio with internal speaker and headphone jack• Rotate-able display for portrait or landscape mode viewing• Standard Cell Phone Interface or Microsoft Smartphone Interface• 2–3 Mega-Pixel Camera• Optional Expansion slot (Secure Digital (SD))Other DevicesThere is a large world of other types of devices possible with the Intel 2700G MultimediaAccelerator. Some of the other devices may include retail kiosks, portable gaming devices, orpersonal media devices. All manners of devices where an embedded processor solution isappropriate can be enhanced by the inclusion of a 2700G with its high-end capabilities and lowpower consumption.1.3.2 Display RotationThe 2700G Multimedia Accelerator supports three dynamically selected display orientations. Theillustrations below are based on the Carbonado reference platform.Figure 2. Portrait Display Orientation10 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


IntroductionRFigure 3. Left-handed Landscape Display OrientationFigure 4. Right-handed Landscape Display OrientationThe orientation can be selected through the operating system. An application developer may alsochoose to change the display orientation or to allow display rotation from within the application aswell.It is important for an application developer to keep the different possible screen orientations inmind when designing an application. The orientation may impact bitmap sizes, fonts, andviewports.An application should be configurable to support both landscape and portrait modes. Applicationsshould also be able to dynamically handle orientation change through <strong>OpenGL</strong> viewportmodification.Applications must also exit properly such that the OS can correctly restore the default viewingmodes.<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 11


IntroductionR1.4 Other APIs AvailableDisplay ConfigurationPlatforms using the 2700G Multimedia accelerator can display images on multiple monitors. Twoseparate images can be produced, allowing exciting usage models for PDAs and phones whenattached to external monitors and projectors.Power ManagementThere are several highly effective methods to enhance the power management features of the2700G Multimedia Accelerator including the ability to shut down portions of the LCD display;thus, preventing power consumption from refreshing unneeded pixels.VideoThe 2700G Multimedia Accelerator offers hardware acceleration for fast and power efficient videodecoding of VGA resolution video at 30 frames per second.For more information on any of these APIs, contact your Intel representative.12 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


Intel 2700G 3D FeaturesR2 Intel 2700G 3D FeaturesThe 2700G Multimedia Accelerator is a tile-based rendering device. The screen is divided intotiles. After being transformed and lit by the processor, 3D object data (triangles) are sent to the2700G Multimedia Accelerator. The 2700G Multimedia Accelerator tile accelerator determinesthe visibility of each triangle and arranges the triangles into tiles. The texturing engine thentextures, blends, fogs, and applies other effects to the 3D object data, and writes the final pixels tothe frame buffer for each tile.The 2700G Multimedia Accelerator offloads the processor and system bus of the compute andbandwidth intensive operations required for 3D texturing including: Z buffer compare, smallobject culling, off-screen culling, backface culling, tiling, texturing, filtering, and anti-aliasing.2.1 Screen TilingThe tiling accelerator divides each scene into blocks, and processes each block independently.This allows the driver and 2700G Multimedia Accelerator to process spatially local trianglestogether. This allows the graphics accelerator to process a much smaller data set (e.g., one tile at atime, as opposed to the whole scene). The 2700G can therefore perform much of the triangleprocessing internally for each tile; improving performance and reducing memory bandwidthrequirements.Figure 5. Tiling Example<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 13


Intel 2700G 3D FeaturesR2.2 CullingSeveral types of culling occur in the 2700G Multimedia Accelerator and driver to reduce thenumber of triangles that need to be processed by the core. These culling methods include:• Small Object Culling to remove triangles that are smaller than a pixel and would not be drawn• Off Screen Culling to remove triangles that are entirely located outside of the viewingfrustum.• Back Face Culling to remove triangles that are facing away from the user’s viewpoint andwould not be visible on screenIn addition to these hardware accelerated culling methods, software developers are stronglyencouraged to perform their own object-level culling to remove objects that fall outside of theviewing frustum in order to further reduce the number of polygons that need to be processed.2.3 Texturing2.3.1 Deferred TexturingDeferred texturing improves performance by texturing only those pixels that are visible. Becausethe graphics controller is working with small data sets (e.g., a tile), it can perform the Z-comparesfor each pixel to determine exactly what is visible before applying the appropriate texture(s) to thatpixel. This prevents pixels from inadvertently being textured multiple times. For alpha blendedtextures, more than one triangle may be visible.2.3.2 Multi-pass TexturingThe 2700G Multimedia Accelerator supports multi-pass texturing. Multi-pass texturing is atechnique designed to overlay multiple texture maps over an object so that you can providetexture-based special effects. An example of this is a base texture for the surface of a car followedby a layer that has lighting or shadowing followed by another layer that shows ‘road grime’, bulletholes, or scorching.2.3.3 Single-Pass Multi-texturingSingle-pass multi-texturing is a useful technique for creating rich visual effects by blending twotextures together during the same rendering pass. The 2700G Multimedia Accelerator can applytwo textures in a single pass.One of the most common examples of multi-texturing is Bump Mapping – where a ‘normal’(a normal is a vector orthogonal to the object ‘surface’) map texture is created where the RGBcolors are re-interpreted as XYZ unit vectors. These vectors are then applied to the surface as perpixelnormal values to vary the way the pixel is shaded by the light to create a feeling of surfacerelief or height variations (imagine a stucco wall). The 2700G Multimedia Accelerator nativelysupports and accelerates Dot3 Bumpmapping.14 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


Intel 2700G 3D FeaturesR2.3.7 Texture Mapping and FilteringMany texture mapping and filtering modes are supported. Perspective correct mapping is alwaysperformed. As the map is fitted across the triangle, the map will be tiled. The way a texture iscombined with other object attributes is also definable.The 2700G Multimedia Accelerator supports up to twelve Levels-of-Detail (LODs) ranging in sizefrom 2048x2048 to 1x1 texels. (A texel is defined as a texture map element). Textures do not haveto be square.The 2700G Multimedia Accelerator supports seven types of texture filtering:• Point Sampling: Texel with coordinates nearest to the desired pixel is used. This mode onlyrequires one level-of-detail to be present.• Bilinear Filtering: A weighted average of the texels in a 2x2 area surrounding the desiredpixel is used. This mode only requires one level-of-detail to be present.• Point Mipmapping: This is used if many LODs are present. The nearest LOD is chosen andthe texel with coordinates nearest to the desired pixel are used.• Bilinear Mipmapping: This is used if many LODs are present. The nearest LOD is chosen anda weighted average of the texels in a 2x2 area surrounding the desired pixel is used.• Point Mipmapping Linear: This is used if many LODs are present. Two appropriate LODs areselected and within each LOD, the texel with coordinates nearest to the desired pixel areselected. The final texture value is generated by linear interpolation between the two texelsselected from each of the LODs.• Trilinear Mipmapping: This is used if many LODs are present. Two appropriate LODs areselected and a weighted average of a 2x2 area of texels surrounding the desired pixel in eachLOD is generated (four texels per LOD). The final texture value is generated by linearinterpolation between the two texels generated for each of the LODs. Trilinear mipmapping isused to minimize the visibility of LOD transitions across an object.• Anisotropic Filtering: This is used if many LODs are present. The nearest LOD-1 level willbe determined for each of four sub-samples for the desired pixel. These four sub-samples arethen bilinear filtered and averaged together.16 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationR3 <strong>OpenGL</strong> ES <strong>Framework</strong>Implementation3.1 Overview<strong>OpenGL</strong> <strong>ES*</strong> is an API intended to support high-performance graphics with little overhead asrequired by embedded systems. There are three ‘profiles’ covered by the <strong>OpenGL</strong> ES specificationto allow for platform-specific implementations:• Common• Common-Lite• Safety CriticalThe Common and Common-Lite profiles are intended for use in consumer entertainment andrelated devices such as PDAs, cell phones, and game consoles by offering fully functional 3Dcapabilities with texture mapping. The Safety Critical implementation is intended for industrialapplications and consumer applications where high reliability and minimum footprint are essential.The 2700G Multimedia Accelerator drivers support the Common-Lite profile.For more information on the <strong>OpenGL</strong> ES specifications, the full documentation and header filescan be downloaded from Khronos* at http://www.khronos.org/opengles/spec.html3.2 Functions SupportedIn Table 1 and Table 2 the following notations apply: = Supported API = Unsupported API.Table 1. <strong>OpenGL</strong> ES Functions Supported in the Common-Lite ProfileglActiveTextureglAlphaFuncglAlphaFuncxglBindTextureFunctionSupportedSpecial ConsiderationsglBlendFunc SRC_ALPHA_SATURATE is not supportedglClearglClearColor<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 17


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRglClearColorxglClearDepthfglClearDepthxFunctionSupportedSpecial ConsiderationsglClearStencil Stencil operations will not return GL_ERROR eventhough stencil operations are not supportedglClientActiveTexture Recommend use glActiveTexture.glColor4fglColor4xglColorMaskglColorPointerglCompressedTexImage2D • Standard compressed textures decompress palletizedtextures at load time into local memory. Theyconserve system memory for data files. Usage of2700G Multimedia Accelerator local texture memoryis not reduced.• Compressed texture extensions offer textures thatremain compressed in local memory and are used bythe 2700G Multimedia Accelerator in compressformat. The following extension compressed texturetypes are supported:⎯ GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG⎯ GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG⎯ GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG⎯ GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMGglCompressedTexSubImage2D • Standard compressed textures decompress palletizedtextures at load time into local memory. Theyconserve system memory for data files. They do notreduce usage of 2700G Multimedia Accelerator localtexture memory.glCopyTexImage2DglCopyTexSubImage2DglCullFaceglDeleteTexturesglDepthFuncglDepthMaskglDepthRangefglDepthRangex• Compressed texture extensions offer textures thatremain compressed in local memory and are used bythe 2700G Multimedia Accelerator in compressformat. The following extension compressed texturetypes are supported:⎯ GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG⎯ GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG⎯ GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG⎯ GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG18 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRglDisableFunctionglDisableClientStateSupportedSpecial ConsiderationsglDrawArrays GL_TRIANGLE_STRIP GL_TRIANGLE_FAN andGL_TRIANGLE_LIST primitives are optimized for the2700G Multimedia Accelerator pipelineglDrawElements glDrawElements is the recommended draw API.GL_TRIANGLE_STRIP GL_TRIANGLE_FAN andGL_TRIANGLE_LIST primitives are optimized for the2700G Multimedia Accelerator pipelineglEnable GL_COLOR_LOGIC_OP – affects glLogicOp (seeglLogicOp for more information)glEnableClientStateglFinishglFlushglFogfglFogfvglFogxglFogxvglFrontFaceglFrustumfglFrustumxglGenTexturesglGetErrorglGetIntegervglGetStringglHintglLightModelfglLightModelfvglLightModelxglLightModelxvglLightfglLightfvglLightxglLightxvglLineWidthGL_LINE_SMOOTH – No effect, since line width == 1GL_POINT_SMOOTH – No effect, since point size == 1GL_STENCIL_TEST – not supportedNot recommended to enable/disableGL_MULTISAMPLE during render loop for performancereasons.<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 19


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRFunctionSupportedSpecial ConsiderationsglLineWidthx Only width=1 is guaranteed to be supported per <strong>OpenGL</strong>ES API Specification. Antialiasing on line primitives isnot supported; however, full-screen antialiasing issupported.glLoadIdentityglLoadMatrixfglLoadMatrixxglLogicOp Do not use glLogicOp with Fogging. LogicOps andFogging are Mutually ExclusiveglMaterialfglMaterialfvglMaterialxglMaterialxvglMatrixModeglMultMatrixfglMultMatrixxglMultiTexCoord4fglMultiTexCoord4xglNormal3fglNormal3xglNormalPointerglOrthofglOrthoxglPixelStoreiglPointSizeglPointSizex Only size=1 is guaranteed to be supported per <strong>OpenGL</strong>ES API specification. Antialiasing on point primitives isnot supported; however, full-screen antialiasing issupported.glPolygonOffsetglPolygonOffsetxglPopMatrixglPushMatrixglReadPixelsglRotatefglRotatexglSampleCoverageglSampleCoveragexglScalefglScalex20 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRglScissorglShadeModelFunctionSupportedSpecial ConsiderationsglStencilFunc Stencil operations will not return GL_ERROR eventhough stencil operations are not supportedglStencilMask Stencil operations will not return GL_ERROR eventhough stencil operations are not supportedglStencilOp Stencil operations will not return GL_ERROR eventhough stencil operations are not supportedglTexCoordPointerglTexEnvfglTexEnvfvglTexEnvx Additional extensions supported:• GL_MODULATE_COLOR_IMG• GL_RECIP_ADD_SIGNED_ALPHA_IMG• GL_TEXTURE_ALPHA_MODULATE_IMG• GL_FACTOR_ALPHA_MODULATE_IMG• GL_FRAGMENT_ALPHA_MODULATE_IMG• GL_ADD_BLEND_IMG• GL_DOT3_RGBAglTexEnvxv Additional extensions supported:glTexImage2DglTexParameterf• GL_MODULATE_COLOR_IMG• GL_RECIP_ADD_SIGNED_ALPHA_IMG• GL_TEXTURE_ALPHA_MODULATE_IMG• GL_FACTOR_ALPHA_MODULATE_IMG• GL_FRAGMENT_ALPHA_MODULATE_IMG• GL_ADD_BLEND_IMG• GL_DOT3_RGBAglTexParameterx GL_TEXTURE_MAG_FILTER is not supportedglTexSubImage2DglTranslatefglTranslatexglVertexPointerglViewport<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 21


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRTable 2. <strong>OpenGL</strong> ES Native Platform Graphics Interface (EGL) Supported FunctionsFunction Supported Special ConsiderationseglChooseConfig EGL_STENCIL_SIZE is unsupportedeglCopyBufferseglCreateContexteglCreatePbufferSurfaceeglCreatePixmapSurfaceeglCreateWindowSurfaceeglDestroyContexteglDestroySurfaceeglGetConfigAttrib EGL_MAX_PBUFFER_WIDTH,EGL_MAX_PBUFFER_HEIGHT,EGL_MAX_PBUFFER_PIXELS, andEGL_STENCIL_BITS are unsupportedeglGetConfigseglGetCurrentContexteglGetCurrentDisplayeglGetCurrentSurfaceeglGetDisplayeglGetErroreglGetProcAddresseglInitializeeglMakeCurrenteglQueryContexteglQueryStringeglQuerySurfaceeglSwapBufferseglTerminateeglWaitGLeglWaitNative22 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationR3.3 States SupportedIn Table 3 bold italics indicates queriable interface. The “GL_” prefix for all state names havebeen removed for simplicity.Table 3. <strong>OpenGL</strong> ES Supported StatesACTIVE_TEXTUREALIASED_LINE_WIDTH_RANGEALIASED_POINT_SIZE_RANGEALPHA_BITS ALPHA_TEST ALPHA_TEST_FUNCALPHA_TEST_REF BLEND BLEND_DSTBLEND_SRC BLUE_BITS CLIENT_ACTIVE_TEXTURECOLOR_ARRAY COLOR_ARRAY_POINTER COLOR_ARRAY_SIZECOLOR_ARRAY_STRIDE COLOR_ARRAY_TYPE COLOR_CLEAR_VALUECOLOR_MATERIAL COLOR_WRITEMASK COMPRESSED_TEXTURE_FORMATSCULL_FACE CULL_FACE_MODE CURRENT_COLORCURRENT_NORMALCURRENT_TEXTURE_COORDSDEPTH_BITSDEPTH_CLEAR_VALUE DEPTH_FUNC DEPTH_RANGEDEPTH_TEST DEPTH_WRITEMASK DITHERFOG FOG_COLOR FOG_DENSITYFOG_END FOG_HINT FOG_MODEFOG_START FRONT_FACE GREEN_BITSIMPLEMENTATION_COLOR_READ_TYPE_OESIMPLEMENTATION_COLOR_READ_FORMAT_OESLIGHT0LIGHT1 LIGHT2 LIGHT3LIGHT4 LIGHT5 LIGHT6LIGHT7 LIGHTING LIGHT_MODEL_AMBIENTLIGHT_MODEL_TWO_SIDE LINE_SMOOTH LINE_SMOOTH_HINTLINE_WIDTH LINE_WIDTH_GRANULARITY LINE_WIDTH_RANGELOGIC_OP_MODE MATRIX_MODE MAX_ELEMENTS_INDICESMAX_ELEMENTS_VERTICES MAX_LIGHTS MAX_MODELVIEW_STACK_DEPTHMAX_PROJECTION_STACK_DEPTHMAX_TEXTURE_SIZEMAX_TEXTURE_STACK_DEPTHMAX_TEXTURE_UNITS MAX_VIEWPORT_DIMS MODELVIEW_MATRIXMODELVIEW_STACK_DEPTH NORMAL_ARRAY NORMAL_ARRAY_POINTERNORMAL_ARRAY_STRIDE NORMAL_ARRAY_TYPE NORMALIZENUM_COMPRESSED_TEXTURE_FORMATSPACK_ALIGNMENTPERSPECTIVE_CORRECTION_HINT<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 23


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRPOINT_SIZE POINT_SIZE_GRANULARITY POINT_SIZE_RANGEPOINT_SMOOTH POINT_SMOOTH_HINT POLYGON_OFFSET_FACTORPOLYGON_OFFSET_FILL POLYGON_OFFSET_UNITS PROJECTION_MATRIXPROJECTION_STACK_DEPTH RED_BITS RESCALE_NORMALSCISSOR_BOX SCISSOR_TEST SHADE_MODELSMOOTH_LINE_WIDTH_GRANULARITYSMOOTH_POINT_SIZE_RANGESMOOTH_LINE_WIDTH_RANGESTEREOSMOOTH_POINT_SIZE_GRANULARITYSUBPIXEL_BITSTEXTURE_2D TEXTURE_BINDING_2D TEXTURE_COMPRESSION_HINTTEXTURE_COORD_ARRAYTEXTURE_COORD_ARRAY_STRIDETEXTURE_COORD_ARRAY_POINTERTEXTURE_COORD_ARRAY_TYPETEXTURE_COORD_ARRAY_SIZETEXTURE_MATRIXTEXTURE_STACK_DEPTH UNPACK_ALIGNMENT VERTEX_ARRAYVERTEX_ARRAY_POINTER VERTEX_ARRAY_SIZE VERTEX_ARRAY_STRIDEVERTEX_ARRAY_TYPEVIEWPORT24 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationR3.4 Extensions SupportedTable 4. Texture Environment Function ExtensionsBaseInternalFormatMODULATE_COLOR _IMG tex funcRECIP_ADD_SIGNED_ALPHA_IMG tex funcTEXTURE_ALPHA_MODULATE_IMG tex funcFACTOR_ALPHA_MODULATE_IMG tex funcALPHACv = CfCv = CfCv = ZEROCv = ZEROAv = AsAv = (1-As) + Af –0.5Av = AsAv = AcLUMINANCECv = CfCsCv = CfCv = CsCv = AcCsAv = AfAv = Af – 0.5Av = ONEAv = AcLUMINANCE_ALPHACv = CfCsAv = AsCv = CfAv = (1-As) + Af –0.5Cv = AsCsAv = AsCv = AcCsAv = AcINTENSITYCv = CfCsCv = CfCv = AsCsCv = AcCsAv = AsAv = (1-As) + Af –0.5Av = AsAv = AcRGBCv = CfCsCv = CfCv = CsCv = AcCsAv = AfAv = Af – 0.5Av = ONEAv = AcRGBACv = CfCsCv = CfCv = AsCsCv = AcCsAv = AsAv = (1-As) + Af –0.5Av = AsAv = AcBaseInternalFormatFRAGMENT_ALPHA_MODULATE_IMG tex funcADD_BLEND_IMG tex funcDOT3_RGBA tex funcALPHACv = ZEROCv = CfUndefinedAv = AfAv = AfAsLUMINANCECv = AfCsCv = Cf + (1- Af)CsUndefinedAv = AfAv = AfLUMINANCE_ALPHACv = AfCsAv = AfCv = Cf + (1- Af)CsAv = AfAsUndefinedINTENSITYCv = AfCsCv = Cf + (1- Af)CsUndefinedAv = AfAv = AfAsRGBCv = AfCsCv = Cf + (1- Af)CsCv = Dot3(Cf,Cs)Av = AfAv = AfAv = Dot3(Cf,Cs)RGBACv = AfCsCv = Cf + (1- Af)CsCv = Dot3(Cf,Cs)Av = AfAv = AfAsAv = Dot3(Cf,Cs)<strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong> 25


<strong>OpenGL</strong> ES <strong>Framework</strong> ImplementationRNOTE: Lower case ‘v’ stands for the computed value. Lower case ‘f’ refers to the incoming fragment. Lowercase ‘s’ refers to the texture image. Lower case ‘c’ refers to the texture environment color.Table 5. Specific Compressed Texture FormatsCompressed Internal FormatBase Internal FormatGL_COMPRESSED_RGB_PVRTC_4BPPV1_IMGGL_COMPRESSED_RGB_PVRTC_2BPPV1_IMGGL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMGGL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMGRGBRGBRGBARGBAThe compressed texture formats can only be compressed using the PowerVR* TextureCompression Tool (PVRTextureTool). The 2700G Multimedia Accelerator supports the PVRTCformat for accelerated rendering.26 <strong>OpenGL</strong> <strong>ES*</strong> <strong>Framework</strong> <strong>Software</strong> Developer’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!