相关疑难解决方法(0)

在Windows上使用OpenGL扩展

我想使用OpenGL扩展下公开的函数.我在Windows上,我该怎么做?

opengl glew

16
推荐指数
1
解决办法
2万
查看次数

glGenFramebuffers还是glGenFramebuffersEXT?

我糊涂了.要在Windows上的OpenGL 1.x中使用Framebuffer对象扩展(FBO),我使用哪些?:

wglGetProcAddress("glGenFramebuffers");
// or
wglGetProcAddress("glGenFramebuffersEXT");
Run Code Online (Sandbox Code Playgroud)

据我所知,来自不同硬件的用户的报告,一些驱动程序支持所有组合,两者之一或两者兼而有之.

哪个是正确的?有些司机真的支持一个但不支持另一个吗?如果找不到,试图从一个回到另一个是否正确?


编辑: 我仍然遇到ATI Radeon卡和围绕此问题的代码的严重问题.我们刚刚使用此代码(www.scirra.com)推出了商业编辑器.似乎无论我使用哪种代码组合来使用FBO,一些不同的用户组合报告他们根本看不到任何东西(即没有任何渲染).

这是我检测是否使用ARB功能(无后缀)或EXT后缀功能的代码.这在启动时运行:

gl_extensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
gl_vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
gl_renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
gl_version = reinterpret_cast<const char*>(glGetString(GL_VERSION));
gl_shading_language = reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION));

// If OpenGL version >= 3, framebuffer objects are core - enable regardless of extension
// (the flags are initialised to false)
if (atof(gl_version) >= 3.0)
{
    support_framebuffer_object = true;
    support_framebuffer_via_ext = false;
}
else
{
    // Detect framebuffer object support via ARB (for OpenGL version < 3) …
Run Code Online (Sandbox Code Playgroud)

c++ windows opengl fbo driver

8
推荐指数
1
解决办法
1万
查看次数

使用MinGW在Windows上构建GLEW 1.7.0

以前有很多问题:如何使用MinGW在Windows上编译GLEW 1.7.0源代码?目标是从c ++项目动态链接库.

更多信息:我正在使用QtCreator,ergo使用qmake进行构建.我在Windows 7上.到目前为止,我已经尝试/查看了以下链接.

使用发布的批处理文件也试图用g ++替换gcc

使用vc ++ libs构建静态,构建dll.a重用vc ++ .dll

获取MSYS运行makefile

关于初始问题的信息

使用GLEW msvc ++二进制文件的简单东西可以在我的桌面上运行

不幸的是,当我在项目中使用已编译的结果时,所有发布的解决方案都会在以下错误消息中结束:

undefined reference to `glDrawElements@16'
debug/Ex04.o: In function `Z6initGLv':
undefined reference to `glClearColor@16'
undefined reference to `glEnable@4'
debug/Ex04.o: In function `Z8updateGLv':
undefined reference to `glClear@4'
undefined reference to `glViewport@16'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug/ecg4.exe] Error 1
mingw32-make.exe: *** [debug] Error 2
Run Code Online (Sandbox Code Playgroud)

关于这个问题,我已经结束了.我已经对qmake和windows path变量中的LIBS路径进行了两次和三次检查,以包含glew dll所在的目录.qmake的INCLUDEPATH也应该没问题.这里是.pro文件中的路径:

LIBS += -L$$quote(C:/mypath/freeglut/lib/) -lfreeglut
LIBS += -L$$quote(C:/mypath/glew-1.7.0/lib/) -lglew32 -lglew32mx
#LIBS+= C:/mypath/glew-1.7.0/lib/libglew32.dll.a
#LIBS+= C:/Programming/glew-1.7.0/lib/libglew32mx.dll.a …
Run Code Online (Sandbox Code Playgroud)

glew mingw

7
推荐指数
1
解决办法
9186
查看次数

如何编写检查openGL支持的安装程序?

我们有一个使用OpenGL的3D查看器,但我们的客户有时会抱怨它"不工作".我们怀疑大多数这些问题源于他们试图在businiss笔记本电脑上使用,实际上是现代3D实时游戏.

我们如何在我们使用的windows msi安装程序中检查对openGL的支持?

作为旁注,如果你能回答"OpenGL支持的图形卡列表?",那也很有意思.奇怪,谷歌在这里没有帮助..

windows opengl windows-installer

6
推荐指数
1
解决办法
2562
查看次数

标签 统计

opengl ×3

glew ×2

windows ×2

c++ ×1

driver ×1

fbo ×1

mingw ×1

windows-installer ×1