06 2020 档案
摘要:使用__pool_alloc代替默认的内存分配器,可以省掉大量的malloc分配导致的cookie所占用的内存 std::vector<std::string, __gnu_cxx::__pool_alloc<std::string>> v;
阅读全文
摘要: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: --
阅读全文
摘要:void getGlVersion(int *major, int *minor) { const char *verstr = (const char *) glGetString(GL_VERSION); if ((verstr == NULL) || (sscanf(verstr, "%d.%
阅读全文
摘要:使用高度为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
阅读全文