<?xml version="1.0" encoding='utf-8'?>
<!-- 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
-->
<?xml-stylesheet type="text/xsl" href="https://mbien.dev/roller-ui/styles/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom">
    <title type="html">Michael Bien&apos;s Weblog</title>
    <subtitle type="html">don&apos;t panic</subtitle>
    <id>https://mbien.dev/blog/feed/entries/atom</id>
        <link rel="self" type="application/atom+xml" href="https://mbien.dev/blog/feed/entries/atom?tags=jogl" />
    <link rel="alternate" type="text/html" href="https://mbien.dev/blog/" />
    <updated>2024-08-24T07:57:58+00:00</updated>
    <generator uri="http://roller.apache.org" version="6.1.4">Apache Roller</generator>
    <entry>
        <id>https://mbien.dev/blog/entry/java_binding_for_the_opencl</id>
        <title type="html">Java Binding for the OpenCL API </title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/java_binding_for_the_opencl"/>
        <published>2010-09-10T22:49:42+00:00</published>
        <updated>2020-04-09T09:54:27+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
I am currently working on Java Binding for the &lt;a href=&quot;http://en.wikipedia.org/wiki/Opencl&quot;&gt;OpenCL&lt;/a&gt; API using &lt;a href=&quot;https://jogamp.org/gluegen/www/&quot;&gt;GlueGen&lt;/a&gt; (as used in &lt;a href=&quot;https://jogl.jogamp.org&quot;&gt;JOGL&lt;/a&gt;, &lt;a href=&quot;https://joal.jogamp.org&quot;&gt;JOAL&lt;/a&gt;). The project started as part of my bachelor of CS thesis short after the release of the first OpenCL specification draft and is now fully feature complete with OpenCL 1.1. &lt;a href=&quot;https://jogamp.org/jocl/www/&quot;&gt;JOCL&lt;/a&gt; is currently in the stabilization phase, a beta release shouldn&apos;t be far away.
&lt;/p&gt;

&lt;h3&gt;Overview - How does it work?&lt;/h3&gt;
JOCL enables applications running on the JVM to use OpenCL for massively parallel, high performance computing tasks, executed on heterogeneous hardware (GPUs, CPUs, FPGAs etc) in a platform independent manner. JOCL consists of two parts, the low level and the high level binding.
&lt;p&gt;
The &lt;b&gt;low level bindings (LLB)&lt;/b&gt; are automatically generated using the official OpenCL &lt;a href=&quot;http://www.khronos.org/registry/cl/&quot;&gt;headers&lt;/a&gt; as input and provide a high performance, JNI based, 1:1 mapping to the C functions.
&lt;/p&gt;
&lt;p&gt;This has the following advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;reduces maintenance overhead and ensures spec conformance&lt;/li&gt;
&lt;li&gt;compiletime JNI bindings are the fastest way to access native libs from the JVM&lt;/li&gt;
&lt;li&gt;makes translating OpenCL C code into Java + JOCL very easy (e.g. from books or tutorials)&lt;/li&gt;
&lt;li&gt;flexibility and stability: OpenCL libs are loaded dynamically and accessed via function pointers&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;
The hand written &lt;b&gt;high level bindings (HLB)&lt;/b&gt; is build on top of LLB and hides most boilerplate code (like object IDs, pointers and resource management) behind easy to use java objects.
HLB use direct NIO buffers internally for fast memory transfers between the JVM and the OpenCL implementation and is very GC friendly. Most of the API is designed for method chaining but of course you don&apos;t have to use it this way if you don&apos;t want to. JOCL also seamlessly integrates with JOGL 2 (both are built and tested together). Just pass the JOGL context as parameter to the JOCL context factory and you will receive a shared context. If you already know OpenCL and Java, HLB should be very intuitive for you.
&lt;/p&gt;
&lt;p&gt;
The project is available on &lt;a href=&quot;https://jocl.jogamp.org&quot;&gt;jogamp.org&lt;/a&gt;. Please use the &lt;a href=&quot;https://jogamp.org/forum.html&quot;&gt;mailinglist / forum&lt;/a&gt; for feedback or questions and the &lt;a href=&quot;https://jogamp.org/bugzilla/&quot;&gt;bugtracker&lt;/a&gt; if you experience any issues.
The JOCL &lt;a href=&quot;http://github.com/mbien/jocl&quot;&gt;root repository&lt;/a&gt; is located on github, you may also want to take a look at the &lt;a href=&quot;http://github.com/mbien/jocl-demos&quot;&gt;jocl-demos&lt;/a&gt; project. (If the demos are not enough you might also want to take a look at the junit tests)
&lt;/p&gt;

&lt;h3&gt;Screenshots (sourcecode in jocl-demos project):&lt;/h3&gt;
&lt;a href=&quot;https://jogamp.org/jocl/www/Julia3d.png&quot;&gt;
&lt;img src=&quot;https://jogamp.org/jocl/www/Julia3d_sm.png&quot; width=&quot;400&quot; height=&quot;300&quot; alt=&quot;JOCL Julia Set&quot;/&gt;
&lt;/a&gt;
&lt;img src=&quot;https://jogamp.org/jocl/www/mandelbrot64_sm.png&quot; width=&quot;256&quot; height=&quot;256&quot; alt=&quot;high precision&quot;/&gt;


&lt;p&gt;
More regarding OpenGL interoperability and other features in upcoming blog entries.
&lt;/p&gt;
&lt;p&gt;
The following sample shows basic setup, computation and cleanup using the high level APIs.
&lt;/p&gt;
&lt;h3&gt;Hello World or parallel a+b=c&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
/**
 * Hello Java OpenCL example. Adds all elements of buffer A to buffer B
 * and stores the result in buffer C.
 * Sample was inspired by the Nvidia VectorAdd example written in C/C++
 * which is bundled in the Nvidia OpenCL SDK.
 * @author Michael Bien
 */
