Black window with progressbar on Linux with Intel

Issue #23 resolved
houz created an issue

When running on a Debian leptop with an Intel GPU (i7) I see the progressbar and the frame counters, but the rest of the window stays black. The RAW frames seem to be decoded, at least when putting a print into decode() there are tons of values > 0. When enabling the OpenGL error checking in line 51 of mlrawviewer.py I get

[...]
Traceback (most recent call last):
  File "/home/houz/programming/magiclantern/mlrawviewer/GLCompute.py", line 228, in __draw
    self.onDraw(w,h)
  File "./mlrawviewer.py", line 319, in onDraw
    self.renderScenes()
  File "/home/houz/programming/magiclantern/mlrawviewer/GLCompute.py", line 214, in renderScenes
    s.render(self._frames)
  File "/home/houz/programming/magiclantern/mlrawviewer/GLCompute.py", line 175, in render
    d.render(self)
  File "./mlrawviewer.py", line 131, in render
    self.shaderNormal.demosaicPass(self.rawUploadTex,frameData.black,balance=balance)
  File "/home/houz/programming/magiclantern/mlrawviewer/ShaderDemosaic.py", line 59, in demosaicPass
    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)
  File "/usr/lib/python2.7/dist-packages/OpenGL/error.py", line 208, in glCheckError
    baseOperation = baseOperation,
GLError: GLError(
        err = 1286,
        description = 'invalid framebuffer operation',
        baseOperation = glDrawArrays,
        cArguments = (GL_TRIANGLE_STRIP, 0, 4)
)

This might be related to bug #7.

Comments (7)

  1. Andrew Baldwin repo owner

    Thanks for the detailed report. Unfortunately I haven't been able to reproduce this.

    I tried with integrated graphics on a 2011 laptop i7 and Ubuntu 12.04, but rendering was fine (if a bit slow).

    I suspect the cause of this problem is earlier than where the call failed - but rather where the target RGB texture is bound as a framebuffer. It could be a format issue (again) - the framebuffer should be a floating point or 16bit/pixel texture.

  2. houz reporter

    Is there anything I can do to help debugging this? Maybe running some tiny test program to see what actually fails? I don't know too much about OpenGL so I would probably not be able to write any test code though. But I am happy to run whatever you throw my way and report back.

  3. Andrew Baldwin repo owner

    Try this. In mlrawviewer.py, in class DemosaicScene, init ... try: self.rgbImage = GLCompute.Texture((self.raw.width(),self.raw.height()),None,hasalpha=False,mono=False,fp=True) except GLError: self.rgbImage = GLCompute.Texture((self.raw.width(),self.raw.height()),None,hasalpha=False,sixteen=True)

    Try changing the args "fp=True" and "sixteen=True" to "fp=False" and/or "sixteen=False".

    Also, try the latest code, and possible install GLFW3 as there is a new backend that will use that as an alternative to GLUT for getting the OpenGL context.

  4. Andrew Baldwin repo owner

    Interesting.

    If you replace both lines with just:

    self.rgbImage = GLCompute.Texture((self.raw.width(),self.raw.height()),None,hasalpha=False,sixteen=True)

    Does that work? I assume it should because the rawupload textures are 16bit.

    I'm just wondering why no error is raised by the float texture creation.

  5. Log in to comment