![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OpenGL
xak
Sometimes when I look at the world, i can see a line behind it.
展开
-
GL_FIXED、GL_FLOAT
When I look at the documentation it looks like GL_FIXED is a fixed point 16:16 format. That means that the 16 upper bits of a GLfixed represents the integer part and the fraction is the lower 16 bits原创 2014-08-22 11:35:25 · 2378 阅读 · 0 评论 -
glDrawArrays、glDrawElements区别
Re:glDrawArrays跟glDrawElements ------------------------------------------------------------------------------------------------------------ 比如画一个由2个3角形组成的正方形,左上角坐标是l,t,右下角坐标是r,b 使用glDrawArrays绘制时,画2原创 2014-08-22 11:34:03 · 2811 阅读 · 0 评论 -
纹理映射坐标[OpenGL]
glTexCoordPointer(int size, int type, int stride, Buffer pointer) 其中poInter为映射坐标数组,指明将绘制的第I个点(i IntBuffer texCoords = IntBuffer.wrap(new int[]{ 0,one,one,one,one,0,0,0,原创 2014-08-22 11:34:05 · 1124 阅读 · 0 评论 -
OpenGL手动刷新
setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); 需要刷新的时候调用: requestRender();原创 2014-08-22 11:34:48 · 4891 阅读 · 0 评论 -
opengl中0x10000的由来
void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) type指定了每个坐标的数据类型,(注意,这里不同的数据类型含义不同,如果选择GL_FIXED,那么0x10000表示单位长度,如果选择 GL_FLOAT那么1.0f表示单位度。)原创 2014-08-22 11:34:50 · 1309 阅读 · 0 评论 -
OPENGL PNG半透明显示异常
出现场景:当两张纹理重叠时,开启深度测试,会剔除掉原来的纹理,留下背景色,所以后面的纹理透明的地方会显示成背景色,而不是被覆盖的的纹理。原创 2014-08-22 11:44:15 · 2873 阅读 · 2 评论 -
NEAREST、LINEAR温故
OpenGL在放大图片时有两种方法,一种是最近点(NEAREST),一种是线性(LINEAR),虽然在OpenGL里面,设置纹理参数的时候都称为过滤(filter),都通过glTexParameteri函数设置。比如二维时,设置线性过滤: glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); 放大时实际算法为插值转载 2014-08-22 11:44:48 · 1311 阅读 · 0 评论 -
3D Graphics with OpenGL-Basic Theory
1.Computer Graphics Hardware GPU (Graphics Processing Unit) Modern day computer has dedicated Graphics Processing Unit (GPU) to produce images for the display, with its own graphics memory (转载 2014-09-12 18:30:25 · 3171 阅读 · 0 评论