上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页

点光源模型

摘要: 关于更多点光源模型请参考google.参考:http://www.lighthouse3d.com/tutorials/glsl-tutorial/point-light-per-pixel/例子源代码:http://download.csdn.net/detail/netrookie/4311707glsl vertex shaderstruct MaterialParameters { vec4 emission; vec4 ambient; vec4 diffuse; vec4 specular; float shininess;};struct LightSourc... 阅读全文
posted @ 2012-05-18 14:18 zengqh 阅读(260) 评论(0) 推荐(0) 编辑

平行光镜面反射模型

摘要: 即Blinn-Phong 光照模型, 关于此模型的更多信息请google.参照:http://www.lighthouse3d.com/tutorials/glsl-tutorial/directional-lights-ii/源代码:http://download.csdn.net/detail/netrookie/4306817主要看vertex shader:struct MaterialParameters { vec4 emission; vec4 ambient; vec4 diffuse; vec4 specular; float shininess... 阅读全文
posted @ 2012-05-16 17:40 zengqh 阅读(349) 评论(0) 推荐(0) 编辑

平行光漫反射模型

摘要: 即Lambert模型,更多关于Lambert的信息请google.参考:http://www.lighthouse3d.com/tutorials/glsl-tutorial/directional-lights-i/例子的源代码:http://download.csdn.net/detail/netrookie/4306606glsl vertex shader:struct MaterialParameters { vec4 emission; vec4 ambient; vec4 diffuse; vec4 specular; float shininess... 阅读全文
posted @ 2012-05-16 16:13 zengqh 阅读(312) 评论(0) 推荐(0) 编辑

glsl teapot 简单演示

摘要: http://download.csdn.net/detail/netrookie/4305918效果: 阅读全文
posted @ 2012-05-16 13:39 zengqh 阅读(128) 评论(0) 推荐(0) 编辑

glsl学习之cube

摘要: http://download.csdn.net/detail/netrookie/4305894本次DEMO使用了opengl 3.x, 弃用了固定管线API,使用GLM作为矩阵的数据运算库。这个很简单的例子,我用了三个小时才做完,也可以说是一个简单的opengl 3 框架吧。 阅读全文
posted @ 2012-05-16 13:36 zengqh 阅读(203) 评论(0) 推荐(0) 编辑

取得某个进程CPU的占用率

摘要: /* percent = (user_time_diff + kernel_time_diff) * 100 / (cpu_num * system_time_diff) */#include<windows.h>#include<stdio.h>#include <pdh.h>#include <Tlhelp32.h>int main(){ // Find the specified Process HANDLE hProcess = NULL; PROCESSENTRY32 pe = {sizeof(pe)}; HANDLE hSnapSho 阅读全文
posted @ 2012-05-02 22:57 zengqh 阅读(680) 评论(0) 推荐(0) 编辑

好的博客链接收集

摘要: 收藏夹在重新安装系统后就丢失了。下面将收集一些好的链接与blog.1.http://www.cppblog.com/kongque/ 手机图像有关2.http://www.cnblogs.com/wonderKK/ 作者想写自己的游戏引擎3.http://www.songho.ca/opengl/gl_fbo.htmlFBO, render to texture, render to depth and stencil buffer4.http://www.cnblogs.com/oiramario/游戏编程,印象最深的是看到作者剖析CEGUI的框架5.http://blog.csdn.net 阅读全文
posted @ 2012-05-01 09:55 zengqh 阅读(699) 评论(0) 推荐(0) 编辑

在游戏中使用“CEGUI”

摘要: 在游戏中使用“CEGUI” —第一章(底层)日期:2006/4/13 – 2006/10/10本文首次刊登于《游戏创造》,现开放与大家共享,转载请注明出处。作者介绍 唐亮(千里马肝),四年游戏从业经验,曾任职于大宇软星科技(上海)有限公司任程序技术指导,现在ATI任Engineer,主要负责XP/Vista下的Display Driver。迄今为止主要个人作品为《阿猫阿狗2》,参与开发《汉朝与罗马》、《阿猫阿狗大作战OLG》和《仙剑奇侠传4》,主要研究方向为C++、图形渲染技术和系统架构。blog地址:http://oiramario.cnblogs.com简介 CEGUI(Crazy Edd 阅读全文
posted @ 2012-04-25 09:24 zengqh 阅读(374) 评论(0) 推荐(0) 编辑

使用fbo来实现render to texture演示

摘要: opengl 都4.2了!!!!glDrawBufferglReadBufferglReadPixelsglCopyPixelsglCopyTexSubImage2D.......上面的函数已经被现代opengl所抛弃, 建议不要再使用了, 因为它严重地影响了渲染流水线的性能。取而代之的是各种帧缓冲区。就如上一篇文章中的,显示列表也已经被抛弃,取而代之的是VBO。render to texture是可以使用上面的函数来实现的。glDrawBuffer(GL_BACK); glReadBuffer(GL_BACK); drawTeapot(); glBindTexture(GL_TEXTURE_ 阅读全文
posted @ 2012-04-24 18:02 zengqh 阅读(575) 评论(0) 推荐(0) 编辑

vbo 简单演示

摘要: code:http://download.csdn.net/detail/netrookie/4252739picture: 阅读全文
posted @ 2012-04-22 21:24 zengqh 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页