OpenGL PyOpenGL Framebuffer对象不起作用:缺少glGenFramebuffers

时间:2014-05-28 10:49:41

标签: opengl gpu framebuffer pyopengl

我有两个看似相同OpenGL版本和扩展程序支持的系统,但Framebuffer似乎没有在其中一个上工作。

Intel HD 4000 Graphics Card的系统。( FRAMEBUFFER WORKS HERE ) 以下是 glxinfo | grep OpenGL 的输出:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.1.0
OpenGL shading language version string: 1.30

这是 glxinfo | grep framebuffer 的输出:

GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, 
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB, 
GL_ARB_fragment_shader, **GL_ARB_framebuffer_object**, 
GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
GL_EXT_draw_instanced, GL_EXT_framebuffer_blit, 
GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled, 
GL_EXT_framebuffer_sRGB, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, 
GL_ARB_fragment_shader, GL_ARB_framebuffer_object, 
GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, 
GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_framebuffer_object, 
GL_EXT_framebuffer_sRGB, GL_EXT_gpu_program_parameters,

这是另一个系统,Framebuffer NOT 正在生成。

输出 glxinfo | grep OpenGL

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.3.0-devel (git-ecee4c4 saucy-oibaf-ppa)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.3.0-devel (git-ecee4c4 saucy-oibaf-ppa)
OpenGL shading language version string: 1.30

输出 glxinfo | grep framebuffer

GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
**GL_ARB_framebuffer_object**, GL_ARB_framebuffer_sRGB, 
GL_EXT_draw_instanced, GL_EXT_framebuffer_blit, 
GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled, 
GL_EXT_framebuffer_sRGB, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, 
GL_ARB_fragment_shader, GL_ARB_framebuffer_object, 
GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, 
GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_framebuffer_object, 
GL_EXT_framebuffer_sRGB, GL_EXT_gpu_program_parameters, 

GL_ARB_framebuffer_objectFramebuffer支持OpenGL的扩展程序。两个系统都有它们但仍有一个不起作用。

我正在使用PythonPyOpenGL)并使用以下函数来检查使用print dir(OpenGL.GL)存在的所有函数并将输出保存到文件中。我很惊讶地发现,尽管存在Framebuffer扩展,但该功能 glGenFramebuffers失踪了。

这可能是什么问题?

1 个答案:

答案 0 :(得分:0)

Python 2.7.5+上,Framebuffer个对象在单独的模块中可用。

该模块是: OpenGL.GL.framebufferobjects

而在Python 2.7.6及更高版本上,它可直接在 OpenGL.GL 中使用。