Lesson 47 CG Vertex Shader

原创文章,转载请注明: 转载自慢慢的回味

本文链接地址: Lesson 47 CG Vertex Shader

Using vertex and fragment (or pixel) shaders to do some rendering dirty work can have numerous benefits. The most obvious is the movement of some of the graphics related CPU load off the CPU and onto the GPU. Cg provides a (reasonably) simple language for writing very powerful shaders. This tutorial has multiple aims. The first is to present a simple vertex shader that actually does something, without introducing unnecessary lighting etc… The second is to provide the basic mechanism for running the vertex shader with visible results using OpenGL. As such, it is aimed at the beginner interested in Cg who has a little experience in OpenGL. This tutorial was written by Owen Bourne. If you enjoy it, please take the time to email him and let him know!本作品采用知识共享署名 4.0 国际许可协议进行许可。

Lesson 19 Particle Engine Using Triangle Strips

原创文章,转载请注明: 转载自慢慢的回味

本文链接地址: Lesson 19 Particle Engine Using Triangle Strips

Have you ever wanted to create an explosion, water fountain, flaming star, or some other cool effect in your OpenGL program, but writing a particle engine was either too hard, or just too complex? If so, this tutorial is for you. You’ll learn how to program a simple but nice looking particle engine. I’ve thrown in a few extras like a rainbow mode, and lots of keyboard interaction. You’ll also learn how to create OpenGL triangle strips. I hope you find the code both useful and entertaining.本作品采用知识共享署名 4.0 国际许可协议进行许可。