第一章 WebGL简介 Introduction

概述

webGL是一组用于在web html上下文中绘制3D图像的web接口

html Canvas对象所有绘制图像的舞台,通过使用CanvasRenderingContext2D接口进行绘制

WebGLRenderingContext是webGL的接口,通过它将开启webGL之门

webGL不同于其它web API提供了一些高级的但复杂的接口,相反,webGL提供的都是基础的接口,以应对不同需求,是业务无关的接口

webGL基于OpenGL® ES规范,所有但凡有冲突之处,均以后者为准


webGL介绍

webGL是一组用于在web页面绘制3D图形(动画)的API,继承自OpenGL® ES规范,提供了与其类似的渲染功能,区别在于webGL在html上下文中绘制.

webGL为渲染html中的Canvas对象而设计,HTML Canvas提供了一张可以用来渲染的画布,负责呈现不同的API绘制的效果.

CanvasRenderingContext2D是HTML Canvas对外提供的唯一的一个接口,在Canvas 规范的2D canvas rendering context章节定义

Canvas规范中还定义了另外一个接口:WebGLRenderingContext,通过这个接口将可以调用WebGL API

webGL与大多数web api的快速开发体验不同,面对复杂的3D应用需求,webGL选择提供最原始的功能(也是最灵活的)去应对千变万化的需求.

webGL可以在接口之上,再提供一些包装后的接口,为特定领域的使用提供量身打造的接口,添加这样的层使得使用起来更加舒服,并能加速开发效率和简化开发,但是由于webGL是继承自OpenGL® ES规范,应当考虑那些熟悉在桌面领域使用OpenGL或OpenGL ES2.0的开发者们,从桌面开发转到webGL开发时更简单一点

该文档介绍了很多功能并包含连接指向OpenGL ES页面,所有的努力都是为了使这些规范更加符合OpenGL ES规范.

文档中可能会包含一些错误.当出现了前后不一致,互相矛盾时,均以OpenGL ES规范为最终规范.

本文档剩余的章节期望与OpenGL SE2.0规范同步阅读(在写这篇文章时,最新版本为2.0.24,点击这里获取Khronos OpenGL ES API Registry)

如无特殊说明,每个方法的行为在OpenGL SE2.0中均有定义,本文档为了交互和安全性考虑可能与OpenGL SE2.0规范有一些分歧.

并且本文档经常定义那些规范中留给实现定义的部分,这些不同之处在统一在Differences Between WebGL and OpenGL ES 2.0章节说明


原文http://www.khronos.org/registry/webgl/specs/latest/#1

WebGL™ is an immediate mode 3D rendering API designed for the web. It is derived from OpenGL® ES 2.0, and provides similar rendering functionality, but in an HTML context. WebGL is designed as a rendering context for the HTML Canvas element. The HTML Canvas provides a destination for programmatic rendering in web pages, and allows for performing that rendering using different rendering APIs. The only such interface described as part of the Canvas specification is the 2D canvas rendering context, CanvasRenderingContext2D. This document describes another such interface, WebGLRenderingContext, which presents the WebGL API.

The immediate mode nature of the API is a divergence from most web APIs. Given the many use cases of 3D graphics, WebGL chooses the approach of providing flexible primitives that can be applied to any use case. Libraries can provide an API on top of WebGL that is more tailored to specific areas, thus adding a convenience layer to WebGL that can accelerate and simplify development. However, because of its OpenGL ES 2.0 heritage, it should be straightforward for developers familiar with modern desktop OpenGL or OpenGL ES 2.0 development to transition to WebGL development.

Many functions described in this document contain links to OpenGL ES man pages. While every effort is made to make these pages match the OpenGL ES 2.0 specification [GLES20], they may contain errors. In the case of a contradiction, the OpenGL ES 2.0 specification is the final authority.

The remaining sections of this document are intended to be read in conjunction with the OpenGL ES 2.0 specification (2.0.24 at the time of this writing, available from the Khronos OpenGL ES API Registry). Unless otherwise specified, the behavior of each method is defined by the OpenGL ES 2.0 specification. This specification may diverge from OpenGL ES 2.0 in order to ensure interoperability or security, often defining areas that OpenGL ES 2.0 leaves implementation-defined. These differences are summarized in the Differences Between WebGL and OpenGL ES 2.0 section.

