OpenGL
ym19860303
这个作者很懒,什么都没留下…
展开
-
水的效果
vec2 texCoord = v_texCoord; vec2 tc = texCoord.xy; vec2 p = -1.0 + 1.0 * tc; float len = length(p); vec2 uv = tc + (p/len)*cos(len*12.0-time*4.0)*0.003; vec3 col = texture2D(CC_Texture0,uv).转载 2014-11-10 23:14:55 · 989 阅读 · 0 评论 -
使用 FreeType
使用 FreeType2.1. 下载原创 2014-06-21 21:08:22 · 665 阅读 · 0 评论 -
Opengl 4种光照模型
1.环境光:Iambdiff = Kd*Ia其中Ia 表示环境光强度,Kd(0方向光:Ildiff = Kd * Il * Cos(θ)其中Il是点光源强度,θ是入射光方向与顶点法线的夹角,称入射角(0Ildiff = Kd * Il * dot(N,L)最后综合环境光和方向光源,Lambert光照模型可以写成:I转载 2014-05-11 14:59:23 · 10219 阅读 · 1 评论 -
GL_AMBIENT、GL_DIFFUSE、GL_SPECULAR,GL_SHININESS,GL_EMISSION,GL_COLOR_INDEXES的区别
(1)GL_AMBIENT、GL_DIFFUSE、GL_SPECULAR属性。这三个属性与光源的三个对应属性类似,每一属性都由四个值组成。GL_AMBIENT表示各种光线照射到该材质上,经过很多次反射后最终遗留在环境中的光线强度(颜色)。GL_DIFFUSE表示光线照射到该材质上,经过漫反射后形成的光线强度(颜色)。GL_SPECULAR表示光线照射到该材质上,经过镜面反射后形成的光线强度(颜色)转载 2014-05-06 23:20:23 · 1373 阅读 · 0 评论 -
Opengl Error!!!
GL_INVALID_ENUM, 0x0500Given when an enumeration parameter is not a legal enumeration for that function. This is given only for local problems; if the spec allows the enumeration in certain转载 2014-03-15 16:18:27 · 9565 阅读 · 0 评论 -
glew, glee与 gl glu glut glx glext的区别和关系
GLEW是一个跨平台的C++扩展库,基于OpenGL图形接口。使用OpenGL的朋友都知道,window目前只支持OpenGL1.1的涵数,但 OpenGL现在都发展到2.0以上了,要使用这些OpenGL的高级特性,就必须下载最新的扩展,另外,不同的显卡公司,也会发布一些只有自家显卡才支 持的扩展函数,你要想用这数涵数,不得不去寻找最新的glext.h,有了GLEW扩展库,你就再也不用为找不到函数转载 2013-07-24 00:16:22 · 1420 阅读 · 0 评论 -
OpenGL VBO, PBO与FBO
VBO,Vertex Buffer Array 为了加快显示速度,显卡增加了一个扩展,即VBO。它本质上是存储几何数据的缓存。它直接把顶点数据放置到显卡中的高速缓存,极大提高了绘制速度。 这个扩展用到ARB_vertex_buffer_object,它可以直接像顶点数组那样使用。唯一不同的地方在于它需要将数据载入显卡的高效缓存,因此需要占用渲染时间。 [参考文章1转载 2013-07-21 20:45:59 · 9151 阅读 · 0 评论 -
glGetAttribLocation 和 glBindAttribLocation
Q:Possible Duplicate:Explicit vs Automatic attribute location binding for OpenGL shadersWhy should I use glBindAttribLocation?I tried to call glGetAttribLocation without binding转载 2013-07-21 23:25:06 · 5707 阅读 · 0 评论 -
OpenGL on Mac
Using XCodeThis will get you an XCode project with all of the necessary frameworks added to it.Make sure you have XCode installed. If you don't (it doesn't come installed on new Apple machines转载 2012-10-26 19:28:15 · 599 阅读 · 0 评论 -
OpenGL 与 GLSL 版本
来自:https://github.com/mattdesl/lwjgl-basics/wiki/GLSL-VersionsYou can use the #version command as the first line of your shader to specify GLSL version:#version 120void main() { gl_FragC转载 2015-03-07 11:49:43 · 10315 阅读 · 0 评论