Don't know if this is a bad compilation or video issues

i have the same problem, mine is ubuntu 8.10, Geforce 7650s, driver version 177.82. i run all sample successfully on the same hardward but on windows OS. i feel this is a big bug
of panda3d because it does not support linux as well as windows.

I found the cause of the bug. The buffer creation code seems to rely on the extension WGL_ARB_render_texture to exist, which doesn’t, on linux. Overriding the check seems to give a black buffer. Reading a little bit turns up theres a replacement, EXT_framebuffer_object.
The buffer code looks very hairy, and I’m totally not experienced in this area. I’m gonna need to dig deep into this.

OK, disregard that, I’ve just found the real bug. I’ve also found a fix, hooray! Now, all the sample programs with buffers work well on Linux. I’ll check it in soon, I guess it will be fixed in 1.6.0.

There were two things wrong. One of which was a typo – it depended on the WGL_ARB_render_texture to exist to create FBO’s, which isn’t actually needed, it uses something different.
Secondly, there was something aignacio_sf broke. Long story short, the code pseudo-looked like this:

if texture != NULL:
  # do stuff
else:
  if is_depth_buffer:
    glRenderBufferStorage(depth)
  else:
    glRenderBufferStorage(texture.getInternalFormat())

The actual code is much more complicated, but you can see that the last line always segfaults since texture is NULL in that case. :slight_smile:

whow great job! this was about the most annoying and longest-term bug in panda :slight_smile:

Great news! Thanks!

David

Wow, congrats !
This is so hot fix. Thanks.

And I just found that on linux and osx, _supports_render_texture is only get initialised, without queried at all from graphics driver.

Exactly. Because there is no WGL_ARB_render_texture on these platforms, so it doesn’t make much sense checking that either.