随笔分类 - OpenGL学习笔记
摘要:https://stackoverflow.com/questions/9482572/volume-rendering-using-glsl-with-ray-casting-algorithm vertex shader void main() { gl_Position = gl_ModelV
阅读全文
摘要:QSurfaceFormat surfaceFormat; surfaceFormat.setSamples(4);//多重采样 setFormat(surfaceFormat); //setFormat是QOpenGLWidget的函数 https://blog.csdn.net/toTheUnk
阅读全文
摘要:在Linux下,可以通过sudo glxinfo | grep "OpenGL"查看当前的OpenGL版本,如图所示: 前面的core profile指的是OpenGL的核心模式版本,后面的ES指的是OpenGL ES版本,这个一般在安卓,ios等设备上用的多。如果查看版本的命令行提示无效,输入以下
阅读全文
摘要:GL/gl.h: No such file or directory # include <GL/gl.h>原因是没有安装opengl库,终端执行命令:sudo apt-get install mesa-common-dev再次运行程序,上面的错误消失但随之而来另一个错误:cannot find -
阅读全文
摘要:GLint num1; glGetIntegerv(GL_MAX_TEXTURE_SIZE,&num1); qDebug() << "GL_MAX_TEXTURE_SIZE: --> " << num1; https://www.cnblogs.com/Anita9002/p/4410235.htm
阅读全文
摘要:我就记得我在哪里看过一种打印变量的黑魔法,搜了半天才找到:https://github.com/FreeBlues/ShaderDebugger作者的 blog 教程:http://www.cnblogs.com/freeblues/p/5724774.htmlhttp://www.cnblogs.
阅读全文
摘要:glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS,&maxVertUniformsVect);https://www.jb51.cc/css/217839.htmlopengl es 1.1 : GL_MAX_VERTEX_UNIFORM_VECTORS: --
阅读全文
摘要:使用高度为1的OpenGL纹理2D对象的示例: glTexStorage2D(GL_TEXTURE_2D, 8, GL_RGB8, 256, 1); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 256, 1, GL_RGB, GL_UNSIGNED_BYTE, p
阅读全文
摘要:opengl学习 1.http://nehe.gamedev.net/ 知名的OpenGL教程, 此教程最大的特点是提供了针对不同平台、不同编译器、不同语言的各种版本。你不用考虑自己用的是Linux/Windows、VC/BC、C++/Java/C#/VB,甚至D语言,你都能找到对应的版本。除了这些
阅读全文
摘要:转载:https://blog.csdn.net/schinta/article/details/48442167 https://my.oschina.net/sweetdark/blog/208024 着色器语言:https://blog.csdn.net/u013467442/article/
阅读全文
摘要:转:https://www.cnblogs.com/gl5773477/p/4041694.html OpenGL 支持两种颜色模式:一种是 RGBA模式,一种是 颜色索引模式。无论哪种颜色模式,计算机都必须为每一个像素保存一些数据,即通过每一个像素的颜色,来改变整体图形的颜色。不同的是, RGBA
阅读全文
摘要:转:https://www.cnblogs.com/gl5773477/p/4007350.html 从本篇开始,会给出一些代码实例,所以要配置好编译环境。 环境配置:vs2012下配置链接http://www.cnblogs.com/dreampursuer/archive/2014/05/27/
阅读全文
摘要:http://blog.sina.com.cn/s/blog_986c47a70101hujw.html 如何指定一个点呢?OpenGL提供了一系列函数。它们都以glVertex开头,后面跟一个数字和1~2个字母。例如: glVertex2d glVertex2f glVertex3f glVert
阅读全文
摘要:http://blog.sina.com.cn/s/blog_986c47a70101humi.html 点的大小默认为1个像素,但也可以改变之。改变的命令为glPointSize,其函数原型如下: void glPointSize(GLfloat size); size必须大于0.0f,默认值为1
阅读全文
摘要:1.2D空间的直线相交在二维空间中,利用两个直线方程y = kx + b我们可以直接计算出交点,但是这种方法麻烦了些,并且套用到三维空间用公式就更麻烦了,接下来介绍的是如何利用向量叉乘求出直线交点。并且由于利用叉乘最后可以的到一个比例值,这个值的大小还可以判断四个点所得到的两个线段是延长线相交还是线
阅读全文
摘要:https://learnopengl-cn.github.io/01%20Getting%20started/07%20Transformations/ https://learnopengl-cn.github.io/01%20Getting%20started/09%20Camera/#_7
阅读全文
摘要:https://learnopengl-cn.github.io/02%20Lighting/04%20Lighting%20maps/ https://www.jianshu.com/p/855ce8d81849 #include "widget.h" #include <QDebug> #inc
阅读全文
摘要:https://learnopengl-cn.github.io/02%20Lighting/03%20Materials/ https://www.jianshu.com/p/855ce8d81849 #include "QtFunctionWidget.h" #include <QDebug>
阅读全文
摘要:https://www.jianshu.com/p/bc40f5bd60f3 https://learnopengl-cn.github.io/02%20Lighting/01%20Colors/ #include "lightwidget.h" #include <QDebug> #include
阅读全文