第一章 WebGL简介 Introduction相关推荐

  1. LLVM 极简教程: 第一章 教程简介与词法分析器

    第一章 教程简介与词法分析器¶ 原文: Tutorial Introduction and the Lexer 教程介绍 欢迎走进"LLVM开发新语言"教程.本教程详细介绍了一门简 ...

  2. 《Kotlin 程序设计》第一章 Kotlin简介

    第一章 Kotlin简介 科特林岛(Котлин)是一座俄罗斯的岛屿,位于圣彼得堡以西约30公里处,形状狭长,东西长度约14公里,南北宽度约2公里,面积有16平方公里,扼守俄国进入芬兰湾的水道.科特林 ...

  3. hls fifo_【正点原子FPGA连载】第一章HLS简介--领航者ZYNQ之HLS 开发指南

    1)摘自[正点原子]领航者ZYNQ之HLS 开发指南 2)平台购买地址:https://item.taobao.com/item.htm?&id=606160108761 3)全套实验源码+手 ...

  4. 《RabbitMQ 实战指南》第一章 RabbitMQ 简介

    <RabbitMQ 实战指南>第一章 RabbitMQ 简介 文章目录 <RabbitMQ 实战指南>第一章 RabbitMQ 简介 一.什么是消息中间件 二.消息中间件的作用 ...

  5. 【正点原子FPGA连载】第一章 ZYNQ简介 -摘自【正点原子】领航者ZYNQ之FPGA开发指南_V2.0

    1)实验平台:正点原子领航者ZYNQ开发板 2)平台购买地址:https://item.taobao.com/item.htm?&id=606160108761 3)全套实验源码+手册+视频下 ...

  6. 第一章:Google简介

    第一章:Google简介 Google(www.Google.com)是一个搜索引擎,由两个斯坦福大学博士生Larry Page与Sergey Brin于1998年9月发明,Google Inc. 于 ...

  7. 自考02323《操作系统概论》第一章操作系统简介——思维导图

    备战2020年4月自考科目02323<操作系统概论>第一章操作系统简介 思维导图如下: ================================================== ...

  8. 第一章 huggingface简介

    HuggingFace/transformers系列文章 第一章 huggingface简介 文章目录 HuggingFace/transformers系列文章 前言 一.Bert简介 二.Huggi ...

  9. 第一章 Centos 简介与安装

    第一章 Centos 简介与安装 第一节 :Centos 简介 Centos作为主流的一种Linux操作系统,以后java1234课程中,比如后期讲Redis,以及部署一些项目,会把Centos作为服 ...

最新文章

  1. linux网卡入流速,linux下简单限制网卡速度与
  2. 20分钟教你手写Sping MVC
  3. springmvc 中文文档
  4. Oracle 10gR2 Psu 相关
  5. PMP 第十章 项目沟通管理
  6. php嗅探链接,教你怎么利用php来嗅探劫持服务器数据
  7. Linux FTP服务搭建(完整步骤)
  8. 单片机备用电池供电电路_单片机usb供电电路原理图详解
  9. 环信即时通信聊天理解
  10. win10 右键菜单管理
  11. TalkingData三大产品创新,引领2022数字营销技术新格局
  12. SDIO wifi Marvell8801/Marvell88w8801 介绍(二) ---- SDIO协议介绍
  13. 前端HTML、CSS学习完整笔记(中下篇)
  14. android 流畅动画svg,android svg动画
  15. 1213:八皇后问题
  16. 容器化技术和Docker
  17. 编写第一个 Arduino 程序
  18. 国内开源商城系统如何选型
  19. Pulmonary--Detection7
  20. 【CC2530授课笔记】⑧ PWM实现呼吸灯,RGB三色灯,蜂鸣器播放音乐

热门文章

  1. spingboot视图层实例(JSP+Freemaker)以及自定义配置读取
  2. scala学习手记2 - scala中的循环
  3. 原地踏步 – 没有突破高效理念的结果
  4. 今晚的比赛(2011.12.4)
  5. 【DP + 卖股票】LeetCode 123. Best Time to Buy and Sell Stock III
  6. 【机器学习】鸢尾花数据探索
  7. keras.layers.Conv2D 与tf.layers.Conv2D 的兼容性: AttributeError: ‘tuple‘ object has no attribute ‘layer‘
  8. 02(d)多元无约束优化问题-拟牛顿法
  9. walle多渠道打包+Tinker(bugly)热更新集成+360加固(乐固)
  10. 专业运维配的vsftpd.conf