Small update to the Delphi/Pascal OpenGL Header

Due to some user feedback, I’ve updated our delphi/pascal OpenGL header translation.

You can get it over at the bitbucket repository, and now finally with a proper markdown readme ;)

The changes include fixed type declarations for boolean types (so you can now finally write glDepthMask(GL_FALSE)), and some fixes for exception handling on 64-bit windows platforms.

Javascript repository

Following Java (on Android) and C++ (on Windows), I just released my first Javascript sources over at my bitbucket repository. My first (ever) public JavaScript demo is the random dungeon generator that I wrote an article about (a long time ago).

It generates rarnddungeon06ndom dungeons of different sizes and can be tested directly in your browser over here.
Included are the JavaScript sources for the random dungeon generator that use HTML5 for drawing a simple representation of the randomly generated rooms and corridors.

My plan now is to add some more randomness, some game-related features and to write a WebGL-renderer, so you can walk the dungeons in your browser, with maybe a game to follow.

Delphi/Pascal OpenGL Header now supports OpenGL 4.5

With OpenGL 4.5 being released (and NVidia already having drivers out in the wild) I’ve updated our Delphi/Pascal OpenGL Header translation to the latest OpenGL version.

You can always grab the most recent header translation from the bitbucket repository, where you’ll also find updates aside from the major OpenGL releases.

If you’re missing anything from the headers, like a vendor specific extension missing, or want to give feedback just drop me a line. I’d also be interested in feedback from developers that own OpenGL 4.5 compatible hardware, as my ATI Radeon HD6850 doesn’t support OpenGL 4.5 (yet, at least I hope so ;) ).

And btw. : The OpenGL hardware database was mentioned (again) in the OpenGL BOF presentation at this years SIGGRAPH, so please keep contributing your OpenGL reports so all OpenGL devs out there can make good use of it.

Soruces for simple OpenGL 2.0 HUD/GUI for android

device-2014-07-18-210940As I’m currently prototyping a new game for Android, I was in need of a quick (and simple) way of adding some selectable text elements on top of my 3D OpenGL ES scene. So I created a simple demonstration with full source (you can get them from my OpenGL ES git repository) that renders a 3D scene and a basic hud with clickable text elements on top of it in orthogonal mode.

The text elements are rendered to an OpenGL ES texture, using android’s canvas, making this a very flexible way of drawing text on top of an OpenGL ES scene. Note that this isn’t very fast, so the texture should only be updated when necessary. The demo has a menu along with a fps counter, so the texture will be updated every second, and the elements can be clicked and the hud’s observers will be notified with the clicked element’s id so you can easily react on user input.

Though this isn’t something you’d use in a production app where performance is crucial, it should be good start for rapid prototyping needs where you need to have some basic gui or hud to issue commands. And you’re always free to improve the sources (feel free to fork) to make it perform better, by e.g. only updating the areas of the texture where text changed, instead of updating every time if one of the elements is changed.

Android OpenGL ES repository

device-2014-06-29-171344Following the C++ (OpenGL) repository, I recently added an Android OpenGL ES repositry (using Java) over here. It currently only contains two public demos, one for a simple stl viewer and another one for using the camera input of an android device as an OpenGL ES texture, but over time I plan on adding more and more demos.

And though I used to mock Java in the past I really like coding with Java nowadays. It’s partially because of the language itself (with all it’s modern features) but also because Eclipse is an awesome IDE. So expect more android demos and sources from me in the future.

Enhanced C++ compute shader particle system

I’ve just added an OpenGL C++ repository over at bitbucket, and the first C++ demo is an enhanced port of the attraction based compute shader system from my last post.


Sources :
Compiled win32 binaries :

Compared to the Delphi version, the C++ version uses point sprites (instead of smoothed GL_POINTS), has a random color fade and allows for several user inputs :

Note : This demo requires at least OpenGL 4.3!

  • r: reset particles at current cursor pos
  • p: Toggle pause
  • b: toggle viewport border for particle movement
  • c: toggle random color fade
  • +: increase speed
  • -: decrease speed
  • page up: increase particle count by 1024
  • page down: decrease particle count by 1024

Compute shaders for particle systems

Next on my list of new OpenGL functionality are compute shaders. They’ve been introduced into the GL core with 4.3, and pretty much allow you to do GPGPU directly in OpenGL without having to resolve to other APIs like OpenCL.

So my first compute shader demo implements a (simple) attraction based particle system. It generates two shader storage buffer objects (SSBOs). One for particle positions and one for particle velocities, and the compute shader then accesses these SSBOs to calculate particle velocities depending on an attraction point (in this demo it’s the mouse cursor) and accordingly updates the particle positions. So the whole particle system gets caclulated on the GPU, which should be a lot faster than doing it on a GPU.

Some screenshots, though they don’t do it any justice as the particle system is so dynamic and looks much better in motion :

You can grab the complete (Delphi) source from my bitbucket repository.


I’ve just been playing around with GL_ARB_debug_output, a new extension introduced with OpenGL 4.3. This extension adds debugging capabilities to OpenGL, e.g. allowing you to have a callback fired by the OpenGL implementation that’ll inform you upon errors or even (heavily depending on the IHV) gives performance hints.

I wrote a small sample (in Delphi) that demonstrates this new functionality. It creates an OpenGL 4.3 forward compatible context (no more legacy stuff) with debugging capabilites and displays debug messages from your OpenGL driver.

It’s a pretty neat feature, and something that OpenGL has been missing for a long time. So from now on, instead of having to poll via glError, you can have the driver inform you when something is not correct and (even better) tell you about your performance caveats.

You can grab the source from the gldebug folder in my GIT repository over at bitbucket. I plan on adding OpenGL demos (with source) for some of the newer OpenGL features to that repository from time to time.

Delphi/Pascal OpenGL Header updated and on bitbucket

I just updated our Delphi / Pascal OpenGL Header to include the two missing extensions GL_ARB_sparse_texture and GL_ARB_bindless_texture introduced alongside OpenGL 4.4.

And from now on you can always get the latest release from the repository over at github.

Since the latest drivers for my GPU sadly won’t support OpenGL 4.4 (AMD dropped driver support for Vista, so maybe it’s finally time to upgrade) I haven’t been able to test the two new extensions. So if you find any errors, please contact me and I’ll get them fixed.

OpenGL hardware database updated

I finally got around uploading an almost complete new version of the OpenGL Hardware Database. Besides the new visuals, to bring it in line with the design of the OpenGL ES Hardware Database, it offers new functionalty like search boxes on almost every page, new listings like max. supported OpenGL version per device and much more.

Another fine change allows you to call certain pages with parameters, so now you can create and share links for e.g. comparing two reports, or listing maximum supported OpenGL versions for all submitted GeForce graphics cards.

Next step will be an updated OpenGL Caps Viewer with additional caps and stuff like selecting wether you want to create a forward compatible context only.

On a sidenote : I’m on twitter now too.