OpenGL2.0或以上的显卡驱动在哪下

OpenGL2.0或以上的显卡驱动在哪下

本文目录

  • OpenGL2.0或以上的显卡驱动在哪下
  • 求助,使用OpenGLES2.0先后生成2个view的问题
  • 如何查看电脑是否支持 OpenGL 2.0
  • OpenGL是什么
  • android中使用OpenGLES,有什么方法可以将texture反过来转化成Bitmap的方法没有
  • android下的openGL开发
  • 如何在Android上使用OpenGL ES 2.0绘制点
  • OpenGL es2.0之后对要渲染纹理的尺寸大小不限制2的次冪了吗
  • android opengles2.0值得学习

OpenGL2.0或以上的显卡驱动在哪下


你显卡什么型号
不是所有显卡都支持OpenGL2.0的,如果本身显卡支持,普通显卡驱动已经附带OpenGL驱动的,如果显卡是不支持OpenGL2.0有驱动也没意义。

求助,使用OpenGLES2.0先后生成2个view的问题


在Manifest中声明使用OpenGLES 为了能使用OpenGLES 2.0 API,你必须在你的manifest中添加以下声明: 如果你的应用要使用纹理压缩功能,你必须还要声明设备需要支持什么样的压缩格式: 为OpenGLES Graphics创建一个Activity 这个Activity与其它类

如何查看电脑是否支持 OpenGL 2.0


OpenGL 2.0主要是显卡支不支持,和电脑本身并没有多大关系。
现在大部分独立显卡以及少部分集成显卡,都支持OpenGL 2.0特效的。

OpenGL是什么


