OpenGL ES3.0 《学习笔记 一》Introduction to OpenGL ES 3.0

本文详细介绍了OpenGLES3.0图形管线的工作流程,包括顶点着色器与片段着色器的输入输出,以及栅格化与逐片段操作等内容。通过具体的着色器示例帮助读者理解每个阶段的作用。

学习对象: GLES_3.0.Programming.Guide.2nd.Edition.pdf


下图显示了 OpenGL ES 3.0  graphics pipeline


The inputs and outputs of the vertex  shader : 


Vertex Shader 示例:


Rasterization

The inputs and outputs of the Fragment shader : 


Fragment shader 示例:



Per-Fragment Operations


OpenGL ES Command Syntax




OpenGL® ES™ is the industry’s leading software interface and graphics library for rendering sophisticated 3D graphics on handheld and embedded devices. The newest version, OpenGL ES 3.0, makes it possible to create stunning visuals for new games and apps, without compromising device performance or battery life. In the OpenGL ES 3.0 Programming Guide, 2nd Edition, the authors cover the entire API and Shading Language. They carefully introduce OpenGL ES 3.0 features such as shadow mapping, instancing, multiple render targets, uniform buffer objects, texture compression, program binaries, and transform feedback. Through detailed, downloadable C-based code examples, you’ll learn how to set up and program every aspect of the graphics pipeline. Step by step, you’ll move from introductory techniques all the way to advanced per-pixel lighting and particle systems. Throughout, you’ll find cutting-edge tips for optimizing performance, maximizing efficiency with both the API and hardware, and fully leveraging OpenGL ES 3.0 in a wide spectrum of applications. All code has been built and tested on iOS 7, Android 4.3, Windows (OpenGL ES 3.0 Emulation), and Ubuntu Linux, and the authors demonstrate how to build OpenGL ES code for each platform. Coverage includes EGL API: communicating with the native windowing system, choosing configurations, and creating rendering contexts and surfaces Shaders: creating and attaching shader objects; compiling shaders; checking for compile errors; creating, linking, and querying program objects; and using source shaders and program binaries OpenGL ES Shading Language: variables, types, constructors, structures, arrays, attributes, uniform blocks, I/O variables, precision qualifiers, and invariance Geometry, vertices, and primitives: inputting geometry into the pipeline, and assembling it into primitives 2D/3D, Cubemap, Array texturing: creation, loading, and rendering; texture wrap modes, filtering, and formats; compressed textures, sampler objects, immutable textures, pixel unpack buffer objects, and mipmapping Fragment shaders: multitexturing, fog, alpha test, and user clip planes Fragment operations: scissor, stencil, and depth tests; multisampling, blending, and dithering Framebuffer objects: rendering to offscreen surfaces for advanced effects Advanced rendering: per-pixel lighting, environment mapping, particle systems, image post-processing, procedural textures, shadow mapping, terrain, and projective texturing Sync objects and fences: synchronizing within host application and GPU execution This edition of the book includes a color insert of the OpenGL ES 3.0 API and OpenGL ES Shading Language 3.0 Reference Cards created by Khronos. The reference cards contain a complete list of all of the functions in OpenGL ES 3.0 along with all of the types, operators, qualifiers, built-ins, and functions in the OpenGL ES Shading Language. Table of Contents Chapter 1. Introduction to OpenGL ES 3.0 Chapter 2. Hello Triangle: An OpenGL ES 3.0 Example Chapter 3. An Introduction to EGL Chapter 4. Shaders and Programs Chapter 5. OpenGL ES Shading Language Chapter 6. Vertex Attributes, Vertex Arrays, and Buffer Objects Chapter 7. Primitive Assembly and Rasterization Chapter 8. Vertex Shaders Chapter 9. Texturing Chapter 10. Fragment Shaders Chapter 11. Fragment Operations Chapter 12. Framebuffer Objects Chapter 13. Sync Objects and Fences Chapter 14. Advanced Programming with OpenGL ES 3.0 Chapter 15. State Queries Chapter 16. OpenGL ES Platforms Appendix A. GL_HALF_FLOAT Appendix B. Built-In Functions Appendix C. ES Framework API Book Details Title: OpenGL ES 3.0 Programming Guide, 2nd Edition Author: Aaftab Munshi, Budirijanto Purnomo, Dan Ginsburg, Dave Shreiner Length: 560 pages Edition: 2 Language: English Publisher: Addison-Wesley Professional Publication Date: 2014-03-10 ISBN-10: 0321933885 ISBN-13: 9780321933881
由资深OpenGL技术专家亲笔撰写,全面介绍OpenGL ES 3.0的各种特性及新增功能,通过大量已经编译和测试过的实例,详细讲解OpenGL ES 3.0中的应用程序接口(API)和图形管线,既涵盖简单图形的渲染方法,又深入介绍逐像素照明和粒子系统等高级渲染技术,并且包含大量有效使用API和硬件的实用技巧,为手持设备的各种高性能3D应用开发提供翔实指导。 《华章 OpenGL ES 3.0编程指南(原书第2版)》共16章:第1章简单介绍OpenGL ES ,并概述OpenGL ES 3.0图形管线;第2章通过绘制个三角形的简单OpenGL ES 3.0示例程序,讲解些API概念,并说明如何构建和运行OpenGL ES示例程序;第3章讲述为OpenGL ES 3.0创建表面和渲染上下文的API——EGL;第4章讨论创建着色器对象、编译着色器和检查编译错误的方法;第5章讲解编写着色器所需的着色语言基本知识;第6章详细介绍几何形状输入图形管线的方法,包含对顶点属性、顶点数组和缓冲区对象的讨论;第7章讨论几何形状如何装配成图元,介绍OpenGL ES 3.0中所有可用图元类型,包括点精灵、直线、三角形、三角形条带和三角扇形;第8章概述顶点着色器如何融入管线,以及OpenGL ES 着色语言中可用于顶点着色器的特殊变量;第9章和第10章介绍片段着色器,包括多重纹理、雾化、Alpha测试和用户裁剪平面等;第11章讨论片段操作,包括剪裁测试、模板测试、深度测试、多重采样、混合和抖动;第12章介绍使用帧缓冲区对象渲染屏幕外表面;第13章讨论同步对象和栅栏的使用方法;第14章介绍OpenGL ES 3.0高级编程,包含使用法线贴图的逐像素照明、环境贴图、粒子系统、图像后处理、程序纹理、阴影贴图、地形渲染和投影纹理等渲染技术。;第15章提供OpenGL ES 3.0中各种可用状态查询的参考;第16章讨论如何为iOS 7、Android 4.3 NDK、Android 4.3 SDK、Windows和Linux构建OpenGL ES样板代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值