#15 optionally disable direct rendering at runtime

openGL (8)

I think it might be useful to be able to choose at runtime to use direct rendering (ie, GPU hardware acceleration) or not (ie, CPU software rendering).

Rationale: GPUs are very fast, but transfering images back to the CPU is very slow. When rendering "offline" (eg with pix_write) it might turn out to be faster overall to use software rendering than direct rendering, depending of course on scene complexity.

I don't know if it is possible to implement, but I guess the user interface would take the form of a message to [gemwin] before the "create" message.


  • IOhannes m zmölnig

    you might have a look at driinfo [1], which claims to be able to set the DRI settings at runtime.

    it doesn't work with proprietary drivers like nvidia's, so i cannot test right now.

  • IOhannes m zmölnig

    on some gfx-cards/drivers (_not_ nvidia) you might also have luck by settings LIBGL_ALWAYS_INDIRECT=1

    and finally, if nothing helps, you could apply the following patch:

    Index: GemWinCreateXWin.cpp

    --- GemWinCreateXWin.cpp (Revision 2761)
    +++ GemWinCreateXWin.cpp (Arbeitskopie)
    @@ -228,7 +228,7 @@
    // create the rendering context
    try {
    - info.context = glXCreateContext(info.dpy, vi, hints.shared, GL_TRUE);
    + info.context = glXCreateContext(info.dpy, vi, hints.shared, GL_FALSE);
    } catch(void*e){

    if we can find solutions for the other platforms as well, i'd like to include this.

  • IOhannes m zmölnig

    • labels: --> openGL
    • assigned_to: nobody --> zmoelnig


Cancel  Add attachments