opengl 和android opengl ess 2.0的区别?

The Standard for Embedded Accelerated 3D Graphics
OpenGL(R) ES is a royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including consoles, phones, appliances and vehicles. It consists of well-defined subsets of desktop OpenGL, creating a flexible and powerful low-level interface between software and graphics acceleration. OpenGL ES includes profiles for floating-point and fixed-point systems and the EGL(TM) specification for portably binding to native windowing systems. OpenGL ES 1.X is for fixed function hardware and offers acceleration, image quality and performance. OpenGL ES 2.X enables full programmable 3D graphics. OpenGL SC is tuned for the safety critical market.
OpenGL ES API Profiles and Versions at a Glance
OpenGL ES 3.X
The OpenGL ES 3.1
The OpenGL ES 3.1
The OpenGL ES 3.1
The OpenGL ES
OpenGL ES 2.X - for Programmable Hardware
For programmable hardware: OpenGL ES 2.0 is defined relative to the
and emphasizes a programmable 3D graphics
pipeline with the ability to create shader and program objects and the
ability to write vertex and fragment shaders in the OpenGL ES Shading
Language. OpenGL ES 2.0 does not support the fixed function
transformation and fragment pipeline of OpenGL ES 1.x.
OpenGL ES 1.X
For fixed function hardware: OpenGL ES 1.1 is defined relative to the
and emphasizes hardware acceleration of the API, but is fully backwards compatible with 1.0. It provides enhanced functionality, improved image quality and optimizations to increase performance while reducing memory bandwidth usage to save power. The OpenGL ES 1.1 Extension Pack is a collection of optional extensions added to OpenGL ES 1.1 that reduced variability and bring significant improvements in image quality and performance.
OpenGL ES in Detail:Royalty free 2D/3D API consisting of well-defined subset profiles of desktop OpenGL
OpenGL& ES is a low-level, lightweight API for advanced embedded graphics using well-defined subset profiles of OpenGL.
It provides a low-level applications programming interface (API)
between software applications and hardware or software graphics engines.
This standard 3D graphics API for embedded systems makes it easy and affordable to offer a variety of advanced 3D graphics and games across all major mobile and embedded platforms. Since OpenGL ES (OpenGL for Embedded Systems) is based on OpenGL, no new technologies are needed. This ensures synergy with, and a migration path to and from desktop OpenGL -- the most widely adopted cross-platform graphics API.
Developer Advantages
Industry Standard and Royalty FreeAnyone can download the OpenGL ES specification and implement and ship products based on OpenGL ES. With broad industry support, OpenGL ES is the only truly open, vendor-neutral, multi-platform embedded graphics standard. The standardized higher level of abstraction that it offers means developers can concentrate more on content and less on the minor code and platform details.
Small footprint & low power consumptionThe embedded space varies widely, ranging from 400Mhz PDAs with 64MB RAM to 50MHz mobile phones with 1 MB RAM. OpenGL ES is designed to accommodate these differences by requiring a minimum footprint with minimum data storage requirements, minimized instruction/data traffic, and is both integer and floating point friendly. For users this means smaller binaries to download that take up less storage on the device.
Seamless transition from software to hardware renderingAlthough the OpenGL ES specification defines a particular graphics processing pipeline, individual calls can be executed on dedicated hardware, run as software routines on the system CPU, or implemented as a combination of both dedicated hardware and software routines. This means that software developers can ship a conformant software 3D engine today, that lets applications and tools seamlessly transition over to using OpenGL ES hardware-acceleration in higher powered devices.
Extensible & EvolvingOpenGL ES allows new hardware innovations to be accessible through the API via the OpenGL extension mechanism and for the API to be easily updated. As extensions become widely accepted, they are considered for inclusion into the core OpenGL ES standard. This process allows OpenGL ES to evolve in a controlled yet innovative manner.
Easy to use
Based on OpenGL, OpenGL ES is well structured with an intuitive design and logical commands.
Well-documentedBecause OpenGL ES is based on OpenGL, there are numerous relevant books, and a great deal of relevant sample code, making information about OpenGL ES inexpensive and easy to find. With the introduction of OpenGL ES, a developer can now write basically the same code for cell phones to supercomputers.
Conformance Testing
Specifications are reviewed and revised on a yearly basis. To label an implementation as an OpenGL ES compliant implementation, the implementation must pass a set of . The conformance test definitions are maintained as a separate part of the OpenGL ES documentation.
The OpenGL ES Two Track Roadmap
The OpenGL ES roadmap has been tailored to the diverse needs of the embedded industry and contains two tracks with "1.X" and "2.X" specification roadmaps that will evolve in parallel.
The 1.X roadmap will continue to be developed for new-generation fixed function 3D accelerators while the 2.X roadmap will enable emerging programmable 3D pipelines.
This dual-track roadmap enables OpenGL ES to meet the graphics requirements of a huge range of 3D enabled device and platforms in embedded markets - from low-end cell-phones to high-end gaming consoles.
Khronos is committed to providing backwards compatibility between successive versions of the APIs in each of the 1.X and 2.X tracks to ensure that applications can be trivially ported from one version to the next.
The OpenGL ES Framework
The OpenGL ES specification includes the definition of several profiles. Each profile is a subset of a version of the desktop OpenGL specification plus some additional OpenGL ES-specific extensions. The OpenGL ES profiles are part of a wider family of OpenGL-derived application programming
interfaces. As such, the profiles share a similar processing pipeline, command structure, and the
same OpenGL name space. Where necessary, extensions are created to augment the existing
desktop OpenGL functionality. OpenGL ES-specific extensions play a role in OpenGL ES profiles similar
to that played by OpenGL ARB extensions relative to the OpenGL specification. OpenGL ES-specific
extensions are either precursors of functionality destined for inclusion in future core profile revisions,
or formalization of important but non-mainstream functionality. Each profile definition implies a distinct header file and link/runtime library defining the commands and tokens in the profile. To simplify maintenance a single superset header can be defined with appropriate conditional preprocessing directives to control the visibility of tokens and command prototypes. At run-time an application can determine which profile is running using the OpenGL version string query.
The Common Profile is intended for consumer entertainment and related devices such as telephone handsets, PDAs, set-top boxes, game consoles, etc. It addresses the broadest range of the market including support for platforms with varying capability.
Minimum footprint full function 3D with texture-mapping
Good gaming platform
Implementable on cell phones
The Safety Critical Profile is intended for consumer and industrial applications where reliability and certifiability are the primary constraints.
Absolute minimum 3D to ease safety certifications
Used in avionics and automotive displays
Extensions:
OpenGL ES implementations may include extensions that add new features to the implementation. An OpenGL ES profile consists of two parts: a subset of the full OpenGL pipeline, and some extended
functionality that is drawn from a set of OpenGL ES-specific extensions to the full OpenGL specification.
Each extension is pruned to match the profile's command subset and added to the profile as either a core addition or a profile extension. Core additions differ from profile extensions in that the commands and tokens do not include extension suffixes in their names. Profile extensions are further divided into required (mandatory) and optional extensions. Required extensions
must be implemented as part of a conforming implementation, whereas the implementation of optional extensions is left to the discretion of the implementor.
Native Platform Graphics Interface
Layer - EGL:
OpenGL ES also includes a specification of a common platform interface layer, called EGL. This layer is platform independent and may optionally be included as part of a vendor's OpenGL ES distribution. The platform binding also has an associated conformance test. Alternatively, a vendor may choose to define their own platform-specific embedding layer.
Implementers of OpenGL ES
QUALCOMMSony Computer Entertainment Inc.NVIDIA CorporationApple, Inc.Broadcom CorporationMarvellImagination TechnologiesVivante CorporationIntelARM LimitedFujitsu LimitedNVIDIAITRIDigital Media ProfessionalsARMCreative Technology LtdMediaTek IncNOKIA OYJPanasonicGoogle, Inc.HISILICON TECHNOLOGIES CO.,LTD.FujitsuNexusChips Co., Ltd.Creative LabsAMDSony Ericsson Mobile Communications ABSamsung ElectronicsTakumi CorporationHUONE/MTISPanasonic / Matsushita Electricopengl&es1.1&与&es2.0区别
区别有很多,慢慢总结下来:
OpenGL ES中的顶点属性
OpenGL Enumerant
OpenGL Function Call
Dimensionality
GL_VERTEX_ARRAY
glVertexPointer
byte, short, fixed, float
GL_NORMAL_ARRAY
glNormalPointer
byte, short, fixed, float
GL_COLOR_ARRAY
glColorPointer
ubyte, fixed, float
Point Size
GL_POINT_SIZE_ARRAY_OES
glPointSizePointerOES
fixed, float
Texture Coordinate
GL_TEXTURE_COORD_ARRAY
glTexCoordPointer
byte, short, fixed, float
Generic Attribute(ES 2.0)
glVertexAttribPointer
1,2,3,4
byte, ubyte, short, ushort, fixed, float
OpenGL ES 2.0只有最后一行,它需要你自定义属性。回忆一下HelloArrow中不同rendering
engines开启属性的方法:
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glEnableVertexAttribArray(positionSlot);
glEnableVertexAttribArray(colorSlot);
在ES 1.1中,是用内置常量来开启顶点属性的,而ES
2.0中则是用从shader中导出的常量来开始(positionSlot与colorSlot)。接着向OpenGL指明要开启顶点属性的类型与维度:
// OpenGL ES 1.1
glVertexPointer(2, GL_FLOAT, ... );
glColorPointer(4, GL_FLOAT, ... );
// OpenGL ES 2.0
glVertexAttribPointer(positionSlot, 2, GL_FLOAT, ...);
glVertexAttribPointer(colorSlot, 4, GL_FLOAT, ...);
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。如何使用c4droid启用opengl es 2.0_c4droid吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:11,719贴子:
如何使用c4droid启用opengl es 2.0收藏
现在我们来研究如何借助egl,在native activity中启用opengl es 2.0 的功能,阅读本文的前提是阅读并理解了native activity 教程:
在先前的例子中,我们创建过onAppCmd回调函数,其中最重要的事件类型是APP_CMD_INIT_WINDOW:“如果app-&onAppCmd回调函数接收到的event_type的值为APP_CMD_INIT_WINDOW,我们就要打开一个可用于opengl渲染的窗口,而native activity开窗用的是egl api,我们可以把egl看成是glut或glfw之类的api,开窗过程如下:attribs[11] = {EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_DEPTH_SIZE, 8, EGL_NONE}display = eglGetDisplay(EGL_DEFAULT_DISPLAY);eglInitialize(...);eglChooseConfig(...);eglGetConfigAttrib(...);ANativeWindow_setBuffersGeometry(...);sureface = eglCreateWindowSurface(...);context=eglCreateWindowContext(...);eglMakeCurrent(...);
但是,2楼手段创建的是opengl es 1.0 版本窗口,我们知道opengl es 1.0 采用的是fixed pipeline进行渲染,而非glsl渲染,而且矩阵运算方面也采用的是内置式,很不灵活,opengl es 2.0则很好的解决了这一问题,开启了opengl es 2.0,可以通过自己写shader实现阴影,反射,折射,环境光遮罩等效果,让画面更逼真。所以我们要在接收APP_CMD_INIT_WINDOW事件后,创建一个opengl es 2.0的渲染窗口,需要注意的是,opengl es版本选择单一的,创建了opengl es 2.0的窗口后,opengl es 1.0部分指令将失效。
那么开始对代码进行改动,首先我们要在attribs数组中添加2个元素,表明我们要使用opengl es 2.0 的渲染类型,它们是:EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT其次我们要创建一个上下文属性,让它告诉egl我们要使用的上下文版本是2.0,我们将其命名为attribs_context,则有:const EGLint
attribs_context[] = {EGL_CONTEXT_CLIENT_VERSION, 2,EGL_NONE};这样一来,我们只需要把属性带入相关指令中即可
参照 egl.h头文件我们将attribs作为eglChooseConfig中的2号参数将attribs_context作为eglCreateContext中的4号参数opengl es 2.0的配置部分就结束了
但opengl es 2.0 的函数,例如glCreateShader, 是不是马上可以用了呢?答案是否定的。我们必须注意到,opengl es 2.0的配置是在回调函数中完成的,而并不是在入口函数android_main中完成的,而想要初始化opengl es 2.0,就必须初始化窗口,想要初始化窗口,又先要用 先前编写的refresh 刷新函数,拉取并处理APP_CMD_INIT_WINDOW事件,但我们如何才能得知APP_CMD_INIT_WINDOW事件被处理了呢?我们可以采用全局变量做记录
创建一个全局变量,将其命名为
window_status,也就是窗口状态,初始值为0,表示窗口未初始化, 在APP_CMD_INIT_WINDOW事件处理的最后部分,我们添加:window_status = 1这样一来,在刷新 函数执行过程中,如果遇到窗口初始化事件,opengl es的初始化完成的同时,窗口状态也发生了变化。此时,就可以确保所有的opengl es 2的函数都能正常使用了。而为了在程序刚开始执行时就达到这一效果,我们可以在android_main 刚开始时,马上建立一个循环:while(window_status != 1)
refresh();这样一来,程序就会一直等待opengl es 2.0 初始化,直到完成于是所有
opengl es 2.0 的函数都能正常使用了
不错,mark
SDL程序意外终止 难道Native Activity不支持MTK
登录百度帐号我的游戏推荐游戏
后查看最近玩过的游戏
为兴趣而生,贴吧更懂你。或OpenGL ES 2.0 不同平台的程序庫 - 下载频道 - CSDN.NET
&&&&OpenGL ES 2.0 不同平台的程序庫
&OpenGL ES 2.0 不同平台的程序庫
可移植到不同平台的程序庫 OpenGL ES 2.0
若举报审核通过,可奖励20下载分
被举报人:
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
您可能还需要
Q.为什么我点的下载下不了,但积分却被扣了
A. 由于下载人数众多,下载服务器做了并发的限制。若发现下载不了,请稍后再试,多次下载是不会重复扣分的。
Q.我的积分不多了,如何获取积分?
A. 传优质资源可以获取积分,详细见。选择完成有奖的任务,可以获取积分。选择购买VIP会员服务,无需积分下载资源。评价资源返积分:第一次绑定手机,将获50下载积分及100论坛可用分。论坛可用分兑换下载积分。
下载资源意味着您已经同意遵守以下协议
资源的所有权益归上传用户所有
未经权益所有人同意,不得将资源中的内容挪作商业或盈利用途
CSDN下载频道仅提供交流平台,并不能对任何下载资源负责
下载资源中如有侵权或不适当内容,
本站不保证本站提供的资源的准确性,安全性和完整性,同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
开发技术下载排行
你下载资源过于频繁,请输入验证码
如何快速获得积分?
你已经下载过该资源,再次下载不需要扣除积分
OpenGL ES 2.0 不同平台的程序庫
所需积分:1
剩余积分:
VIP会员,免积分下载
会员到期时间:日
剩余下载次数:1000OpenGL ES 2.0 不同平台的程序庫 - 下载频道
- CSDN.NET
&&&&OpenGL ES 2.0 不同平台的程序庫
OpenGL ES 2.0 不同平台的程序庫
可移植到不同平台的程序庫 OpenGL ES 2.0
若举报审核通过,可奖励20下载分
被举报人:
举报的资源分:
请选择类型
资源无法下载
资源无法使用
标题与实际内容不符
含有危害国家安全内容
含有反动色情等内容
含广告内容
版权问题,侵犯个人或公司的版权
*详细原因:
您可能还需要
开发技术下载排行

我要回帖

更多关于 opengl es 的文章

 

随机推荐