public class HelloJOCL {

    public static void main(String[] args) throws IOException {
        // Length of arrays to process (arbitrary number)
        int elementCount = 11444777;
        // Local work size dimensions
        int localWorkSize = 256;
        // rounded up to the nearest multiple of the localWorkSize
        int globalWorkSize = roundUp(localWorkSize, elementCount);

        // setup
        CLContext context = CLContext.create();

        CLProgram program = context.createProgram(
                       HelloJOCL.class.getResourceAsStream(&quot;VectorAdd.cl&quot;)
                                 ).build();

        CLBuffer&amp;lt;FloatBuffer&amp;gt; clBufferA =
                       context.createFloatBuffer(globalWorkSize, READ_ONLY);
        CLBuffer&amp;lt;FloatBuffer&amp;gt; clBufferB =
                       context.createFloatBuffer(globalWorkSize, READ_ONLY);
        CLBuffer&amp;lt;FloatBuffer&amp;gt; clBufferC =
                       context.createFloatBuffer(globalWorkSize, WRITE_ONLY);

        out.println(&quot;used device memory: &quot;
            + (clBufferA.getSize()+clBufferB.getSize()+clBufferC.getSize())/1000000 +&quot;MB&quot;);

        // fill read buffers with random numbers (just to have test data).
        fillBuffer(clBufferA.getBuffer(), 12345);
        fillBuffer(clBufferB.getBuffer(), 67890);

        // get a reference to the kernel functon with the name &apos;VectorAdd&apos;
        // and map the buffers to its input parameters.
        CLKernel kernel = program.createCLKernel(&quot;VectorAdd&quot;);
        kernel.putArgs(clBufferA, clBufferB, clBufferC).putArg(elementCount);

        // create command queue on fastest device.
        CLCommandQueue queue = context.getMaxFlopsDevice().createCommandQueue();

        // asynchronous write to GPU device,
        // blocking read later to get the computed results back.
        long time = nanoTime();
        queue.putWriteBuffer(clBufferA, false)
             .putWriteBuffer(clBufferB, false)
             .put1DRangeKernel(kernel, 0, globalWorkSize, localWorkSize)
             .putReadBuffer(clBufferC, true);
        time = nanoTime() - time;

        // cleanup all resources associated with this context.
        context.release();

        // print first few elements of the resulting buffer to the console.
        out.println(&quot;a+b=c results snapshot: &quot;);
        for(int i = 0; i &amp;lt; 10; i++)
            out.print(clBufferC.getBuffer().get() + &quot;, &quot;);
        out.println(&quot;...; &quot; + clBufferC.getBuffer().remaining() + &quot; more&quot;);

        out.println(&quot;computation took: &quot;+(time/1000000)+&quot;ms&quot;);

    }

    private static final void fillBuffer(FloatBuffer buffer, int seed) {
        Random rnd = new Random(seed);
        while(buffer.remaining() != 0)
            buffer.put(rnd.nextFloat()*100);
        buffer.rewind();
    }