OpenGL是OpenGraphicsLib的缩写,是一套三维图形处理库,也是该领域的工业标准。
计算机三维图形是指将用数据描述的三维空间通过计算转换成二维图像并显示打印出来的技术。
OpenGL就是支持这种转换的程序库,它源于SGI公司为其图形工作站开发的IRIS GL,在跨平台移植过程中发展成为OpenGL。SGI在1992年7月发布1.0版,后成为工业标准,由成立于1992年的独立财团OpenGL Architecture Review Board (ARB)控制。SGI等ARB成员以投票方式产生标准,并制成规范文档(Specification)公布,各软硬件厂商据此开发自己系统上的实现。只有通过了ARB规范全部测试的实现才能称为OpenGL。1995年12月ARB批准了1.1版本,最新版规范是1999.5通过的1.2.1。
OpenGL被设计成独立于硬件,独立于窗口系统的,在运行各种操作系统的各种计算机上都可用,并能在网络环境下以客户/服务模式工作,是专业图形处理、科学计算等高端应用领域的标准图形库。它低端应用上的主要竞争对手是MS-Direct3D,该图形库是以COM接口形式提供的,所以极为较复杂,稳定性差,另外微软公司拥有该库版权,目前只在Windows平台上可用。D3D的优势在速度上,但现在低价显卡都能提供很好的OpenGL硬件加速,所以做3D使用Direct3D已没有特别的必要,在专业图形处理特别是高端应用方面目前还没有出现以Direct3D技术为基础的例子,而游戏等低端应用也有转向OpenGL的趋势。
微软在Windows NT对OpenGL的支持始于3.51,在Windows9x中的支持始于Win95 OEM Service Release 2。Windows下常用的OpenGL库有两种,MS实现的和SGI实现的,MS-OpenGL调用会自动检测是否存在显示卡制造商提供的ICD(Installable Client DeviceDriver)驱动程序,有则调用ICD中的例程,否则才用CPU进行计算,所以能利用显示卡的OpenGL加速能力。对开发者来说使用方法并没有区别,只是有ICD驱动时更快些。SGI的版本是纯软件实现不能利用硬件加速并且SGI已经在1999年宣布停止支持,但这套库便于调试程序,仍有不少开发者使用。
近日SGI宣布与Intel联手针对当前及未来IA体系的Internet流化SIMD扩展优化OpenGL。这显然意味着OpenGL未来在intel体系及internet应用领域将大放光彩。
SGI曾经宣布研发OpenGL++,该图形库最大的特点是面象对象,提供了树形场景支持,大大 ×耸褂肙penGL处理复杂场景的工作量。后来(1999)SGI宣布与M$合作开发Ferihant,即Windows的下一代图形处理体系,包括DirectX与OpenGL的低级图形处理接口和以场景图支持为特点的高级接口,并且就此停止对其在Windows下的OpenGL实现的支持以示决心。此举世瞩目,大家都以为Windows图形处理快要过上幸福生活了,然而,不久,SGI宣布中止合作,并撤回派出的科学家,Ferihant基本上夭折。SGI 称终止合作的原因是M$不肯积极合作,光想把SGI 的技术合并进DirectX,真正内幕不详。不过以SGI在图形处理界的老大地位来说,还是有几分可信度的,因为M$初支持OpenGL就不积极。
虽然早在WinNT3.51 时代M$就已经实现了它的OpenGL 版本,但不肯随其Windows95 时提供,称该API 适合高端应用,而Win95面向一般消费者的用不到,并且在其win3.x下开发的wing 图表库的基础上搞出了GameSDK,即后来的DirectX 库,称这套库是专门为高性能游戏开发设计的,在当时的硬件条件下,这无疑是非常有道理的,并且很快成为Windows环境下游戏开发的标准API 。该库实质上是提供了绕过Windows 直接访问显存的途径,从而很好的解决了GDI 体系性能方面的不足,但由于是以COM接口形式提供的,所以相当复杂,而稳定性也不是很好,所以有人称Direct3D 是为追求速度而不择手段的公司才用的。然而也就在这个时期,三维图形加速卡开始走向商用和家用,也就是在这时期S3公司以其性价比极高的带三维图形加速的显示芯片、板卡向当时Trident 公司的霸主地位发起了挑战。另外这时实时三维游戏开始流行,以Dos 下的第一人称射击游戏——暗杀希特勒(3d worlf) 大获成功、红极一时ID Software 的开始铸辉煌,推出了Doom 、Quake1 ,相信这两个名字在今天(2000.4) 的游戏圈子里应该是无人不知无不晓吧?1996.12.ID Software 的高手John Carmack 在开发下一代三维图形引擎时在其.plan 中写上了以下字句:
Direct-3D IM is a horribly broken API. It inflicts great pain and suffering on the programmers using it, without returning any significant advantages. I don’t think there is ANY market segment that D3D is apropriate for, OpenGL seems to work just fine for everything from quake to softimage. There is no good technical reason for the existance of D3D.
I’m sure D3D will suck less with each forthcoming version, but this is an oportunity to just bypass dragging the entire development community through the messy evolution of an ill-birthed API.
此后以他为代表的一大批游戏开发人员开始多方呼吁MS积极支持OpenGL。M$终于在Win95的OSR2版本里集成了OpenGL,并为以前版本的Win95免费提供单独的OpenGL实现。(或许您还不了解这些人的影响力,不知道您听说过以生产Voodoo系统图形加速卡而著称于世的3dfx公司吗?当年Quake的开发者不肯用Voodoo的glide API对voodoo做优化版本,差点没把3dfx吓蒙,于是赶紧搞了一个针对游戏的OpenGL子集:MiniGL,让ID Software的人只要在制作OpenGL时只使用MiniGL API做过优化就成,这样Quake总算可以用上voodoo的硬件加速能力了。这样也造就了一个新名词:MCD--MiniGL Client Driver,用于Windows的MiniGL驱动程序,而标准的OpenGL则依靠ICD驱动)。

android中使用OpenGLES,有什么方法可以将texture反过来转化成Bitmap的方法没有


