PDA

View Full Version : Exception caught: Pixel Buffers Objects are not supported for OpenGL 1.3



daltomi
12-14-2013, 01:37 AM
Hi.

If I remember correctly in "ClanLib-2.x" I could run the PixelBuffer example( Bloom too).

Compile ok. But:


Exception caught: Pixel Buffers Objects are not supported for OpenGL 1.3
at clan::System::capture_stack_trace(int, int, void**, unsigned int*) (/usr/lib/libclan30Core-3.0.so.1)
at clan::Exception::Exception(std::string const&) (/usr/lib/libclan30Core-3.0.so.1)
at clan::GL1GraphicContextProvider::alloc_pixel_buffe r() (/usr/lib/libclan30GL-3.0.so.1)
at clan::TransferTexture::TransferTexture(clan::Graph icContext&, clan::PixelBuffer const&, clan::PixelBufferDirection, clan::BufferUsage) (/usr/lib/libclan30Display-3.0.so.1)
at (/home/dani/pack/ClanLib/Examples/Display_Render/PixelBuffer/pixelbuffer)
at (/home/dani/pack/ClanLib/Examples/Display_Render/PixelBuffer/pixelbuffer)
at main (/usr/lib/libclan30App-3.0.so.1)
at __libc_start_main (/usr/lib/libc.so.6)
at (/home/dani/pack/ClanLib/Examples/Display_Render/PixelBuffer/pixelbuffer)

Info glxinfo say:


server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context,
...
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample,
...
GLX version: 1.4
GLX extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_get_proc_address, GLX_ARB_multisample,
...
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 965GM
OpenGL version string: 2.1 Mesa 9.2.4
OpenGL shading language version string: 1.20


Possible problem, debugging.



Breakpoint 1, clan::OpenGLWindowProvider::create_context_glx_1_3 (this=0x665ac0, desc=..., shared_context=0x0) at GLX/opengl_window_provider_glx.cpp:744
744 if (is_glx_extension_supported("GLX_ARB_create_context"))
(gdb) n
746 if (glx.glXGetProcAddressARB)
(gdb) n
747 glXCreateContextAttribs = (ptr_glXCreateContextAttribs) glx.glXGetProcAddressARB((GLubyte*) "glXCreateContextAttribsARB");
(gdb) n
748 if (glx.glXGetProcAddress)
(gdb) n
749 glXCreateContextAttribs = (ptr_glXCreateContextAttribs) glx.glXGetProcAddress((GLubyte*) "glXCreateContextAttribsARB");
(gdb) n
753 if (glXCreateContextAttribs)
(gdb) n
760 int (*oldHandler)(::Display*, XErrorEvent*) = XSetErrorHandler(&cl_ctxErrorHandler);
.....


Observe how the variable "glXCreateContextAttribs" is overwritten.
I do not understand if they are 2 different problems or is the same.

Regards.

rombust
12-14-2013, 09:38 AM
OpenGL version string: 2.1 Mesa 9.2.4

ClanLib 2.x branch contained clanGL and clanGL1
clanGL supported OpenGL 2.0 and above.
clanGL1 supported OpenGL 1.3 and above.

In ClanLib 3.x branch, there is only clanGL, that internally contains 2 modules
GL3 supports OpenGL 3.0 and above
GL1 supports OpenGL 1.3 and above.

GL1 does not support shaders and OpenGL pixel buffer objects
Although, from a technical point of view, they can, if the driver supports them.
It just means that someone would have to implement it - copy GL3PixelBufferProvider to GL1PixelBufferProvider with "if (!glGenBuffers) throw("Not supported by this driver") everywhere

daltomi
12-15-2013, 02:47 AM
ClanLib 2.x branch contained clanGL and clanGL1
GL1 does not support shaders and OpenGL pixel buffer objects
Although, from a technical point of view, they can, if the driver supports them.

So that's my problem, my driver supports it.
The good news is that there is another way to use extensions, which is not only to check versions :)

Regards.

Judas
12-16-2013, 09:43 AM
ClanLib checks the OpenGL version rather than the extension string mainly for simplicity. Drivers from the OpenGL dark ages (1.5 to 2.1) tended to be so poorly coded that half of them would crash if you truly tried to use what they advertised anyway, so we drew a line in the sand at version 3.0. Anything older would only get basic legacy support.

Personally I do not think it is worth it to start adding extensive support for this old hardware by this point. Unless you own a laptop, I can literally buy you a new better supported and faster card for less than what employers pay me to work one single hour. If it is a laptop, I can probably scavenge an old unused laptop from someone with a better card by now as well.

rombust
12-16-2013, 10:19 AM
Yeah, I agree

daltomi
12-16-2013, 11:43 AM
It seems to touch a sensitive issue ;)
Thanks for the clarification anyway.