{"id":1662,"date":"2025-09-15T07:37:12","date_gmt":"2025-09-15T11:37:12","guid":{"rendered":"https:\/\/jausoft.com\/blog\/?p=1662"},"modified":"2025-09-15T07:52:47","modified_gmt":"2025-09-15T11:52:47","slug":"improved-jogl-integration-in-vtk-jogamp-2-6-0","status":"publish","type":"post","link":"https:\/\/jausoft.com\/blog\/2025\/09\/15\/improved-jogl-integration-in-vtk-jogamp-2-6-0\/","title":{"rendered":"Improved JOGL Integration in VTK (JogAmp 2.6.0)"},"content":{"rendered":"<p>JOGL support in Kitware&#8217;s <a href=\"https:\/\/vtk.org\/\">VTK<\/a> has been <a href=\"https:\/\/gitlab.kitware.com\/sgothel\/vtk\/-\/commits\/jogl_patches\">improved<\/a> with <a href=\"https:\/\/jogamp.org\/wiki\/index.php\/Release_2.6.0\">JogAmp v2.6.0<\/a> and <a href=\"https:\/\/gitlab.kitware.com\/vtk\/vtk\/-\/merge_requests\/12417\">merged<\/a> on the <a href=\"https:\/\/gitlab.kitware.com\/vtk\/vtk\/-\/tree\/master\">VTK master branch<\/a>. Initialization of the OpenGL function pointer is ensured as well as utilizing JOGL&#8217;s OpenGL function pointer lookup of used OpenGL context.<!--more--><\/p>\n<p>Used JOGL\/JogAmp version:<\/p>\n<ul>\n<li><a href=\"https:\/\/jogamp.org\/wiki\/index.php\/Release_2.6.0\">JogAmp v2.6.0<\/a><\/li>\n<li><a href=\"https:\/\/jogamp.org\/wiki\/index.php?title=Downloading_and_installing_JOGL\">Downloading and Installing<\/a> (VTK uses the <a href=\"https:\/\/jogamp.org\/wiki\/index.php?title=Maven\">Maven deployment<\/a>)<\/li>\n<\/ul>\n<p>Additionally, a <a href=\"https:\/\/gitlab.kitware.com\/sgothel\/vtk\/-\/commits\/b_9_4_2\">backport to VTK 9.4.2<\/a> is available, as well as a recipe for its <a href=\"https:\/\/jausoft.com\/cgit\/users\/sgothel\/vtk-scripts.git\/tree\/msys2-mingw64-build.md\">mingw-w64-vtk makepkg build<\/a>.<\/p>\n<p>A special thanks to <a href=\"https:\/\/gitlab.kitware.com\/vtk\/vtk\/-\/merge_requests\/12417\">all developers helping with the merge<\/a> and to <a href=\"https:\/\/thermocalc.com\/\">Thermo-Calc<\/a> for commissioning this work.<\/p>\n<h3>Fix vtkGenericOpenGLRenderWindow::OpenGLInit()<\/h3>\n<p>`vtkGenericOpenGLRenderWindow::OpenGLInit()` must call OpenGLInitContext() before usage via `state-&gt;Reset()` to ensure all OpenGL function pointer (glad) are set.<\/p>\n<p>GL state `Reset` uses OpenGL functionality and w\/o having initialized the glad dispatch table application gives SIGSEGV calling a nullptr function.<\/p>\n<h3>Seamless OpenGL usage between JOGL and VTK<\/h3>\n<p>Ensures JOGL and VTK utilizes the same OpenGL function pointer lookup.<br \/>\nThe latter is essential to ensure same set of OpenGL functions are being used between JOGL and VTK and further allows JOGL loading a custom loaded OpenGL library.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JOGL support in Kitware&#8217;s VTK has been improved with JogAmp v2.6.0 and merged on the VTK master branch. Initialization of the OpenGL function pointer is ensured as well as utilizing JOGL&#8217;s OpenGL function pointer lookup of used OpenGL context.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[7,3,8],"tags":[9,16,44,33,17,46,29,34],"class_list":["post-1662","post","type-post","status-publish","format-standard","hentry","category-3d-opengl","category-computer-stuff","category-jogamp","tag-3d","tag-java","tag-jogamp","tag-linux","tag-opengl","tag-openjdk","tag-os-x","tag-windows"],"_links":{"self":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts\/1662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/comments?post=1662"}],"version-history":[{"count":10,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts\/1662\/revisions"}],"predecessor-version":[{"id":1672,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/posts\/1662\/revisions\/1672"}],"wp:attachment":[{"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/media?parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/categories?post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jausoft.com\/blog\/wp-json\/wp\/v2\/tags?post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}