    private static final int roundUp(int groupSize, int globalSize) {
        int r = globalSize % groupSize;
        if (r == 0) {
            return globalSize;
        } else {
            return globalSize + groupSize - r;
        }
    }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;VectorAdd.cl&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-opencl&quot;&gt;
    // OpenCL Kernel Function for element by element vector addition
    kernel void VectorAdd(global const float* a,
                          global const float* b,
                          global float* c, int numElements) {

        // get index into global data array
        int iGID = get_global_id(0);

        // bound check (equivalent to the limit on a &apos;for&apos; loop)
        if (iGID &amp;gt;= numElements)  {
            return;
        }

        // add the vector elements
        c[iGID] = a[iGID] + b[iGID];
    }
&lt;/code&gt;&lt;/pre&gt;
</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/new_getting_started_with_jogl</id>
        <title type="html">New Getting Started with JOGL 2 tutorials</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/new_getting_started_with_jogl"/>
        <published>2010-09-04T00:22:38+00:00</published>
        <updated>2010-09-04T00:22:38+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
Thanks to &lt;a href=&quot;https://sites.google.com/site/justinscsstuff/Home&quot;&gt;Justin Stoecker&lt;/a&gt;, computer science graduate student at the University of Miami, JOGL gets a new set of getting started tutorials:
&lt;/p&gt;
&lt;i&gt;
&lt;p&gt;
JOGL, or Java Bindings for OpenGL, allows Java programs to access the OpenGL API for graphics programming. The graphics code in JOGL programs will look almost identical to that found in C or C++ OpenGL programs, as the API is automatically generated from C header files. This is one of the greatest strengths of JOGL, as it is quite easy to port OpenGL programs written in C or C++ to JOGL; learning JOGL is essentially learning OpenGL[...]
&lt;/p&gt;
&lt;/i&gt;
&lt;h3&gt;Tutorials:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/justinscsstuff/jogl-tutorials&quot;&gt;index&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/justinscsstuff/jogl-tutorial-1&quot;&gt;Tutorial 1 - Environment Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/justinscsstuff/jogl-tutorial-2&quot;&gt;Tutorial 2 - Creating a Window&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/justinscsstuff/jogl-tutorial-3&quot;&gt;Tutorial 3 - Creating a Render Loop&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
Thanks Justin!&lt;br/&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/jogl_2_composeable_pipline</id>
        <title type="html">JOGL 2 - Composeable Pipline</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/jogl_2_composeable_pipline"/>
        <published>2010-08-25T15:27:31+00:00</published>
        <updated>2020-04-09T09:56:06+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">JOGL provides a feature called &apos;composeable pipeline&apos; which can be quite useful in some situations. It enables you to put additional delegating layers between your java application and the OpenGL driver.

A few usecases could be:
&lt;ul&gt;
&lt;li&gt;performance metrics&lt;/li&gt;
&lt;li&gt;logging, debugging or diagnostics&lt;/li&gt;
&lt;li&gt;to ignore specific function calls&lt;/li&gt;
&lt;/ul&gt;

It is very easy to set up. Just put this line into your code and the DebugGL layer will throw a GLException as soon an error occurs (you want this usually when you are developing the software).

&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
    public void init(GLAutoDrawable drawable) {
        // wrap composeable pipeline in a Debug utility, all OpenGL error codes are automatically
        // converted to GLExceptions as soon as they appear
        drawable.setGL(new DebugGL3(drawable.getGL().getGL3()));
        //..
    }
&lt;/code&gt;&lt;/pre&gt;

Another predefined layer is TraceGL which intercepts all OpenGL calls and prints them to an output stream.
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
        drawable.setGL(new TraceGL3(drawable.getGL().getGL3(), System.out));
&lt;/code&gt;&lt;/pre&gt;
see also &lt;a href=&quot;//mbien.dev/blog/entry/jogl_2_opengl_profiles_explained&quot;&gt;GL Profiles&lt;/a&gt;
&lt;br/&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/you_have_won_the_jackpot</id>
        <title type="html">You have won the Jackpot (3.0)</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/you_have_won_the_jackpot"/>
        <published>2010-06-03T23:16:27+00:00</published>
        <updated>2021-10-09T14:11:29+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="jackpot" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="tools" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
You might remember the project called &lt;b&gt;Jackpot&lt;/b&gt; which came out of SunLabs and had &lt;a href=&quot;http://nighthacks.com/roller/jag/&quot;&gt;James Gosling&lt;/a&gt; involved with. It was basically a way to declaratively define refactoring rules, allowing for example, to migrate client code between incompatible third party libraries. The project has been integrated into NetBeans as the IDE&apos;s refactoring engine since then. NetBeans 6.9 uses Jackpot for most of the in-code hints and code inspections for instance.
&lt;/p&gt;

&lt;p&gt;
There were various ways to specify the transformation rules, e.g. via a special &lt;a href=&quot;http://bitbucket.org/jlahoda/jackpot30/wiki/RulesLanguage&quot;&gt;declarative language&lt;/a&gt; or even in &lt;a href=&quot;https://lang.dev.java.net/&quot;&gt;Annotations&lt;/a&gt; directly in the library-code which would cause incompatibilities (or e.g in conjunction with @Deprecated).
&lt;/p&gt;
&lt;p&gt;
Jan Lahoda recently started with the efforts to make the project usable as standalone tool again. Jackpot 3.0 is available via 
&lt;a href=&quot;http://bitbucket.org/jlahoda/jackpot30/wiki/Home&quot;&gt;bitbucket&lt;/a&gt; for early adopters.
&lt;/p&gt;

&lt;h3&gt;Back to the Future&lt;/h3&gt;
&lt;p&gt;
I used this opportunity to test jackpotc (the jackpot compiler) with &lt;a href=&quot;http://jogamp.org&quot;&gt;JOGL&lt;/a&gt;. What I tired is to provide transformations which transform old JOGL 1.1.1 code into latest JOGL 2 compatible client code. So firstly thanks to Jan for fixing all the bugs we ran into while testing the experimental command line compiler.
&lt;/p&gt;

&lt;p&gt;
The first thing I did was to transform the code to properly use OpenGL &lt;a href=&quot;//mbien.dev/blog/entry/jogl_2_opengl_profiles_explained&quot;&gt;profiles&lt;/a&gt;. As testcode i will use the famous Gears OpenGL demo as example (but those kind of automatic transformations will only pay of if you use them on large codebases). Since it was written against JOGL 1.1.1 it can only use OpenGL up to version 2.x, which means we can simply use the GL2 profile.
&lt;/p&gt;

&lt;h3&gt;Transformation Rules&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
&apos;JOGL2 API change: javax.media.opengl.GL -&gt; javax.media.opengl.GL2&apos;:
javax.media.opengl.GL=&gt;javax.media.opengl.GL2;;

&apos;JOGL2 API change: new javax.media.opengl.GLCapabilities(javax.media.opengl.GLProfile)&apos;:
new javax.media.opengl.GLCapabilities()=&gt;
new javax.media.opengl.GLCapabilities(javax.media.opengl.GLProfile.get(javax.media.opengl.GLProfile.GL2));;

&apos;JOGL2 API change: GL gl = drawable.getGL() -&gt; GL2 gl = drawable.getGL().getGL2()&apos;:
$d.getGL() :: $d instanceof javax.media.opengl.GLAutoDrawable=&gt;
$d.getGL().getGL2();; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Just by looking at the transformation rules you can easily see that it is far more powerful than any simple text replacement could be. Jackpot uses javac and can therefore work with full qualified names, &lt;i&gt;instanceof&lt;/i&gt; and more. It will also correctly fix imports for you (there is currently a open bug in this area). The quotes are used as description string which will be printed when jackpotc runs on every code occurrence which applies to that rule.
&lt;/p&gt;

&lt;h3&gt;Invoking Jackpot&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;
jackpotc -sourcepath $SRC -cp $LIBS -d $OUTPUT\
         -Ajackpot30_extra_hints=./jogl1Tojogl2.hint $FILESET
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;b&gt;$LIBS&lt;/b&gt; must contain both library versions, JOGL 1.1.1 and JOGL 2. This is not optimal but it will probably work in most situations to just use both without thinking about an particular ordering or the need to do multiple iterations.
&lt;/p&gt;

&lt;h3&gt;Results&lt;/h3&gt;
If everything runs fine the console output should look like the sample below for each transformation which applies for the given &lt;b&gt;$FILESET&lt;/b&gt;:
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
./test/oldgears/src/jogl111/gears/Gears.java:54: warning: JOGL2 API change: GL gl = drawable.getGL() -&gt; GL2 gl = drawable.getGL().getGL2()
    GL gl = drawable.getGL();
...
&lt;/code&gt;&lt;/pre&gt;
The final result is a diff patch located in &lt;b&gt;$OUTPUT/META_INF/upgrade&lt;/b&gt; called &lt;b&gt;upgrade.diff&lt;/b&gt; containing the complete changeset for the transformation. Now the only thing you have to do is to review the changes and apply them.
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
@@ -51,7 +51,7 @@
     // Use debug pipeline
     // drawable.setGL(new DebugGL(drawable.getGL()));
 
-    GL gl = drawable.getGL();
+    GL2 gl = drawable.getGL().getGL2();
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
You can find the complete demo and all ready-to-run shellscripts in the tools/jackpotc folder inside JOGL&apos;s git &lt;a href=&quot;http://github.com/mbien/jogl&quot;&gt;repository&lt;/a&gt;. The classic JOGL 2 Gears demo can be found in form of an applet &lt;a href=&quot;http://jogamp.org/jogl-demos/www/applettest-jnlp.html&quot;&gt;here&lt;/a&gt; (uses latest hudson builds... can be unstable).
&lt;/p&gt;
&lt;p&gt;
happy coding!
&lt;/p&gt;
&lt;br/&gt;
- - - -&lt;br/&gt;
The JOGL repositories are open for contributions. If you would like to add some rules or fix other things... feel free to fork the repos on github and commit to them. (same rule applies for all &lt;a href=&quot;http://jogamp.org/&quot;&gt;JogAmp&lt;/a&gt; Projects like JOCL, JOAL, GlueGen... etc)
&lt;br/&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/jogamp_at_siggraph_2010</id>
        <title type="html">JogAmp at SIGGRAPH 2010</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/jogamp_at_siggraph_2010"/>
        <published>2010-05-23T21:17:07+00:00</published>
        <updated>2019-03-22T12:04:56+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="jocl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogamp" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opencl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;b&gt;The &lt;a href=&quot;http://jogamp.org/&quot;&gt;JogAmp&lt;/a&gt; team will be present at &lt;a href=&quot;http://www.siggraph.org/s2010&quot;&gt;SIGGRAPH&lt;/a&gt; this year:&lt;/b&gt;
&lt;pre&gt;
3D &amp; Multimedia Across Platforms and Devices Using JOGL
Tuesday, 27 July | 4:00 PM - 6:00 PM

This session discusses the features, contributions, and future of OpenGL, OpenCL, and OpenMax
across devices and OS exposed on top of Java using the JogAmp open-source libraries.
&lt;/pre&gt;
&lt;a href=&quot;http://www.siggraph.org/s2010/for_attendees/birds_feather&quot;&gt;link to Session&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;

hope to meet you there.&lt;br/&gt;&lt;br/&gt;

&lt;b&gt;about &lt;a href=&quot;http://jogamp.org/&quot;&gt;JogAmp&lt;/a&gt;.&lt;/b&gt;&lt;br/&gt;
&lt;i&gt;JogAmp is the home of high performance Java libraries for 3D Graphics, Multimedia and Processing.
JogAmp consists currently of the projects JOGL, JOCL and JOAL which provide cross platform language bindings to the OpenGL, OpenCL, OpenAL and OpenMAX APIs.&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;

&lt;iframe width=&quot;620&quot; height=&quot;348&quot; src=&quot;https://www.youtube-nocookie.com/embed/hTNfGZTnp3c&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;br/&gt;
- - - -
&lt;br/&gt;
(yes i know i should start bogging again :))&lt;br/&gt;&lt;br/&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/jogl_2_opengl_profiles_explained</id>
        <title type="html">JOGL 2 - OpenGL Profiles explained</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/jogl_2_opengl_profiles_explained"/>
        <published>2009-08-22T20:20:41+00:00</published>
        <updated>2020-04-09T10:04:01+00:00</updated> 
        <category term="3D Graphics" label="3D Graphics" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
&lt;b&gt;June 16 2010, updated blogpost: OpenGL 4&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
JOGL 2 supports several OpenGL Profiles. In this blog entry I try to explain what profiles are and why they are needed.&lt;/p&gt;&lt;h3&gt;History&lt;/h3&gt;&lt;p&gt;SGI released the first OpenGL specification 1992. Since this point OpenGL 1.x constantly evolved (under the ARB and later Khronos Group) by adding new functions to the core API. This went well until programmable graphics hardware became mainstream and shaders became suddenly more flexible and efficient as the generic fixed function pipeline.&lt;/p&gt;&lt;p&gt; OpenGL 2.x was the last version in which you could freely mix the fixed function pipeline with the programmable pipeline (as a core feature).&lt;/p&gt;

&lt;a href=&quot;https://www.khronos.org/news/press/khronos-releases-opengl-3.2-third-major-opengl-release-within-twelve-months&quot;&gt;
&lt;img src=&quot;https://www.opengl.org/img/uploads/news/OpenGL-3-evolution_sml.jpg&quot; class=&quot;left&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;
&lt;p&gt;
With the release of OpenGL 3.0 the whole fixed function pipeline has been deprecated but you could still use it if you haven&apos;t requested a forward compatible context.&lt;/p&gt;&lt;p&gt; OpenGL 3.1 and 3.2 removed most deprecated functionality from core specification, however some implementations (e.g. Nvidia drivers) still allow to get them back via an optional compatibility extension. Since 3.1 was the first release which broke compatibility, it is often seen as major OpenGL 3 release. &lt;br /&gt;&lt;/p&gt;
&lt;h3&gt;JOGL 2 (JSR 231)&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;JOGL 1.1.1 lived in the timeframe up to OpenGL 3.0 which made it easy to stay in sync with the spec. To be able to solve the issue with the deprecation of functionality, JOGL 2 (JSR maintenance release) introduces an abstraction of the original OpenGL versioning called Profile. Profiles allow Java applications to be written in a way which allows compatibility with multiple OpenGL versions at the same time. Since OpenGL ES (GL for embedded systems) has overlapping functionality with OpenGL itself it opened the opportunity to add even Profiles which bridge desktop and embedded implementations. The class diagram below shows the dependencies between
&lt;a href=&quot;http://jogamp.org/jogl/doc/bouml/html-svg/&quot;&gt;all available Profiles&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;embed src=&quot;http://jogamp.org/jogl/doc/bouml/html-svg/fig128069.svg&quot; width=&quot;735&quot; height=&quot;600&quot;/&gt;
&lt;/p&gt;
&lt;p&gt;
Before you start writing a JOGL application you will have to decide first which GLProfile you want to use. The code snippet below lists all currently supported profiles (extracted from &lt;a href=&quot;http://jogamp.org/deployment/jogl-next/javadoc_public/javax/media/opengl/GLProfile.html&quot;&gt;GLProfile&lt;/a&gt;).
&lt;/p&gt;
&lt;br/&gt;
&lt;h3&gt;Current list of supported profiles and their mapping to the implementation versions&lt;/h3&gt;

&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
    /** The desktop OpenGL compatibility profile 4.x, with x &gt;= 0, ie GL2 plus GL4.&lt;br&gt;
        &lt;code&gt;bc&lt;/code&gt; stands for backward compatibility. */
    public static final String GL4bc = &quot;GL4bc&quot;;

    /** The desktop OpenGL core profile 4.x, with x &gt;= 0 */
    public static final String GL4   = &quot;GL4&quot;;

    /** The desktop OpenGL compatibility profile 3.x, with x &gt;= 1, ie GL2 plus GL3.&lt;br&gt;
        &lt;code&gt;bc&lt;/code&gt; stands for backward compatibility. */
    public static final String GL3bc = &quot;GL3bc&quot;;

    /** The desktop OpenGL core profile 3.x, with x &gt;= 1 */
    public static final String GL3   = &quot;GL3&quot;;

    /** The desktop OpenGL profile 1.x up to 3.0 */
    public static final String GL2   = &quot;GL2&quot;;

    /** The embedded OpenGL profile ES 1.x, with x &gt;= 0 */
    public static final String GLES1 = &quot;GLES1&quot;;

    /** The embedded OpenGL profile ES 2.x, with x &gt;= 0 */
    public static final String GLES2 = &quot;GLES2&quot;;

    /** The intersection of the desktop GL2 and embedded ES1 profile */
    public static final String GL2ES1 = &quot;GL2ES1&quot;;

    /** The intersection of the desktop GL3, GL2 and embedded ES2 profile */
    public static final String GL2ES2 = &quot;GL2ES2&quot;;

    /** The intersection of the desktop GL3 and GL2 profile */
    public static final String GL2GL3 = &quot;GL2GL3&quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;i&gt;Note: GL2 Profile supports OpenGL up to version 3.0 (included) - this is not a bug: OpenGL 3.1 was the big game changer&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
The next two code snippets show the basic steps how to set up OpenGL with JOGL 2.
&lt;/p&gt;
&lt;h3&gt;Context creation&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
        //create a profile, in this case OpenGL 3.1 or later
        GLProfile profile = GLProfile.get(GLProfile.GL3);
        
        //configure context
        GLCapabilities capabilities = new GLCapabilities(profile);
        capabilities.setNumSamples(2); // enable anti aliasing - just as a example
        capabilities.setSampleBuffers(true);
        
        //initialize a GLDrawable of your choice
        GLCanvas canvas = new GLCanvas(capabilities);

        //register GLEventListener
        canvas.addGLEventListener(...);
        //... (start rendering thread -&gt; start rendering...)
&lt;/code&gt;&lt;/pre&gt;
&lt;br/&gt;
&lt;h3&gt;Rendering&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;
    public void display(GLAutoDrawable drawable) {
        GL3 gl = drawable.getGL().getGL3();
        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
        //.. render something
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;
Profiles make JOGL 2 very flexible and allow it to build modular and portable applications. For instance part A of an application can be written against the GL2ES2 interface and part B (which is more hardware specific) against the GL3 interface. This would in theory allow to reuse A in an embedded application and B could e.g. disable itself on old desktop hardware which runs only OpenGL 2.x or fall back to a GL2 implementation.
&lt;/p&gt;
&lt;p&gt;
More information can be found on &lt;a href=&quot;http://jogamp.org&quot;&gt;JogAmp.org&lt;/a&gt; (&lt;a href=&quot;http://jogamp.org/deployment/jogl-next/javadoc_public/&quot;&gt;direct link to javadoc&lt;/a&gt;)
&lt;/p&gt;
&lt;p&gt;
The next release of the &lt;a href=&quot;http://kenai.com/projects/netbeans-opengl-pack&quot;&gt;OpenGL Pack&lt;/a&gt; for NetBeans will fully support JOGL 2. Beta builds can be found &lt;a href=&quot;http://projectkenai.com/projects/netbeans-opengl-pack/downloads/directory/early-access&quot;&gt;here&lt;/a&gt; (builds contain JOGL2 beta5):
&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/netbeans_opengl_pack_0_51</id>
        <title type="html">NetBeans OpenGL Pack 0.5.5 released</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/netbeans_opengl_pack_0_51"/>
        <published>2009-06-29T18:58:43+00:00</published>
        <updated>2019-04-07T09:18:13+00:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;a href=&quot;http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260&quot;&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;10&quot; border=&quot;0&quot; align=&quot;left&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/NetBeansOpenGLPackLogo.png&quot; alt=&quot;NetBeans OpenGL Pack logo&quot; /&gt;&lt;/a&gt;
The NetBeans 6.7 compatible OpenGL Pack has been updated to version 0.5.5 and is now available on the &lt;a href=&quot;http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260&quot;&gt;plugin portal&lt;/a&gt; also. The current release is feature compatible with 0.5.4 (&lt;a href=&quot;//mbien.dev/blog/entry/gl_pack_0_5_4&quot;&gt;release notes&lt;/a&gt;) only JOGL and project webstart extensions have been updated to JOGL 1.1.1a security update.</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/gl_pack_0_5_4</id>
        <title type="html">OpenGL Pack 0.5.4 now ready for NetBeans 6.7</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/gl_pack_0_5_4"/>
        <published>2009-06-14T20:38:23+00:00</published>
        <updated>2020-04-09T10:09:37+00:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;&lt;a href=&quot;http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260&quot;&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;10&quot; border=&quot;0&quot; align=&quot;left&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/NetBeansOpenGLPackLogo.png&quot; alt=&quot;NetBeans OpenGL Pack logo&quot; /&gt;&lt;/a&gt;NetBeans OpenGL Pack 0.5.4 is now ready to be used in the upcoming NetBeans 6.7 release, currently as rc2 available.&lt;/p&gt;
&lt;p&gt;It wasn&apos;t sure if we would be able to ship the GLSL editor in this release since NetBeans 6.7 changed the editor APIs once again. But fortunately the P1 bug was &lt;a href=&quot;http://www.netbeans.org/issues/show_bug.cgi?id=161517&quot;&gt;fixed in time&lt;/a&gt; and we (and apparently many others, thanks for voting!) can keep using the Generic Language Framework (GLF aka Schlieman) - at least for now since GLF it is now a deprecated/unsupported module.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Build 0.5.4 will break compatibility with NB 6.5. The latest and also all other releases can be downloaded on the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/servlets/ProjectDocumentList?folderID=11496&amp;expandFolder=11496&amp;folderID=8522&quot;&gt;project page&lt;/a&gt;. I will wait with the upload to the plugin portal until NetBeans 6.7 final is released.&lt;/p&gt;
&lt;h4&gt;Features/Enhancements:&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;Anyway. Not much changed since the &lt;a href=&quot;//mbien.dev/blog/entry/netbeans_opengl_pack_2_in&quot;&gt;last release&lt;/a&gt;. The most important point is probably that the GLWorker used internally for tasks like shader compilation or capabilities viewer is now more stable on systems which do software rendering (e.g Mesa GL).&lt;/p&gt;&lt;p&gt;I added also an experimental feature which lets you define GLSL shader dependencies similar to java imports.&lt;/p&gt;&lt;p&gt;It is very common in GLSL to reuse code by simple concatenation of files. For example a set of independent shaders can reuse a code fragment defining some generic mathematical functions if the fragment has been concatenated to the top of all shaders which make use of the functions. Editing those kind of shaders would produce compilation errors without a way to inform the editor about those dependencies.
&lt;/p&gt;&lt;p&gt;For example the following shader uses the function &lt;em&gt;light()&lt;/em&gt; of &lt;em&gt;PerPixelLight.frag&lt;/em&gt; by inserting the file &lt;em&gt;./PerPixelLight.frag&lt;/em&gt; at the position of the &lt;em&gt;//import&lt;/em&gt; statement.&lt;br /&gt;&lt;/p&gt;

&lt;h4&gt;PerPixelLight.frag&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-glsl&quot;&gt;
vec4 light(void) {
    // insert fancy light calculation here
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;PlanetShader.frag&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-glsl&quot;&gt;
//import PerPixelLight.frag

uniform samplerCube cubemap;
varying vec3 vertex;

void main (void) {
    //Cubemap
    gl_FragColor = vec4(textureCube(cubemap, vertex)) * light();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When you compile a shader with dependencies you should see something like that in the output window:&lt;br /&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; align=&quot;baseline&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/dependencyOutput.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;All dependencies are listed in the compiler log and even the line numbers of the compiler warnings are translated back to the code fragments, which lets you jump via hyperlink directly to the annotated files. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Just a warning: Please don&apos;t define cyclic dependencies, however double imports should work in theory (have I mentioned it is experimental? ;))&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Happy coding!&lt;br /&gt;&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/netbeans_opengl_pack_2_in</id>
        <title type="html">NetBeans OpenGL Pack #2 in most popular plugins ranking</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/netbeans_opengl_pack_2_in"/>
        <published>2009-05-19T20:50:12+00:00</published>
        <updated>2019-04-07T09:27:45+00:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;&lt;a href=&quot;http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260&quot;&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;10&quot; border=&quot;0&quot; align=&quot;left&quot; alt=&quot;NetBeans OpenGL Pack logo&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/NetBeansOpenGLPackLogo.png&quot; /&gt;&lt;/a&gt;Since I haven&apos;t bloged for a long time about the OpenGL Pack, here are some notes for the last two update releases.&lt;/p&gt;&lt;p&gt;Beside updates and fixes the only new feature I added is the OpenGL Quicksearch. It uses the NetBeans 6.5 Quicksearch functionality (similar to ctrl + 3 in eclipse) and searches through several OpenGL resources.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;currently are five resources available for search:&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://opengl.org/sdk/docs/man/&quot;&gt;OpenGL SDK&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.opengl.org/registry/&quot;&gt;OpenGL SDK Extension Registry&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://developer.nvidia.com/object/nvidia_opengl_specs.html&quot;&gt;Nvidia Extensions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://ati.amd.com/developer/sdk/radeonSDK/html/info/Prog3D.html&quot;&gt;ATI/AMD Extensions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JOGL sources (only when JOGL module installed and used in at least one opened project)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;power users can restrict the search to a category with the following prefixes ([prefix&amp;nbsp; space] searchstring&amp;nbsp; (space searchstring)*):&lt;br /&gt;&lt;strong&gt;gl&lt;/strong&gt; for GL SDK, &lt;strong&gt;ext&lt;/strong&gt; for GL extensions, &lt;strong&gt;nv&lt;/strong&gt; for Nvidia extensions, &lt;strong&gt;ati&lt;/strong&gt; for ATI/AMD Extensions.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
    &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/resources/JOGL_FormDesigner_Integration2.png&quot;&gt;
        &lt;img width=&quot;319&quot; height=&quot;200&quot; alt=&quot;JOGL component in NetBeans Formdesigner&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/JOGL_FormDesigner_Integration2_small.png&quot; /&gt;
    &lt;/a&gt;
    &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/resources/OpenGL_QuickSearch.png&quot;&gt;
        &lt;img width=&quot;106&quot; height=&quot;200&quot; alt=&quot;OpenGL quicksearch&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/OpenGL_QuickSearch_small.png&quot; /&gt;
    &lt;/a&gt;
    &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/resources/compilerErrorAnnotations.PNG&quot;&gt;
        &lt;img width=&quot;274&quot; height=&quot;200&quot; alt=&quot;GLSL editor&quot; src=&quot;https://netbeans-opengl-pack.dev.java.net/resources/compilerErrorAnnotations_small.png&quot; /&gt;
    &lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Pictures featuring: Form Designer sample project, GL Quicksearch, updated GLSL 1.3 editor&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Changes in 0.5.3: &lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Java Applet and Webstart support&lt;/li&gt;&lt;li&gt;OpenGL Quicksearch&lt;/li&gt;&lt;li&gt;GLSL editor updated to support GLSL 1.3 (OpenGL 3.0 spec)&lt;/li&gt;&lt;li&gt;two new NetBeans Form Designer sample JOGL projects&lt;/li&gt;&lt;li&gt;NetBeans 6.5 and JDK6 are the new minimum requirements&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Changes in 0.5.2 since &lt;a href=&quot;//mbien.dev/blog/entry/netbeans_opengl_pack_0_5&quot;&gt;last release&lt;/a&gt;:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;JOGL distribution has been updated to version 1.1.1&lt;/li&gt;&lt;li&gt;GLSL linker now does not stop linking shaders on compiler warnings&lt;/li&gt;&lt;li&gt;the pack should now correctly deploy JOGL and GlueGen&apos;s native libraries on all supported platforms (64bit bug)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To download the pack, please visit the &lt;a href=&quot;http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260&quot;&gt;plugin portal&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;As always, please use the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/servlets/ProjectMailingListList&quot;&gt;user mailing list&lt;/a&gt; for feedback and the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/servlets/ProjectIssues&quot;&gt;issue tracker&lt;/a&gt; for bug reports on the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/&quot;&gt;project page&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;- - - - -&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BTW the pack recenty reached the &lt;strong&gt;36k downloads&lt;/strong&gt; milestone which makes it to the #2 in the most popular plugins category of the plugin portal ;) &lt;/p&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/netbeans_opengl_pack_0_5</id>
        <title type="html">NetBeans OpenGL Pack 0.5.1 released</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/netbeans_opengl_pack_0_5"/>
        <published>2008-04-12T15:31:45+00:00</published>
        <updated>2020-01-31T02:10:57+00:00</updated> 
        <category term="NetBeans" label="NetBeans" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="netbeans" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;The NetBeans OpenGL Pack 0.5.1 has been released. This is a small bugfix release with no major features added.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Changes since &lt;a href=&quot;//mbien.dev/blog/entry/netbeans_opengl_pack_is_growing&quot;&gt;last release&lt;/a&gt;:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;updated JOGL distribution to v1.1.1rc8&lt;/li&gt;&lt;li&gt; updated JOGL demos (added gears Applet demo)&lt;/li&gt;&lt;li&gt;added JOGL API support module for doc and source integration&lt;br /&gt;&lt;/li&gt;&lt;li&gt; webstart support for JOGL project templates (just enable it in the project properties)&lt;/li&gt;&lt;li&gt;improved JOGL deployment code (fixed some issues on 64bit systems)&lt;/li&gt;&lt;li&gt;bug fixes&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To download the pack please visit the &lt;a href=&quot;http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260&quot;&gt;plugin portal page&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;The OpenGL pack will be soon available via plugin portal update center (Tools | Plugins). This will make our old&amp;nbsp; &amp;quot;NetBeans OpenGL Pack update center&amp;quot; obsolete (and improve the download speed!). However, we will use the old update center for experimental not final releases in future. &lt;/p&gt;&lt;p&gt;As always, please use the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/servlets/ProjectMailingListList&quot;&gt;user mailing list&lt;/a&gt; for feedback and the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/servlets/ProjectIssues&quot;&gt;issue tracker&lt;/a&gt; for bug reports on the &lt;a href=&quot;https://netbeans-opengl-pack.dev.java.net/&quot;&gt;project page&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-------&lt;/p&gt;&lt;p&gt;Write once run everywhere [&lt;a href=&quot;http://blogs.sun.com/jonasdias/entry/developing_opengl_with_netbeans_6&quot;&gt;1&lt;/a&gt;][&lt;a href=&quot;http://journal.mycom.co.jp/column/jsr/046/index.html&quot;&gt;2&lt;/a&gt;][&lt;a href=&quot;http://www.java2.pl/index.php/java/jogl-instalacja-w-netbeans/&quot;&gt;3&lt;/a&gt;][&lt;a href=&quot;http://d.hatena.ne.jp/shin/20080407/p1&quot;&gt;4&lt;/a&gt;][&lt;a href=&quot;http://blogs.sun.com/thaniwa/entry/ja_netbeans_openglpack&quot;&gt;5&lt;/a&gt;][&lt;a href=&quot;http://blog.csdn.net/bigbear73/archive/2007/11/28/1905214.aspx&quot;&gt;6&lt;/a&gt;] - seems like the platform agnostic JOGL deployment is working ;)&lt;br /&gt;&lt;/p&gt;</content>
    </entry>
    <entry>
        <id>https://mbien.dev/blog/entry/pictures_of_my_old_3d</id>
        <title type="html">Pictures of my old 3D Engine in Java</title>
        <author><name>mbien</name></author>
        <link rel="alternate" type="text/html" href="https://mbien.dev/blog/entry/pictures_of_my_old_3d"/>
        <published>2007-12-30T18:35:36+00:00</published>
        <updated>2021-08-18T00:06:31+00:00</updated> 
        <category term="Java" label="Java" />
        <category term="java" scheme="http://roller.apache.org/ns/tags/" />
        <category term="jogl" scheme="http://roller.apache.org/ns/tags/" />
        <category term="opengl" scheme="http://roller.apache.org/ns/tags/" />
        <content type="html">&lt;p&gt;
Here are some screenshots of my 3D Engine (codename Metaverse) I made a few years ago (click to enlarge). It is written in Java and uses &lt;a target=&quot;_blank&quot; href=&quot;https://jogl.dev.java.net/&quot;&gt;JOGL&lt;/a&gt; (JSR 231) as OpenGL binding and &lt;a target=&quot;_blank&quot; href=&quot;https://jinput.dev.java.net/&quot;&gt;JInput&lt;/a&gt; to access the controllers.&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a target=&quot;_blank&quot; href=&quot;https://lh6.googleusercontent.com/-UeVg9q9Z8nU/TiMz8zH3tAI/AAAAAAAAADw/OpkpwgahXkY/s1024/surface.png&quot;&gt;
&lt;img  width=&quot;350&quot; height=&quot;257&quot; src=&quot;https://lh5.googleusercontent.com/-N7WxfOJsiak/TiMz9NJViKI/AAAAAAAAADs/X50Dqh-uAeE/surface_small.png&quot; /&gt;
&lt;/a&gt;
&lt;a target=&quot;_blank&quot; href=&quot;https://lh4.googleusercontent.com/-N_Kp2XnZ8H8/TiMz73UlQ0I/AAAAAAAAADk/ikdesKGDNC0/s912/planet.png&quot;&gt;
&lt;img  width=&quot;350&quot; height=&quot;257&quot; src=&quot;https://lh6.googleusercontent.com/-UktG64eFxwc/TiMz75tfshI/AAAAAAAAADc/EqWjD6ZkJ0s/planet_small.png&quot; /&gt;
&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;These shots show the real time lighting and water rendering capabilities. They also show that you are the whole time on a real 3D planet (codename potato ;) ).&lt;/p&gt;
&lt;p&gt;
&lt;a target=&quot;_blank&quot; href=&quot;https://lh5.googleusercontent.com/-WSnfu6cMm2c/TiMz9agMsRI/AAAAAAAAAD0/eXtkiajR1Vo/s912/vehicleTest1.png&quot;&gt;
&lt;img width=&quot;350&quot; height=&quot;257&quot; src=&quot;https://lh6.googleusercontent.com/--qUwd5OeDKg/TiMz9mQcuaI/AAAAAAAAAD8/Wf4Qzdgxmlg/vehicleTest1_small.png&quot; /&gt;
&lt;/a&gt;

&lt;a target=&quot;_blank&quot; href=&quot;https://lh3.googleusercontent.com/-XuJ2xM5Btvk/TiMz7DpHP3I/AAAAAAAAADg/l2oNygZ78Zg/s912/globe_wire.png&quot;&gt;
&lt;img  width=&quot;350&quot; height=&quot;257&quot; src=&quot;https://lh6.googleusercontent.com/-ygWch0GTKz0/TiMz6GdSilI/AAAAAAAAADQ/EQmLychvBcA/globe_wire_small.png&quot; /&gt;
&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The next shows a &apos;test vehicle&apos; to test model loading, animation, physics and collision detection of the Engine. You can use this vehicle to explore the planet - it makes even a lot of fun to drive through rough terrain and try to survive jumps from steep hills ;). The other screenshot shows the planet as wireframe.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a target=&quot;_blank&quot; href=&quot;https://lh3.googleusercontent.com/-nnizJlaVkcQ/TiMz9QNKwWI/AAAAAAAAAD4/AE-PzpESodU/s1152/river2.png&quot;&gt;
&lt;img  width=&quot;350&quot; height=&quot;257&quot; src=&quot;https://lh5.googleusercontent.com/-C5kMy8_Bu18/TiMz8prrxRI/AAAAAAAAADo/5hLwrmNQhNU/river2_small.png&quot; /&gt;
&lt;/a&gt;

&lt;a target=&quot;_blank&quot; href=&quot;https://lh6.googleusercontent.com/-xqBVl3rQSWI/TiMz7A66q0I/AAAAAAAAADY/GjnYt50b1XI/s1152/impact2.png&quot;&gt;
&lt;img  width=&quot;350&quot; height=&quot;257&quot; src=&quot;https://lh5.googleusercontent.com/-j5X2Gx9HjSE/TiMz7QYskvI/AAAAAAAAADU/3eslEsUyrWs/impact2_small.png&quot; /&gt;
&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
The last two show the continuous triangulation of the terrain mesh and the space subdivision into a quad-tree (used for fast frustum culling and physics). The viewer is configured to be located inside the river bed.&lt;/p&gt;

&lt;p&gt;You think that Java for 3D Graphics is like a penguin in hell? If you follow some rules to prevent stop the world garbage collections (full GCs) and prevent calls through the JNI where possible you can reach with the server (hotspot compiler) JVM performance comparable to C++ code.&lt;br /&gt; &lt;/p&gt;

&lt;p&gt;The rendering performance is quite good. Even fast fly overs are rendered with 60+ fps. If the camera stays still the renderer reaches 200+ fps on my notebook (ATI X1600).
&lt;/p&gt;

&lt;p&gt;
I have currently no time to continue with this project but if I think back how fun it was to work on that engine I would love to start hacking again immediately ;).
&lt;/p&gt;</content>
    </entry>
</feed>

