随笔分类 -  OpenGL

OpenGL编程
opengl 教程(3) 在窗口画三角形
摘要:原文地址:http://ogldev.atspace.co.uk/www/tutorial03/tutorial03.html 本教程内容很少,主要是在教程2基础上渲染一个三角形。 在前面一个教程中,我们在归一化的裁剪空间中定义一个顶点,这样就省去一些坐标变化操作,但不能省去的操作是视口变化。我们从z轴正方向向负方向看去,裁剪空间类似下图的样子,裁剪空间盒子中的三维... 阅读全文

posted @ 2013-01-08 20:42 迈克老狼2012 阅读(1141) 评论(0) 推荐(0) 编辑

视图矩阵的推导
摘要:把物体从世界坐标系转化到视点坐标系的矩阵称为视图矩阵。 下面我们先看下OpenGL中视图矩阵的推导过程: 假设视点或camera的局部坐标系为UVN,UVN分别指向右方、上方和后方从而构成右手坐标系,视点则处于局部坐标系的原点位置。 就如OpenGL中的函数gluLookAt(eyex, eyey, eyez, lookatx, lookaty,... 阅读全文

posted @ 2012-11-25 15:43 迈克老狼2012 阅读(6045) 评论(1) 推荐(0) 编辑

opengl 教程(6) 平移变换
摘要:原帖地址:http://ogldev.atspace.co.uk/www/tutorial06/tutorial06.html 在这篇教程中,我们开始对三维物体进行位置变化操作,比如平移、旋转、缩放等等。物体位置变化的操作通常都是通过矩阵来实现的,每种变化用一个矩阵表示,如果一个物体进行多种位置操作,可以把它们对应的矩阵乘起来,最后再乘以顶点的坐标,这样就可以得到物体位置变化后的... 阅读全文

posted @ 2012-10-28 09:15 迈克老狼2012 阅读(4359) 评论(1) 推荐(0) 编辑

opengl 教程(5) shader(2) uniform变量
摘要:原帖地址:http://ogldev.atspace.co.uk/www/tutorial05/tutorial05.html 在这篇教程中,我们将接触到一种新的shader变量uniform variables,这种变量和属性变量的区别:属性变量是指每个顶点shader调用时,都会根据属性的位置从顶点缓冲中装入该顶点的相应属性值,而uniform变量,则对每个dr... 阅读全文

posted @ 2012-10-28 07:23 迈克老狼2012 阅读(3030) 评论(0) 推荐(0) 编辑

opengl 教程(4) shader(1)
摘要:原帖地址:http://ogldev.atspace.co.uk/www/tutorial04/tutorial04.html 本章开始学习shader的使用,以前大家常使用OpenGL固定管线来做一些程序,shader相对来说使用较少,而现代gpu编程,shader应用少不了,虽然使用shader编程,代码多一点,但是却更灵活。 OpenGL的shader管... 阅读全文

posted @ 2012-10-27 09:51 迈克老狼2012 阅读(11368) 评论(1) 推荐(1) 编辑

opengl 教程(2) 在窗口画点
摘要:原文地址:http://ogldev.atspace.co.uk/www/tutorial02/tutorial02.html 通常在写OpenGL程序时候,我们都需要glew库,该库包装了OpenGL的各种扩展,便于我们使用。 我们可以在main函数中调用glew初始化函数,之后就可以查询OpenGL各种扩展能否使用了,对于能够使用的函数,可以动态的加载。 ... 阅读全文

posted @ 2012-10-23 21:05 迈克老狼2012 阅读(3408) 评论(2) 推荐(0) 编辑

opengl 教程(1) 创建窗口
摘要:本章教程内容主要来自:http://ogldev.atspace.co.uk/www/tutorial01/tutorial01.html 使用OpenGL之前,请先安装和设置好FreeGlut和glew, 下载地址: http://freeglut.sourceforge.net/ http://glew.sourceforge.net/ 原教程源码下载地址:http://og... 阅读全文

posted @ 2012-10-23 07:02 迈克老狼2012 阅读(4014) 评论(0) 推荐(0) 编辑

Gamma Correction: A Story of Linearity
摘要:from: http://www.geeks3d.com/20101001/tutorial-gamma-correction-a-story-of-linearity/ 1 – What is gamma correction and why is it important? 2 – How to achieve gamma correction? 3 – Downloa... 阅读全文

posted @ 2012-02-03 13:40 迈克老狼2012 阅读(1240) 评论(0) 推荐(0) 编辑

基本的光照计算公式
摘要:The Basic Lighting Model OpenGL and Direct3D provide almost identical fixed-function lighting models. In our example, we will use a simplified version that we will refer to as the "Basic" model... 阅读全文

posted @ 2012-02-02 17:02 迈克老狼2012 阅读(2687) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示