OpenGL的版本历史和发展

原文链接:http://www.cnblogs.com/vertexshader/articles/2917540.html

OpenGL®作为业界最为广泛使用的2D和3D图形接口标准,应用在成千上万的各式各样的计算机的程序中。从初期的崭露头角,到与Direct3D激烈竞争,后经历黯淡被Khronos接手又发扬光大,已经历经波折发展了20年。由于过去的黯淡,至今甚至仍有人站在错误的时间角度认为它是落后的——它从未停止它前进的步伐,这篇文章就来简述OpenGL的版本历史和发展。

 【转帖】OpenGL的版本历史和发展

OpenGL 1.0

发布时间: 1992年1月

OpenGL的最早版本OpenGL 1.0由Mark Segal和Kurt Akeley发布于1992年1月。从这之后,OpenGL每隔一段时间都会发布一个新版本的规范,这些规范定义了一些显卡必须支持的新扩展。这就决定了OpenGL的每个版本其实就是由各个扩展组成的,当硬件的驱动全部支持相应的扩展的时候,相应的OpenGL版本就被支持了。

 

OpenGL 1.1

发布时间:1997年1月

扩展

特性增加

GL_EXT_vertex_array

 Vertex arrays

GL_EXT_polygon_offset

Polygon offset

GL_EXT_blend_logic_op

 Logical operation

GL_EXT_texture

 Internal texture formats, texture proxy, and texture env

GL_EXT_copy_texture

GL_EXT_subtexture

 Copy texture and subtexturefrom framebuffer

GL_EXT_texture_object

 Texture object



时隔5年OpenGL才发布新的版本OpenGL1.1,而Direct3D的出现(尤其是红色警戒的大卖)使得OpenGL感觉到了压力。顶点数组(Vertexarrays)的出现取代了glVertex*这类立即模式绘图函数,多个数据可以被一个函数调用绘制了,降低了调用函数带来的CPU循环开销;polygonoffset解决了z-fighting和stitching的问题;在pre-fragmentoperation开始支持逻辑操作(logic operation);纹理方面开始支持纹理代理(textureproxy)和纹理环境映射(textureenvironment),以及从帧缓冲(frameuffer)复制像素至texture或者subtexture;纹理对象(textureobject)的出现改变了过去只能使用显示表(display list)来静态地使用纹理的方法,现在纹理和参数(textureparameter)能被改变了。

OpenGL 1.2

发布时间:1998年3月16日

 

扩展

特性

GL_EXT_texture3D

Three-dimensionaltexture 

GL_EXT_bgra

BGR or BGRA pixelformat

GL_EXT_packed_pixels

 Packedpixel formats

GL_EXT_rescale_normal

 Normalrescaling

GL_EXT_separate_specular_color

 Separatespecular color

GL_SGIS_texture_edge_clamp

 Texturecoordinate edge clamping

GL_SGIS_texture_lod

 TextureLOD control

GL_EXT_draw_range_elements

 Vertexarray draw element range

 这个版本的OpenGL开始支持可以用于体渲染(volumerendering)和体纹理(solid texture)的texture3D;BGRA和BGA的出现主要是为了兼容某些平台和硬件;包装像素(packpixel)的出现使得像素可以在不同的对象之间进行像素传输(pixeltransfer),这也就是像素缓冲对象(pixel bufferobject)的前身;GL_SGIS_texture_edge_clamp扩展的出现将texturecoordinate规范在[0,1]这个区间;GL_SGIS_Texture_lod扩展则带来了重要的MipMap技术,可以通过对纹理参数(textureparameter)的控制来完成对MipMap的控制。

 

OpenGL 1.2.1

发布时间:1998年10月14日

 这个版本的OpenGL没有什么重大的改变,但是专门介绍了ARB扩展的概念。ARB扩展是经过OpenGLARB认证的扩展,这样的扩展将被广泛地实现。

 

OpenGL 1.3

发布时间:2001年8月14日

扩展

特性增加

GL_ARB_texture_compression

 compressedtexture format

GL_ARB_texture_cube_map

 texturecube

