I suppose you've missed the title OpenGL in "Java". You point to a nice website that teaches you how to use OpenGL in ... C++.
Anyway I doubt JOGL does not let you to use buffers, so you can draw in memory and after that draw on screen. Even the Red Book starts with drawing directly on the screen; the double buffer technique is useful for animations ...
It's the idea that counts, not the language. The number of OpenGL function calls balloons very quickly when using immediate mode.
For example, I recently prototyped a simple 16x16 tile demo over an 800x600 screen. In immediate mode, that's 1900 tiles on screen at once, and each one demanded 4 calls for tex coords (GL_QUADS) and 4 more for vertex data. That came to 15200 OpenGL calls every single frame, enough to stress my modest hardware. With vertex arrays, buffers or display lists, that could be brought down by orders of magnitude, probably with a dramatic performance boost.
Most people hardware is much better than mine, but my point is that OpenGL immediate mode doesn't scale well even for simple things.
C/C++ works only for desktop based apps, try to put a C++ app on a webpage.
WebGL yes, for HTML5 aware web browsers and if you want to have your source code open (maybe I'm wrong here, but I've understand that the code will be available just like any JavaScript code on the page source). Maybe in a few years.
12 comments
[ 2.9 ms ] story [ 33.9 ms ] threadAnyway I doubt JOGL does not let you to use buffers, so you can draw in memory and after that draw on screen. Even the Red Book starts with drawing directly on the screen; the double buffer technique is useful for animations ...
For example, I recently prototyped a simple 16x16 tile demo over an 800x600 screen. In immediate mode, that's 1900 tiles on screen at once, and each one demanded 4 calls for tex coords (GL_QUADS) and 4 more for vertex data. That came to 15200 OpenGL calls every single frame, enough to stress my modest hardware. With vertex arrays, buffers or display lists, that could be brought down by orders of magnitude, probably with a dramatic performance boost.
Most people hardware is much better than mine, but my point is that OpenGL immediate mode doesn't scale well even for simple things.
WebGL yes, for HTML5 aware web browsers and if you want to have your source code open (maybe I'm wrong here, but I've understand that the code will be available just like any JavaScript code on the page source). Maybe in a few years.
http://www.minecraft.net/