The source code of 'vtkFrameBufferObject::IsSupported' uses the method 'vtkOpenGLExtensionManager::ExtensionSupported' to know if the required features are supported or not. Maybe you could put some checkpoints on these lines to know which feature create this X bad request.<br>
Moreover, if you look in the code of 'vtkOpenGLExtensionManager::ExtensionSupported', there is some workaround for some graphic card. Maybe your card (or the graphic driver) need also some workarounds.<br><br>Another possibility is that you do the check before any update of the rendering window. Then the OpenGL extensions are not loaded.<br>
<br><div class="gmail_quote">On Sun, Oct 28, 2012 at 11:36 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, Oct 28, 2012 at 4:56 PM, Arnaud BARRE <<a href="mailto:arnaud.barre@gmail.com">arnaud.barre@gmail.com</a>> wrote:<br>
> This is a naive comment, but maybe this feature is not supported by the<br>
> driver of you graphic card under Linux?<br>
><br>
> I'm curious to know how this example works under Windows (with a Nvidia card<br>
> for example).<br>
<br>
</div>I switched video drivers and it indeed now works as expected.<br>
<br>
I tried to put a check in the example:<br>
<br>
bool supported = vtkFrameBufferObject::IsSupported(renderWindow); //<br>
adapted from line 182 of vtkShadowMapPass.cxx<br>
<br>
if(!supported)<br>
{<br>
std::cerr << "Shadow rendering is not supported by the current video"<br>
<< " driver!" << std::endl;<br>
return EXIT_FAILURE;<br>
}<br>
<br>
but when I run that I get this error:<br>
<br>
X Error of failed request: BadMatch (invalid parameter attributes)<br>
Major opcode of failed request: 1 (X_CreateWindow)<br>
Serial number of failed request: 65<br>
Current serial number in output stream: 72<br>
<br>
Is there a different way I can check for this condition?<br>
<div class="HOEnZb"><div class="h5"><br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>