GL_ARB_multisample

 MSAA(multisampleanti-aliasing

GL_ARB_multitexture(removed)

 multi-texture

GL_ARB_texture_env_add

GL_ARB_texture_env_combine

GL_ARB_texture_env_dot3

Texture add envmode, texture combine env mode, texture dot3 env mode

GL_ARB_texture_border_clamp

 Textureborder clamp

GL_ARB_transpose_matrix

 transposematrix 

这个版本开始支持压缩纹理(compressedtexture),可以有效地减少存储和带宽的压力,现在广泛的应用于各种对存储大小和带宽敏感的手持设备上;立方体纹理(texturecube)的出现主要用于在天空盒(skybox)、动态反射(dynamicreflection)等技术上;而multisample的出现让OpenGL可以支持纹理和Framebuffer的MSAA抗锯齿技术,代替了过去在光栅化状态(rasterizerstate)中趋近无用的抗锯齿设置。

 

OpenGL 1.4

发布版本:2002年7月24日

扩展

特性增加

GL_SGIS_generate_mipmap

 Automaticmipmap generation

GL_NV_blend_square

 Blendsquaring

GL_ARB_depth_texture

GL_ARB_shadow

 Depthtexture adn shadows

GL_EXT_fog_coord

 Fogcoordinate

GL_EXT_multi_draw_arrays

 Multidraw arrays

GL_ARB_point_parameters

 Pointparameters

GL_EXT_secondary_color

 Secondarycolor

GL_EXT_blend_func_separate

 Separateblend functions

GL_EXT_stencil_wrap

 Stencilwarp

GL_ARB_texture_env_crossbar

 Texturecrossbar env mode

GL_ARB_texture_mirrored_repeat

 Texturemirrored repeat

GL_ARB_window_pos

 Windowraster position

这个版本开始支持纹理自动生成Mipmap;以及关于point光栅化的parameter。

 

OpenGL 1.5

发布时间:2003年7月29日

 

扩展

特性增加

GL_ARB_vertex_buffer_object

 Bufferobject

GL_ARB_occlusion_query

 Occlusionquery

GL_EXT_shadow_funcs

 Shadowfunctions

 这个版本出现了缓冲对象(bufferobject),彻底取代了过去的顶点数组(vertex array)和立即模式,顶点数据可以从客户端内存(client'smemory)上传到服务端内存(server's memory)了;同时添加了非常重要的遮挡查询(occlusionquery)。

 

OpenGL 2.0

发布时间:2004年9月7日

 

扩展

特性增加

GL_ARB_shading_language_100

GL_ARB_shader_objects

GL_ARB_vertex_shader

GL_ARB_fragment_shader

 OpenGLShading Language 1.00

GL_ARB_draw_buffers

 Multiplerender targets

GL_ARB_texture_non_power_of_two

 Non-power-of-twotextures

GL_ARB_point_sprite

 Pointsprites

GL_EXT_blend_equation_separate

GL_EXT_stencil_two_side

 Separatestencil

 OpenGL终于有了自己的着色语言(shadinglanguage),ARB选择了3Dlabs的Dave设计的着色语言成为OpenGL原生的着色语言,同时OpenGL也开始有了顶点着色器(vertexshader)和片元着色器(fragmentshader),导致这个阶段的OpenGL出现了固定管线和可编程管线并存的情况;OpenGL的片元着色器输出(fragmentshader output)现在也可以输出到帧缓冲(framebuffer)的多个渲染目标(rendertarget)上去了;同时OpenGL的纹理也不再有2^n大小的限制。

 

OpenGL 2.1

发布时间:2006年7月2日

 

扩展

特性增加

GL_ARB_pixel_buffer_object

 Pixelbuffer objects

GL_EXT_texture_sRGB

 sRGBtextures

这个版本增加了像素缓冲对象(pxielbuffer object),用来更快地像素传输(pixel tansfer)的工作,支持将像素从纹理对象(textureobject)和帧缓冲对象(framebuffer object)包装到(pack)像素缓冲对象(pixel bufferobject),或者从像素缓冲对象解包装到纹理对象和帧缓冲对象,另外像素缓冲对象也可以像普通的缓冲对象(bufferobject)一样被映射(map)更新数据,通过DMA的方式更加快地传输纹理;同时支持sRGB格式的纹理对象。

 

代号LongsPeak和OpenGL 3.0争议

 在OpenGL3.0发布之前,这个版本的代号叫做LongsPeak,包含了很多大量修改OpenGL的工作方式以及根本性改变API的调用方式等内容。2008年8月11日OpenGL3.0发布,这个版本的OpenGL开始分core profile和compatibility profile,并且KhronosGroup希望只支持coreprofile,这个革新性的规范引起一片哗然,许多厂商明确表示不会接受这个建议,并表示会继续支持许多被划入compatibilityprofile的扩展,迫于压力compatibility profile被改为是可选的。OpenGL3.0的出现改变了过去OpenGL一定会向下兼容的特性,在一定程度上简化了API的臃肿以及增加了API的灵活度。

 

OpenGL 3.0

发布日期:2008年8月11日

扩展

特性增加

GL_EXT_gpu_shader4

 Newfunctions for shading language

GL_EXT_framebuffer_object

 Framebufferobjects, along with blitting, multisample renderbuffer objects, andpacked depth/stencil image formats

GL_EXT_framebuffer_blit

 Framebufferblit

GL_ARB_texture_float

GL_ARB_color_buffer_float

GL_NV_depth_buffer_float

GL_EXT_packed_float

GL_EXT_texture_shared_exponent

 Floating-pointcolor and depth internal formats for textures and renderbuffers

GL_EXT_texture_compression_rgtc

 Red-Greentexture compression

GL_EXT_transform_feedback

 Transformfeedback

GL_APPLE_vertex_array_object

 Vertexarray objects

GL_NV_conditional_render

 Conditionalrendering

GL_EXT_texture_integer

Intergral imageformats

 这个版本的OpenGL变化非常的大,开始分coreprofile和compatibility profile,coreprofile扩展的实现决定了所支持的OpenGL版本。下面列出这个版本之后可能会被弃用的很多特性:

  • Application-generatedobject names
  • Color indexmode
  • Shading language1.10 and 1.20
  • Begin/End primitivespecification
  • Edgeflags
  • Fixed functionvertex processing
  • Client-side vertexarrays
  • Rectangles
  • Current rasterposition
  • Two-sided colorselection
  • Non-spritepoints
  • Wide linee and linestrip
  • Quadrilateral andpolygon primitives
  • Sepatate polygondraw mode
  • Polygonstripple
  • Pixel transgermodes and operations
  • Pixeldrawing
  • Bitmaps
  • Legacy OpenGL 1.0pixel formats
  • Legacy pixelformats
  • Depth texturemode
  • Texture wrap modeCLAMP
  • Textureborders
  • Automatic mipmapgeneration
  • Fixed functionfragment processing
  • Alphatest
  • Accumulationbuffers
  • Context framebuffersize queries
  • Evaluators
  • Selection andfeedback mode
  • Displaylists
  • Hints
  • Attributestacks
  • Unified extensionstring

这个版本正式把帧缓冲对象(framebufferobject)划入core profile,现在OpenGL也具有离线的帧缓冲了,就像Direct3D的output-mergerstage专门管理render target和接收fragmentshader的输出;增加了许多GLSL的函数,尤其是texture方面的;帧缓冲对象之间可以互相拷贝像素到持有的不同的rendertarget,是性能上的提升;增加了浮点型和整型的texture和depth的imageformat;另外也增加了RGTC这个自带的纹理压缩模式;最为重要的增加就是transformfeedback,数据可以经过vertex shader和geometryshader之后,又输出回buffer而不经过rasterization以及之后的阶段,在物理和粒子的计算上面非常的有用;增加的vertexarray object方便管理buffer object以及vertex attribpointer和其开启/关闭状态,不必每次在渲染前都要设置一遍了;增加了重要的条件渲染(conditionalrendering)。

 OpenGL 3.1

发布日期:2009年3月24日

扩展

特性增加

GL_ARB_draw_instanced

 Instancedrendering

GL_ARB_copy_buffer

 Datacopying between buffer objects

GL_ARB_texture_buffer_object

 Buffertexture

GL_ARB_texture_rectangle

 Rectangletexture

GL_ARB_uniform_buffer_object

 Uniformbuffer object

GL_NV_primitive_restart

 Primitiverestart

有了Instancedrendering,减轻了同类物体绘制所占有的带宽压力;Copybuffer的出现,是让数据在client端进行拷贝,也是一种性能的优化;Buffer texture其实是让bufferobject像texture那样被访问,在某些特殊的场合有意想不到的用途;不得不谈的就是uniform bufferobject,过去OpenGL上传uniform数据需要靠glUniform*的函数进行上传,而OpenGL每个函数的调用所消耗的CPU循环都非常的大,频繁地调用glUniform*会带来很大的性能问题,而且到后期这些单个的uniform也会被保存至OpenGL管理的defaultuniform buffer中,现在开放了uniform bufferobject,通过map/unmap更新数据,函数调用开销明显地减少。

 

OpenGL 3.2

发布日期:2009年8月3日

扩展

特性增加

GL_ARB_geometry_shader4

 Geometryshaders, input/output interface block

GL_ARB_sync

 Fencesync objects

GL_ARB_vertex_array_bgra

 D3Dcompatible color vertex component ordering

GL_ARB_draw_elements_base_vertex

 Drawcommand allowing modification of the base vertex index

GL_ARB_seamless_cube_map

 Seamlesscube map filtering

GL_ARB_texture_multisample

 Multisampledtextures andd texture samplers for specific samplelocations

GL_ARB_fragment_coord_conventions

 Shaderfragment coordinate conventions control

GL_ARB_provoking_vertex

 Provokingvertex control

GL_ARB_depth_clamp

 Fragmentdepth clamping

这个版本最重磅的支持就是几何着色器(geometryshader),可以用来生成新的图元类型(点、线和三角形),后期重要的tessellation等技术都会使用到它;还有一个就是Texture正式支持multisample,可以作为rendertarget来进行framebufferobject上的抗锯齿,而不是经过的WGL_ARB_multisample和GLX_ARB_multisample进行窗口的抗锯齿。

 

OpenGL 3.3

发布日期:2010年3月11日

扩展

特性增加

GL_ARB_blend_func_extended

 Dual-sourceblending

GL_ARB_explicit_attrib_location

 Shader-definedlocationfor attributes and fragment shader outputs

GL_ARB_occlusion_query2

 Simpleboolean occlusion query

GL_ARB_sampler_objects

 Samplerobjects

GL_ARB_texture_swizzle

 Textureswizzle

GL_ARB_timer_query

 Timerqueries

GL_ARB_instanced_arrays

 Instancedarrays

GL_ARB_texture_rgb10_a2ui

GL_ARB_vertex_type_2_10_10_10_rev

 newtexture format for unsigned_10_10_10_2 and new vertex attributesfor 2_10_10_10

这个版本是shader model4.0的OpenGL的最终版本,这个版本改变了程序需要查询输入变量(attribute)的location的方式,可以像HLSL指定semantic一样在shader里指定layout,减少了相应API的调用;同时将textureobject和sampler state解耦,增加了sampler object,samplerobject也可以绑定到ACTIVE_TEXTURE上了。 

 

OpenGL 4.0

发布日期:2010年3月11日

扩展

特性增加

GL_ARB_tessellation_shader

 Tessellationcontrol and evaluation shaders

GL_ARB_texture_query_lod

GL_ARB_gpu_shader5

GL_ARB_gpu_shader_fp64

GL_ARB_texture_gather

GL_ARB_shader_subroutine

 OpenGLShading Language 4.00

GL_ARB_sample_shading

 Requestminimum number of fragment inputs

GL_ARB_draw_buffers_blend

 Individualblend equations for each color output

GL_ARB_draw_indirect

 Drawinstanced arrays indirect

GL_ARB_transform_feedback2

GL_ARB_transform_feedback3

 Transformfeedback objects and multiple feedback stream output

这个版本和OpenGL3.3同时发布,增加了令人兴奋的Tessellation Shader;Shader Language4.00的subroutine提供了在运行时刻不需要切换着色器或者是重新编译或者使用if判断选择不同功能的方法,降低了切换着色器程序所带来的巨大开销(切换着色器的CPU循环消耗真的非常的惊人);另外GL_ARB_draw_buffers_blend让fragmentshader输出的每条buffer都可以完成各自的pre-fragmentoperaion,而不是像过去那样每条都完成相同的pre-fragmentoperation;GL_ARB_transform_feedback2和GL_ARB_transform_feedback3提供了transformfeedback object,以及transform feedback相关的控制(比如pause之类),也把transformfeedback当做一个对象来进行处理。 

 

OpenGL 4.1

发布日期:2010年7月26日

扩展

特性增加

GL_ARB_ES2_compatibility

 Pullingmissing functionality from OpenGL ES 2.0 into OpenGL

GL_ARB_get_program_binary

 Queryand load a binary blob for program objects

GL_ARB_separate_shader_objects

 Abilityto bind programs individually to programmable stages

GL_ARB_viewport_array

 Multipleviewports for the same rendering surface, or one persurface

GL_ARB_shader_precision

 Documentsprecision requirements for several FP operaions

GL_ARB_vertex_attrib_64bit

Provoids 64-bitfloating-point component vertex shader inputs

这个版本把OpenGLES的一些功能划入core profile的范围,一方面反映出了OpenGLES巨大的成功;GL_ARB_get_program_binary提供了可以将shader事先编译好序列化进入二进制文件,避免了运行时进行编译的方法;这个版本也提供了64位的浮点型输入变量,提升了数据精度。 

 

OpenGL 4.2

发布日期:2011年8月8日

扩展

特性增加

GL_ARB_base_instance

 Allowsinstanced rendering with a starting instance value

GL_ARB_compressed_texture_pixel_storage

 Allowsfor sub-rectangle selections when transferring compressed texturedata

GL_ARB_conservative_depth

 Allosquerying of the aligment for pointers returned from buffer objectmapping operations

GL_ARB_internalformat_query

 Allowsthe user to detect the maximum number of samples possible for aparticular image format and texture type

GL_ARB_map_buffer_alignment

 Allowsquerying of the alignment for pointers returned from buffer objectmapping operations

GL_ARB_shading_language_420pack

 Allowsthe setting of Uniform Buffer Object and sampler binding pointsdirectly from GLSL, among many other small changes

GL__ARB_texture_storage

 Allowstexture objects to have immutable storage, and allocating allmipmap levels and images in one call. The storage becomesimmutable, but the contents of the storage are not

GL_ARB_transform_feedback_instanced

 Allowsinstanced rendering of data written by transform feedbackoperations

GL_ARB_shader_atomic_counters

 Allowsatomically incrementing/decrementing and fetching of buffer objectmemory locations from shaders

GL_ARB_shader_image_load_store

 Allowsshaders to read and write images, with few but difficultrestrictions

GL_ARB_texture_compression_bptc

 Allowsthe use of certain advanced compression formats

 这个版本比较好的改动就是现在也支持Compressedpixel format transfer了,而过去这是不允许的;另外提供了immutabletexture,可以调用一次API创建textureobject而不是像过去一样要频繁地调用API;还有一个就是GL_ARB_texture_compression_bptc,以及compatibilityprofile的GL_EXT_texture_compression_s3tc,让OpenGL开始支持所有的BlockCompression格式。

 

OpenGL 4.3

发布日期:2012年8月6日

扩展

特性增加

GL_ARB_arrays_of_arrays

 GLSLmultidimensional arrays

GL_ARB_clear_buffer_object

 ClearBuffer Objects to specific values, ala memset

GL_ARB_compute_shader

 ArbitraryCompute Shaders

GL_ARB_copy_image

 Arbitraryimage copying

GL_KHR_debug/GL_ARB_debug_output

 Debugmessaging

GL_ARB_ES3_compatibility

 Compatibilitywith OpenGL ES 3.0

GL_ARB_explicit_uniform_location

 Specifyinguniform locations in a shader

GL_ARB_framebuffer_no_attachments

 Renderingto a Framebuffer Object that has no attachments

GL_ARB_internalformat_query2

 Generalizedqueries for information about Image Formats

GL_ARB_invalidate_subdata

 Texture,buffer object, and framebuffer invalidation

GL_ARB_multi_draw_indirect

 Issuingmultiple indirect rendering commands from a single drawingcommand

GL_ARB_program_interface_query

 ImprovedAPI for getting info about program object interfaces

GL_ARB_shader_storage_buffer_object

 Bufferobject read-write access from shader, via a uniform-block stylemechanism

GL_ARB_shader_image_size

Get size of imagesfrom GLSL

GL_ARB_stencil_texturing

 Accessingthe stencil values from a depth/stencil texture

GL_ARB_fragment_layer_viewport

 Layerand viewport indices available from the fragment shader

GL_ARB_texture_query_levels

 GLSLcan detect the available mipmap pyramid of a sampler orimage

GL_ARB_texture_storage_multisample

 Immutablestorage for multisample textures

GL_ARB_texture_view

 Theability to create a new texture, with a new internal format, thatreferences an existing texture's storage

GL_ARB_vertex_attrib_binding

 Separationof vertex format from buffer object

GL_ARB_robust_buffer_access_behavior

GL_ARB_robustness_isolation

WGL_ARB_robustness_isolation

GLX_ARB_robustness_isolation

 Morerobustness of API

这个版本最重要的增加就是可以用于并行计算的computeshader;GL_ARB_explicit_uniform_location提供了uniform也能在GLSL中像HLSL指定semantic一样指定layout的方法,这个版本的OpenGL的vertexshader input和fragment shaderoutput,以及uniform现在都能在shader中指定layout了;把OpenGL ES 3的某些功能加入了OpenGLcore profile;增加了texture view的概念,用来共享已经创建纹理的内容;另外加入的debugmessaging帮助程序猿更好的调试OpenGL。
 
OpenGL4.4
发布日期:2013年7月23日

扩展

特性增加

GL_ARB_buffer_storage

 Allowsbuffer objects to have immutable storage, and allocating all datain one call.

GL_ARB_clear_texture

 Cleartexture Objects to specific values.

GL_ARB_enhanced_layouts

 Addmore functionality to layout qualifiers in OpenGL ShadingLanguage.

GL_ARB_multi_bind

 Allowingapplications to bind or unbind a set of objects in onecall.

GL_ARB_query_buffer_object

Introduces amechanism whereby the result of a query object may be retrievedinto a buffer object instead of client memory.

GL_ARB_texture_mirror_clamp_to_edge

 Extendsthe set of texture warp mdes to include an additional mode thateffectively uses a texture map twice as large as the original imagein which the additional half of the new image is a mirror image ofthe original image.

GL_ARB_texture_stencil8

AcceptSTENCIL_INDEX8 as a texture internal format.

GL_ARB_vertex_type_10f_11f_11f_rev

New vertexattribute data format.

GL_ARB_bindless_texture

 Shadercan access texture objects by handles directly.

 GL_ARB_compute_variable_group_size

 Allowsapplication to write generic compute shader that operate on workgroups with arbitrary dimensions.

 GL_ARB_indirect_parameters

 Add"parameter buffer" which is a target allowing buffers to storeparameters for certain drawing commands.

GL_ARB_seamless_cube_texture_per_texture

Allow aimplementation to provide a per-texture setting for enablingseamless sampling from cube maps.

GL_ARB_shader_draw_parameters

Add a built-invariable gl_DrawID in OpenGL Shading Language.

GL_ARB_shader_group_vote

Add new built-infunctions to compute the cmpoite of a set of boolean conditionsacross a group of shader invocations.

GL_ARB_sparase_texture

Allows theseparation of the graphics processors address space from therequirement that all textures must be physically backed.

 
这个版本的重要扩展就是GL_ARB_sparase_texture(GL_AMD_sparase_texture),提供了tiledtexture来减少mipmap所带来的巨大开销,Direct3D11.2也“借鉴”了这个扩展;另外GL_ARB_texture_bindless提供了Shader可以直接通过handle来访问textureobject的方法,取消了texture unit,没有必要每次渲染的时候都将要绑定的资源绑定到textureunit了,减少了很多OpenGL的函数调用;GL_ARB_enhanced_layout允许uniformblock内部指定layout,相当于Direct3D的registry;GL_ARB_buffer_object也提供了单个drawcall完成创建buffer object的方法。
 
总结
从发展历程上看,OpenGL1.0~OpenGL 1.5是经典的固定管线时代;OpenGL 2.0~OpenGL2.1是固定管线和可编程管线并存的时代;OpenGL 3.0~OpenGL4.x开始是可编程管线崛起的时代。在出现可编程管线的那个时代,OpenGL因为OpenGLARB的臃肿而一度落后,取而代之的是Khronos Group管理的精简的OpenGLES流行;最后ARB决定将OpenGL的接力棒交给KhronosGroup,在之后的几年内,OpenGL重新焕发了活力,推陈出新至今。另外在移动设备上免授权费用的OpenGLES的胜利,在一方面上也促进了桌面版的OpenGL重新回到主流地位,现在先进的OpenGL已经受到各个厂家的重视,Nvidia和AMD等显卡制造商都争相发布相关的OpenGL驱动;在游戏开发方面,因为其良好的可移植性,不同的平台、不同的主流引擎都会有OpenGL的实现。

 

附录

OpenGL 4.4pipeline

 

Q&A:

Q:OpenGL已经落伍了,更新的也非常的慢,再努力几年也赶不上技术雄厚的Direct3D。

A:近几年KhronosGroup接手OpenGL之后,发展速度迅猛,新版本的OpenGL已经更新到了OpenGL 4.4,其功能略超过Direct3D11,且被Nvidia和AMD主流显卡全面支持;值得注意的是有96.8%手持设备都只使用桌面OpenGL的子集OpenGLES作为他们的图形编程接口;许多家用游戏机也使用OpenGL作为其图形的编程接口。OpenGL已经重新回到主流的地位,我想或许你的教科书真的是太老了!

 

Q:OpenGL的功能会比Direct3D少,且OpenGL的速度不如Direct3D来得快。

A:PC上的OpenGL和Direct3D工作在同样的硬件上,他们的功能是基本一致的,另外你应该看看这个

 

Q:从哪里才能下载到OpenGL的SDK?

A:OpenGL并没有SDK,想要启用高级OpenGL都是通过获取相应的函数指针来完成的,当然必须由显卡的驱动支持才行。不过有些库可以帮你完成这类繁琐的工作,比如GLEW

 

Q:OpenGL的扩展是什么?

A:OpenGL功能的实现都是靠一个个扩展实现的,如果实现了OpenGL版本规范规定的扩展,那么就是实现了相应的OpenGL扩展。

 

Q:我如何知道我的设备支持了多少OpenGL扩展以及什么OpenGL扩展?

A:在编程中你可以使用特定的库比如GLEW检测相应的扩展是否被支持;你也可以下载OpenGLExtensionsViewer直观的查看支持的OpenGL的特性和扩展,这个软件也有多个平台的版本。

 

Q:感觉OpenGL的文档都太不详细了,我在搜索引擎里搜索的结果都很令人失望。

A:详细的OpenGL文档都在其官网里:①OpenGLRegistry里面有上百个OpenGL扩展的文档;②OpenGLReference Page里面有各个函数的使用方法;③OpenGLReference Card能帮助你宏观地了解OpenGL的所有主要函数;④OpenGLSpecification其实是扩展文档的集合,不过也是非常的详细和有用。

 

Q:什么是CoreProfile和Compatibility Profile?

A:在OpenGL的发展历程中,总是兼顾向下兼容的特性,但是到了一定的程度之后,这些旧有的OpenGLAPI不再适应时代的需要,还有一些扩展并不是驱动一定要实现的扩展,这些被统一划入可选的CompatibilityProfile;而由OpenGL规范规定必须支持的扩展,则是Core Profile,想要支持先进的OpenGL,相应的CoreProfile扩展必须被实现。

 

Q:有什么好的入门书籍可以介绍吗?

A:《OpenGLSuperbible》和《OpenGL Shading Language Cookbook》以及《OpenGLInsights》都非常的不错。

 

Q:OpenGL如何进行Debug,DirectX的PIX真的很好用呢。

A:现在支持GLSL和OpenGL跟步调试的只有Nvidia的Nsight,只支持Nvidia的显卡;其他的基本都是track,不支持GLSL的跟步调试,比如AMD的GPUPerfClient以及gDEBugger。还有AMD的GPUShaderAnalyzer也非常的不错,能看到相应的GLSL汇编代码。

 

Q:OpenGL有多少引擎支持呢!

A:基本主流的引擎都会在上层抽象一层,然后都有用OpenGL和Direct3D分别实现的模块;绝大部分的主流引擎都留有了OpenGL的实现。

 

Q:网上很多Tutorias都很老了,Nehe也落伍了,有没有比较好的Tutorias呢?

A:当然有!看看这个

 
  • 5
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值