上一页 1 2 3 4 5 6 7 8 9 ··· 41 下一页
摘要: 情况 用glTexImage2D函数绘制纹理图片时,颜色出现失真、偏差(偏蓝色) 原因 像素在bmp图像中以BGR方式进行存储,GL_BGR_EXT方式进行纹理创建。 控制颜色格式的是glTexImage2D函数的format、internalformat参数。 解决方法 原来(一般教材的示例代码) 阅读全文
posted @ 2022-11-11 13:22 Clotho_Lee 阅读(961) 评论(0) 推荐(0)
摘要: Visual Studio会在项目的主目录下生成.vs文件夹,里面的.ipch和.sdf/.db文件会越来越大 ipch和sdf/db文件是用于代码浏览数据库(SDF)、浏览/导航选项、IntelliSense特性 禁用方法 菜单栏 -> 工具(Tools) -> 选项(Options) -> 文本 阅读全文
posted @ 2022-11-07 14:02 Clotho_Lee 阅读(856) 评论(0) 推荐(1)
摘要: C++项目编译时遇到警告(warning) LNK4042 object specified more than once; extras ignored 原因 某个头文件(.h)的文件类型(item type)被设置成了C/C++ compiler,这个类型是.cpp文件的默认类型。 按微软的说法 阅读全文
posted @ 2022-11-04 18:54 Clotho_Lee 阅读(500) 评论(0) 推荐(0)
摘要: C++项目编译时遇到警告(warning) LNK4098 defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 原因 使用多线程调试dll(/MDd)模式时,msvcrtd.lib和具体使用的 阅读全文
posted @ 2022-11-01 18:19 Clotho_Lee 阅读(688) 评论(0) 推荐(0)
摘要: OpenGL 函数库相关的 API 有核心库(gl),实用库(glu),辅助库(aux)、实用工具库(glut),窗口库(glx、agl、wgl)和扩展函数库等。 gl 是核心,glu 是对 gl 的部分封装。glx、agl、wgl 是针对不同窗口系统的函数。 glut 是为跨平台的 OpenGL 阅读全文
posted @ 2022-09-30 15:17 Clotho_Lee 阅读(3950) 评论(0) 推荐(0)
摘要: 背景 glut库自从2000年之后就没更新了,freeglut库一般是只提供源代码,不提供预编译文件 如果在Linux下使用,可以直接用install安装OpenGL开发环境。而在Windows则需要自行编译 方法 1.下载freeglut源代码并解压 http://freeglut.sourcef 阅读全文
posted @ 2022-09-22 20:28 Clotho_Lee 阅读(1146) 评论(0) 推荐(0)
摘要: 有时在64位Windows下用Visual Studio调试运行OpenGL程序会报错,提示“应用程序无法正常启动(0xc000007b)” 原因: 1.即使创建的是32位的OpenGL程序,在运行时,程序还是会到C:\Windows\SysWOW64目录去寻找dll 2.即使是32位的dll,也要 阅读全文
posted @ 2022-09-22 19:44 Clotho_Lee 阅读(1159) 评论(0) 推荐(0)
摘要: 原因: 一般是因为链接器(Linker)的配置项SubSystem选择了Console (/SUBSYSTEM:CONSOLE),而代码是需要编译成WinForm程序。 解决方法: 右键项目名 -> Properties -> Configuration Properties -> Linker - 阅读全文
posted @ 2022-09-11 01:59 Clotho_Lee 阅读(335) 评论(0) 推荐(0)
摘要: 1.在资源浏览器检索SDK(一般是检索C盘),找到Windows SDK的安装目录(名字一般是Microsoft SDKs),并确认里面不是空。 2.如果检索不到Windows SDK/Microsoft SDKs目录或目录为空,就运行Visual Studio Installer,补充安装Wind 阅读全文
posted @ 2022-09-11 01:39 Clotho_Lee 阅读(1853) 评论(0) 推荐(0)
摘要: 直接安装一个叫StartAllBack的工具即可简单设置。 阅读全文
posted @ 2022-09-06 00:23 Clotho_Lee 阅读(284) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 41 下一页