Hi,<div><br></div><div>We we're facing the same problem here with the vtkVolumeTextureMapper3D not working in windows static with VTK 5.6.1 and crashing in PixellBuffer with vtkgl::GenBuffer going NULL.</div><div>The exact same program works just fine with vtk 5.4, or with 5.6.1 on LINUX and MacOSX.</div>
<div><br></div><div>After some research, it appears that it was an openGl extension loading error. For some reason some extensions were not loaded at (or deloaded !?) at runtime. So we added something like that at the beginning of the project :</div>
<div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span> // Explicitly load openGl Extensions</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>vtkOpenGLExtensionManager *l_extensions = vtkOpenGLExtensionManager::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>l_extensions->SetRenderWindow( this->GetRenderWindow() );</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>// OpenGl</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_1_2") )</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_1_2");</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_1_3") )</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_1_3");</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_1_4") )</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_1_4");</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_1_5") )<span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_1_5");</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_2_0") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_2_0");</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_2_1") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_2_1");</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_VERSION_3_0") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_VERSION_3_0");</div><div><br></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_color_buffer_float") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_color_buffer_float");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_depth_texture") )<span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_depth_texture");</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_fragment_program") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_fragment_program");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_fragment_shader") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_fragment_shader");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_imaging") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_imaging");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_multitexture") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_multitexture");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_shader_objects") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_shader_objects");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_texture_compression") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_texture_compression");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_texture_float") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_texture_float");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_texture_rectangle") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_texture_rectangle");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_texture_non_power_of_two") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_texture_non_power_of_two");<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><br>
</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ARB_vertex_program") )</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ARB_vertex_program");</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>// NVIDIA</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_NV_texture_shader2") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_NV_texture_shader2");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_NV_register_combiners") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_NV_register_combiners");</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div>
<span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_NV_register_combiners2") )</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_NV_register_combiners2");</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>// ATI</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_ATI_fragment_shader") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_ATI_fragment_shader");</div><div><br></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_EXT_framebuffer_object") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_EXT_framebuffer_object");</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if( l_extensions->ExtensionSupported("GL_EXT_texture3D") )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>l_extensions->LoadExtension("GL_EXT_texture3D");</div></div><div><br></div><div><br></div><div>Which is completly hugly but does work. I think you don't need all of them but I was too lazy to test which one are vital and which are not</div>
<div><br></div><div>Good luck with that :)</div><div><br></div><div>Simon</div><div><br><br><div class="gmail_quote">On Thu, Jul 15, 2010 at 11:56, naresh <span dir="ltr"><<a href="mailto:naresh@winner.co.in">naresh@winner.co.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi<br>
<br>
I have one dll that all coding that is using vtk internally and i am using vtk as static library. But when i build library and try to run application is crash in vtkPixelBufferObject.cxx in CreatBuffer function. I tried to debug and found out<br>
vtkgl::GenBuffers is NULL so it crash out. I also tried to go more further and check the debug of vtkPixelBufferObject::LoadRequiredExtensions function which loads extension vtkgl::GenBuffers but when this function ends vtkgl::GenBuffer goes NULL. I donot know why ?<br>
<br>
Anyone can tell me what i am doing wrong ?<br>
<br>
Is there any issue of over multithread code generation from compiler ? I had checked both MDd flag. Which matches both same.<br>
<br>
Alex<br>
<br>
<br>
<br>
<br>
<br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br>------------------------------------------------------------------<br>Simon Esneault - Therenva<br>Centre d'Innovation Technologique<br>Centre Cardio-Pneumologique<br>
CHU Pontchaillou<br>Rennes, France<br>Tel : +33 (0)6 64 61 30 94<br>Mail : <a href="mailto:simon.esneault@therenva.com">simon.esneault@therenva.com</a><br>------------------------------------------------------------------<br>
</div>