View Full Version : Ensure OpenGLapplication is using H/W acceleration
02-22-2011, 05:06 AM
I have written an application to blend 2 images using openGL Libraries(GL,GLU,glut).How can I make sure it is using hardware acceleration?.
I work on an i5 core( with integrated graphics accelerator GMA-HD) running on open suse 11.1.Running glxinfo showed that direct rendering is enabled.The API's I used in my application are glDrawBuffer,glSwapBuffers,glColor4f,glBlendfunc etc..I converted the bmp images into 2D textures and used them to draw the images into screen.
02-22-2011, 12:04 PM
I don't know about Intel cards. But I must admit people here are most of the time disappointed about them. Anyway. Try to see which GL version you can run (glxinfo should say that too), run a game (like ut 2004, even if a bit old it will be slow without HW acceleration), to write an OpenGL with shaders and see if it's faster or slower than without (Mesa software shaders should be slower).
DRI is not the only thing about HW acceleration.
And depending on your card it seems you can have different support under linux, regarding to this:
02-22-2011, 05:24 PM
How can I make sure it is using hardware acceleration?
As mentioned, ensuring you've got direct rendering isn't a guarantee of HW accel, but it's better than nothing. Check context with glXIsDirect and ensure the answer is "true".
Also doesn't hurt to ensure that the $DISPLAY you create your X display connection on is is :0, :0.0, unix:0, unix:0.0. This ensures a local connection to the X server that uses local IPC to communicate rather than TCP. There are other possibilities you might use (e.g. :1.0) if you really know what you're doing. Main thing is hostname is "" or "unix".
02-23-2011, 05:39 AM
I checked the context with glXIsDirect and the answer is "true". Also the display is like u said having "0:0".
Invoke glxinfo, check the renerer string, if it says Intel, you've got hardware acceleration, if it says software, you don't.
E.g. on my system:
> glxinfo | grep renderer
OpenGL renderer string: Mesa DRI Intel(R) 965GM
> LIBGL_ALWAYS_SOFTWARE=1 glxinfo | grep renderer
OpenGL renderer string: Software Rasterizer
I don't know about Intel cards. But I must admit people here are most of the time disappointed about them.
That's because their Windows drivers suck. The situation is better on GNU/Linux.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.