1

I am using Mesa3d opengl library and using SW renderer only. Is it possible to modify the Mesa3D library source to disable all animations, shades, dithering, etc to maximize performance of showing static images? I am trying to use an application and I wish to disable all its dynamic 2D/3D effects (such as animations, sliding, etc) and make it run faster and optimize it for showing static images.

How would I go about doing this?

Adam B
  • 141
  • 3
  • 2
    I don't see how this should work. Things like animations, sliding, etc. are not features of the Mesa3D library. They can just be implemented by USING the library. – BDL Sep 30 '15 at 08:33

2 Answers2

2

Is it possible to modify the Mesa3D library source to disable all animations, shades, dithering, etc to maximize performance of showing static images?

No, because nothing of that is done by Mesa. OpenGL, and by extension Mesa is just a sophisticated pencil to draw onto a framebuffer canvas, one point, line or triangle at a time.

Any effect, animation, shading and so on is implemented by the application you're running. Mesa just provides the means to draw each and every single frame, one by one. But it doesn't do the animation logic.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • Effects and animations are performed outside OpenGL, however a lot of things can be disabled within OpenGL, or at least hard coded so they can't turn on. See this page: http://www.mesa3d.org/perf.html – Adam B Sep 30 '15 at 19:47
  • @AdamB: That's not how it works. OpenGL is a state machine. The things you enable/disable in OpenGL are not controlling effects, but low level parameters. Also in case modern OpenGL is used, practically everything happens through shaders… *and shaders are not optional!* If you disable shaders you end up with an empty window. –– If you want to get rid of certain effects then this must be done on a per-application (or per-libraries). – datenwolf Sep 30 '15 at 19:58
  • oops, last comment was incomplete. Revised to below: @datenwolf, I was successfully able to disable dithering (GL_DITHER), blending (GL_BLEND), and other things by making the glEnable call for these a "no op" by basically removing the code for it. The result was a about 10-20% faster graphics rendering (at the cost of prettiness), which I was very happy with. Also, why would anyone want to disable shaders if they are essential here? – Adam B Oct 01 '15 at 05:44
0

Animations are created and controlled by the application, so they can not be turned off within OpenGL. However, effects such as dithering, blending, and others can be disabled such that they can not be enabled by OpenGL applications by modifying the glEnable function to set these flags to "no ops". See http://www.mesa3d.org/perf.html and https://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml.

Adam B
  • 141
  • 3