投影纹理映射(Projective Texture Mapping)(3)

vec3 projPos = vec3(2.0f,5.0f,5.0f); 
vec3 projAt = vec3(-2.0f,-4.0f,0.0f); 
vec3 projUp = vec3(0.0f,1.0f,0.0f); 
mat4 projView = glm::lookAt(projPos, projAt, projUp); 
mat4 projProj = glm::perspective(30.0f, 1.0f, 0.2f, 1000.0f); 
mat4 projScaleTrans = glm::translate(vec3(0.5f)) * glm::scale(vec3(0.5f)); 
prog.setUniform("ProjectorMatrix", projScaleTrans * projProj * projView); 

vec3 projPos = vec3(2.0f,5.0f,5.0f); 
vec3 projAt = vec3(-2.0f,-4.0f,0.0f); 
vec3 projUp = vec3(0.0f,1.0f,0.0f); 
mat4 projView = glm::lookAt(projPos, projAt, projUp); 
mat4 projProj = glm::perspective(30.0f, 1.0f, 0.2f, 1000.0f); 
mat4 projScaleTrans = glm::translate(vec3(0.5f)) * glm::scale(vec3(0.5f)); 
prog.setUniform("ProjectorMatrix", projScaleTrans * projProj * projView); 

OpenGL编程指南(原书第7版)中文扫描版PDF 下载

OpenGL 渲染篇

Ubuntu 13.04 安装 OpenGL

OpenGL三维球体数据生成与绘制【附源码】

Ubuntu下OpenGL编程基础解析

如何在Ubuntu使用eclipse for c++配置OpenGL

《OpenGL超级宝典》学习笔记

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/b4b6a29b4331243044d99af78fc60b94.html