你可以先将GLES20环境里面的上下文设置
获取好之后就可以将GLSurfaceview 的输入texture 转给GLES20.
然后通过GLES20.glBindFrameBuffer(GLES20.GL_FRAMEBUFFER,framebuffer)
然后调用GLES20.glFrameBufferTexture2D(xx,xxx,xxx,inputtexture ,xxx)
IntBuffer intbuffer = new IntBuffer(previewWidth,previewHeight);
intbuffer.order(ByteOrder.little.ENDLAN);
intbuffer.rewind();
GLES20.glReadPixels(0,0,previewWidth,previewHeight,GLES20.GL_RED,GLES20.GL_UNSLGLED_BYTE,Intbuffer);
bitmap = Bitmap.createBitmap(bitmapSource, iw, ih, Bitmap.Config.ARGB_8888);
最后将bitmap = Bitmap.create(intbuffer,previewWidht,previewHeight,Bitmap.Config.ARGB_8888);

android下的openGL开发


  这个建议买本教材看看,现在这样的教材很多。
  OpenGL ES 2.0
  In this document
  Create an Activity with GLSurfaceView
  Draw a Shape on GLSurfaceViewDefine a Triangle
  Draw the Triangle
  Apply Projection and Camera Views
  Add Motion
  Respond to Touch Events
  Related Samples
  API Demos - graphics
  OpenGL ES 2.0 Sample
  TouchRotateActivity
  See also
  3D with OpenGL
  OpenGL ES 1.0
  This tutorial shows you how to create a simple Android application that uses the OpenGL ES 2.0 API to perform some basic graphics operations. You’ll learn how to:
  •Create an activity using GLSurfaceView and GLSurfaceView.Renderer
  •Create and draw a graphic object
  •Define a projection to correct for screen geometry
  •Define a camera view
  •Rotate a graphic object
  •Make graphics touch interactive
  The Android framework supports both the OpenGL ES 1.0/1.1 and OpenGL ES 2.0 APIs. You should carefully consider which version of the OpenGL ES API (1.0/1.1 or 2.0) is most appropriate for your needs. For more information, see Choosing an OpenGL API Version. If you would prefer to use OpenGL ES 1.0, see the OpenGL ES 1.0 tutorial.
  Before you start, you should understand how to create a basic Android application. If you do not know how to create an app, follow the Hello World Tutorial to familiarize yourself with the process.
  Caution: OpenGL ES 2.0 is currently not supported by the Android Emulator. You must have a physical test device running Android 2.2 (API Level 8) or higher in order to run and test the example code in this tutorial.
  Create an Activity with GLSurfaceView
  To get started using OpenGL, you must implement both a GLSurfaceView and a GLSurfaceView.Renderer. The GLSurfaceView is the main view type for applications that use OpenGL and the GLSurfaceView.Renderer controls what is drawn within that view. (For more information about these classes, see the 3D with OpenGL document.)
  To create an activity using GLSurfaceView:
  1.Start a new Android project that targets Android 2.2 (API Level 8) or higher.
  2.Name the project HelloOpenGLES20 and make sure it includes an activity called HelloOpenGLES20.
  3.Modify the HelloOpenGLES20 class as follows: package com.example.android.apis.graphics;import android.app.Activity;import android.content.Context;import android.opengl.GLSurfaceView;import android.os.Bundle;public class HelloOpenGLES20 extends Activity { private GLSurfaceView mGLView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create a GLSurfaceView instance and set it // as the ContentView for this Activity mGLView = new HelloOpenGLES20SurfaceView(this); setContentView(mGLView); } @Override protected void onPause() { super.onPause(); // The following call pauses the rendering thread. // If your OpenGL application is memory intensive, // you should consider de-allocating objects that // consume significant memory here. mGLView.onPause(); } @Override protected void onResume() { super.onResume(); // The following call resumes a paused rendering thread. // If you de-allocated graphic objects for onPause() // this is a good place to re-allocate them. mGLView.onResume(); }} class HelloOpenGLES20SurfaceView extends GLSurfaceView { public HelloOpenGLES20SurfaceView(Context context){ super(context); // Create an OpenGL ES 2.0 context. setEGLContextClientVersion(2); // Set the Renderer for drawing on the GLSurfaceView setRenderer(new HelloOpenGLES20Renderer()); }}
  Note: You will get a compile error for the HelloOpenGLES20Renderer class reference. That’s expected; you will fix this error in the next step.
  As shown above, this activity uses a single GLSurfaceView for its view. Notice that this activity implements crucial lifecycle callbacks for pausing and resuming its work.
  The HelloOpenGLES20SurfaceView class in this example code above is just a thin wrapper for an instance of GLSurfaceView and is not strictly necessary for this example. However, if you want your application to monitor and respond to touch screen events—and we are guessing you do—you must extend GLSurfaceView to add touch event listeners, which you will learn how to do in the Reponding to Touch Events section.
  In order to draw graphics in the GLSurfaceView, you must define an implementation of GLSurfaceView.Renderer. In the next step, you create a renderer class to complete this OpenGL application.
  4.Create a new file for the following class HelloOpenGLES20Renderer, which implements the GLSurfaceView.Renderer interface: package com.example.android.apis.graphics;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.opengles.GL10;import android.opengl.GLES20;import android.opengl.GLSurfaceView;public class HelloOpenGLES20Renderer implements GLSurfaceView.Renderer { public void onSurfaceCreated(GL10 unused, EGLConfig config) { // Set the background frame color GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f); } public void onDrawFrame(GL10 unused) { // Redraw background color GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); } public void onSurfaceChanged(GL10 unused, int width, int height) { GLES20.glViewport(0, 0, width, height); } }
  This minimal implementation of GLSurfaceView.Renderer provides the code structure needed to use OpenGL drawing methods:
  ◦onSurfaceCreated() is called once to set up the GLSurfaceView environment.
  ◦onDrawFrame() is called for each redraw of the GLSurfaceView.
  ◦onSurfaceChanged() is called if the geometry of the GLSurfaceView changes, for example when the device’s screen orientation changes.
  For more information about these methods, see the 3D with OpenGL document.
  The code example above creates a simple Android application that displays a grey screen using OpenGL ES 2.0 calls. While this application does not do anything very interesting, by creating these classes, you have layed the foundation needed to start drawing graphic elements with OpenGL ES 2.0.
  If you are familiar with the OpenGL ES APIs, these classes should give you enough information to use the OpenGL ES 2.0 API and create graphics. However, if you need a bit more help getting started with OpenGL, head on to the next sections for a few more hints.
  Note: If your application requires OpenGL 2.0, make sure you declare this in your manifest:
  《!-- Tell the system this app requires OpenGL ES 2.0. --》 《uses-feature android:glEsVersion=“0x00020000“ android:required=“true“ /》
  For more information, see OpenGL manifest declarations in the 3D with OpenGL document.

如何在Android上使用OpenGL ES 2.0绘制点


如何在Android使用OpenGL
ES
2.0绘制点,看上去并不是一个复杂的问题,但是上网一搜,满眼都是绘制点的代码。
如果你看到类似如下代码,基本上你已经掉坑里了。
···
c
glBeging();
...
glDrawPoint(...);
...
glEnd();
```
如上是使用OpenGL
ES
1.0绘制点的代码。因为架构不同,在OPENGL
ES
2.0的世界里,这一套已经彻底不管用了。
在OpenGL
ES
2.0里绘制点,要使用Shader,使用Shader,用Shader。。。。。。
具体怎么绘制呢,首先你要搞清楚,如何用Shader绘制一个普通带颜色的三角形。我这里假设你已经会了。
三角形显示出来的那一刻,你一定会有这样的代码:
GLES20.glDrawArrays(GLES20.GL_TRIANGLES,
0,
vertexCount);
那么,只显示三角形的三个顶点该怎么办,说来简单,这行代码改成
GLES20.glDrawArrays(GLES20.GL_POINTS,
0,
vertexCount);
即可。
但是,理想和现实的差距总是很大,改完后三角形消失了但是顶点没有出现。正常OpenGL
2.0环境下应该怎么做呢?
1)首先调用
GL20.glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
这样在Shader中可以访问glPointSize;
2)然后类似准备每个顶点色彩那样准备顶点的大小的数值,三角形是三个顶点,就准备3个float。把顶点数据像色彩数据那样,绑定到VOB,再绑定到Shader的参数中。基本上就是照准备色彩那样准备顶点大小数据,不同之处在于每个色彩4个float,每个顶点尺寸1个float。
3)最后,把你的顶点Shader文件改好,增加顶点大小的输入参数和gl_PointSize赋值。
4)另外,如果你打算显示圆形顶点,而不是方形的,还要用GL20.glEnable()函数设置其他参数,具体可查OpenGL官网
比如:
uniform
mat4
matrix;
attribute
vec4
aVertex;
attribute
vec4
aColor;
attribute
float
aPointSize;
varying
vec4
vColor;
void
main(){
vColor
=
aColor;
gl_Position
=
matrix
*
aVertex;
gl_PointSize
=
aPointSize;
}
这样,基本上就搞定了。
现在,坑爹的问题来了,在Android上你找不到GLES20.GL_VERTEX_PROGRAM_POINT_SIZE的常量,谷歌似乎认为在手机的3D环境下绘制点没多大必要性,所以并没有加上这个参数,好在缺省情况下,模拟器中Shader中的gl_PointSize是打开的(Android
4.4.x)。所以你可以跳过第一步,直接传递点大小的参数,并把Shader改好就成。
那么,为什么你不写gl_PointSize
=
aPointSize,点就显示不出来呢。我估计缺省情况下,gl_PointSize
=
0.0f,所以显示不出来。
如果你显示点的大小总是固定不变的,你甚至可以把传递顶点大小数值的步骤也省略掉,直接在Shader中写上gl_PointSize
=
10.0f;即可。
阅读本文,当你打算在Android上用OPENGL
ES
2.0显示点时,即可跳过谷歌的那些坑了。我想,手机GPU硬件厂商的开发包应该对OpenGL
ES
2.0支持的更好些,比如高通的AdrenoSDK,建议大家下载尝试。

OpenGL es2.0之后对要渲染纹理的尺寸大小不限制2的次冪了吗


也限制.不要滥用非2的幂的图片,这种图片显卡处理起来费劲.
在安卓上,非2幂图片用的最多的地方是 摄像头, 在你要用GL显示摄像头传来的预览画面时, 你会发现传来的动画尺寸都是640x480,1080x720这种.
这时使用非2幂纹理图片就非常好,但别的地方我还想不出有什么要用非2幂的必要性.

android opengles2.0值得学习吗


OpenGLES是一个让人崩溃的东西。在Andorid手机上做3D还就得用它。把我记的一些笔记分享在这里吧:
Android OpenGL ES简介 20011-6-3
Android系统使用OpenGL的标准接口来支持3D图形功能,android 3D图形系统也分为java框架和本地代码两部分。
本地代码主要实现的OpenGL接口的库,在Java框架层,javax.microedition.khronos.opengles是java标准的OpenGL包,
android.opengl包提供了OpenGL系统和Android GUI系统之间的联系。
Android的本地代码位于frameworks/base/opengl下,
JNI代码位于frameworks/base/core/com_google_android_gles_jni_GLImpl.cpp和frameworks/base/core/com_google_android_gles_jni_EGLImpl.cpp,
java类位于opengl/java/javax/microedition/khronos下
本地测试代码位于frameworks/base/opengl/tests。包括angeles、fillrate等14个测试代码,这些代码都可以通过终端进行本地调用测试(模拟器中使用adb shell)。
OpenGL ES 1.x
固定管线操作,支持glVertexPointer()等函数,不支持GLSL。头文件在ndk的GLES目录下,库文件是libGLESv1_CM.so。
OpenGL ES 2.x
可编程管线操作,不兼容1.x,不支持固定管线操作,例如glVertexPointer()等函数。支持GLSL(还必须用这个来编程)。头文件在ndk的GLES2目录下,库文件是libGLESv2.so。
OpenGL ES学习 2011-6-30
OpenGL定义了自己的数据类型。应该坚持使用这些OpenGL的数据类型,从而保证可移植性和效率。
OpenGL ES 目前不支持64位数据类型。
OpenGL ES 只支持三边形。
OpenGL ES 只支持gl开头的函数,glu库都不支持。
OpenGL ES 从 OpenGL中删除的功能:
1. glBegin/glEnd
2. glArrayElement
3. 显示列表
4. 求值器
5. 索引色模式
6. 自定义裁剪平面
7. glRect
8. 图像处理(这个一般显卡也没有,FireGL/Quadro显卡有)
9. 反馈缓冲
10. 选择缓冲
11. 累积缓冲
12. 边界标志
13. glPolygonMode
14. GL_QUADS,GL_QUAD_STRIP,GL_POLYGON
15. glPushAttrib,glPopAttrib,glPushClientAttrib,glPopClientAttrib
16. TEXTURE_1D、TEXTURE_3D、TEXTURE_RECT、TEXTURE_CUBE_MAP
17. GL_COMBINE
18. 自动纹理坐标生成
19. 纹理边界
20. GL_CLAMP、GL_CLAMP_TO_BORDER
21. 消失纹理代表
22. 纹理LOD限定
23. 纹理偏好限定
24. 纹理自动压缩、解压缩
25. glDrawPixels,glPixelTransfer,glPixelZoom
26. glReadBuffer,glDrawBuffer,glCopyPixels
OpenGL ES 2.0 2011-10-9
2.0和1.1不兼容。
- 2.0使用的头文件是ndk的include目录下的GLES2目录,有gl2.h,gl2ext.h,gl2platform.h,而1.1使用的是GLES目录。
- 2.0使用的库文件是ndk的lib目录下的libGLESv2.so,而1.1使用的是libGLESv1_CM.so。
- 2.0中取消了很多1.1函数,例如glMatrixModel和glLoadIdentity等。
OpenGL着色语言(GLSL――OpenGL Shading Language)
- 使用2.0,必须学此语言。因为很多1.1的函数都被取消了。
san-angeles NDK OpenGL ES 1.1的例子程序 2012-3-8
San Angeles,查维基百科,是一个虚构的未来概念城市,位于南加州。常在电影中出现,来源自Los Angeles和San Diego.
该程序的演示效果是,观察一个宏伟的城市,地面是镜面有建筑倒影,城市中有飞船飞过。前后有5、6个观察点,而且镜头在每个观察点不停的移动。
这个例子,用NDK(C++)调用OpenGL ES 1.1来绘制了San Angeles这个城市。基本上全部使用了NDK,Java程序只有1个。
用vc2005演示一下,目的通过跟踪代码了解一些细节。方法是:
- 将jni下所有的.h文件,以及demo.c,app-win32.c复制出来,放在一个专门的目录下,然后改造成用OpenGL的而不是ES的。(或者干脆删除大段的绘制代码,保证编译通过)
首先分析Java代码
- DemoActivity.java,这是唯一的Java文件,它主要需要下列4个jni的接口:
- private static native void nativeInit(); // 初始化
- private static native void nativeResize(int w, int h);
- private static native void nativeRender(); // 绘制1帧
- private static native void nativeDone();
其次分析C++代码 app-android.c
- 首先,调用了importGLInit(),动态导入OpenGL的库。
- 其次,调用了 appInit(),在内存中建立了平台无关的3D对象集合。建立方法是用一个数组,用类似画圆拔高的方式产生诸多三角形。
- 然后,在每个时钟周期中调用appRender(),细节是:
- prepareFrame(width, height); // 准备OpenGL ES绘制框架。其实就是清空颜色和深度缓冲,重置投影和模型矩阵。
- camTrack(); // 算好在当前时钟周期,镜头的位置、朝向及焦距等。然后调用gluLookAt来实现。
- configureLightAndMaterial(); // 设置光源和材质
- drawModels(-1); // 先绘制倒影(其实就是将所有模型z轴倒过来画)
- 第一个循环,是画精致的物体
- 第二个循环,是画运动的物体
- drawGroundPlane(); // 再绘制镜子一般的地面。在绘制前取消光照,打开混合,然后绘制。绘制后还原状态。
- drawModels(1); // 再绘制所有模型
- drawFadeQuad(); // 最后绘制淡出框,用融合的方式画一个遮住整个视口的2D框,融合系数和时间相关。

免责声明:本网信息来自于互联网,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们,本站将会在24小时内处理完毕。
相关文章
返回顶部