SPIR-V Extension for Visual Studio

vs2015

Source (C#) and download (VSIX for VS2015) can be found at https://github.com/SaschaWillems/SPIRV-VSExtension

With the launch of Vulkan, SPIR-V has been introduced as it’s binary shader format, replacing text based shader formats in favor of an intermediate representation. To make life a bit easier I have just released a Visual Studio (2015) extension that adds SPIR-V related commands to the context menu of shader files (and folders containing shader files):

contextmenufolder

This allows you got generate binary SPIR-V files from GLSL right out of your IDE. The commands use the glslang reference compiler for this and work on all file extensions supported by it.

The extension also parses errors generated if the shader does not compile and adds them to the error list of Visual Studio, so you can double click to jump to the file and line that the error occurred:

errorlist

The extension supports Vulkan and OpenGL semantics for generating the SPIR-V binary files, so if you happen to have a GPU and driver that supports SPIR-V for OpenGL you can generate binary shaders for OpenGL too. To get you started with SPIR-V for OpenGL I have released a simple C++ example that shows how to use SPIR-V with OpenGL.

As for Vulkan, SPIR-V is the only official (i.e. non-extension) source for loading shaders and is used in all of my C++ open source Vulkan examples.

SPIR-V Extension for Visual Studio

Status update

Just as the last blog post is starting to collect dust (time flies by oO) :

I’m still doing lots of 3D development during the late hours in my spare time, still with C++ (Visual Studio rocks 🙂 ), but most of that development is done under an NDA so that’s the main reason I haven’t been updating this blog lately.

Other than that I’ve also been working on a dungeon crawler prototype using modern C++ (C++11/14) and modern OpenGL (4.4). Not much to see yet, but the first screenshot shows the latest version with omni-directional shadow maps, randomly generated dungeons, normal mapping and 3D models (using ASSIMP). I’d also like to mention G-Truc‘s excellent glm and gli libraries that I’m both using in this (and other projects).
I’ve been playing around with randomly generated dungeons a few times in the past but never got much further than some simple tech demos, so this may never become a game but rather a playground, though it already looks pretty nice.

2015-07-07 22_46_38-Dungeon Crawler Prototype - (c) 2015 by Sascha Willems 2015-06-17 21_48_05-Dungeon Crawler Prototype - (c) 2015 by Sascha Willems 2015-06-12 23_29_57-Dungeon Crawler Prototype - (c) 2015 by Sascha Willems 2015-06-05 23_07_32-Dungeon Crawler Prototype - (c) 2015 by Sascha Willems

 

So right now there’s not much new stuff on OpenGL (ES) or WebGL, but you may check out my twitter account for screenshot and ramblings on my current 3D endeavors without me getting into details. Most of the stuff I post there is not worthy of a complete blog post, so for quick updates, twitter pretty much replaced my blog.

 

Status update

glCapsViewer 1.0 beta release

I just released version 1.0 (beta) of the OpenGL hardware capability viewer (C++ port using Qt). Note that it’s a beta release and my first C++ (and Qt) application released to the public.

Release on gitHub: https://github.com/SaschaWillems/glCapsViewer/releases/tag/v1.0-beta

Binary downloads (win32) :

https://github.com/SaschaWillems/glCapsViewer/releases/download/v1.0-beta/glcapsviewer_v1_0-beta_win32.7z

or

http://opengl.delphigl.de/releases/glcapsviewer_v1_0-beta_win32.7z

If you find any bugs, please post them in the comment section or (better) open an issue at the github repository.

Right now windows only, other platforms (linux first) will follow as soon as I’ve moved the project to CMake.

glCapsViewer 1.0 beta release

New features and url for the OpenGL hardware database

opengl-logoIn preparation for the release of the next glCapsViewer version (C++), the OpenGL hardware database has been completely overhauled and also got a new url for easier access.

After releasing the sources to the php front end of the database, I decided to clean up the sources for all pages, throw out old (bad) code and add in new features using external libraries like DataTables.

The OpenGL hardware database was my first php based web project, so much of the code wasn’t very pretty, and almost all search and filter functions were hard coded and not available everywhere and for all table columns. Not only did that make it hard to add new stuff, but it also gave a very inconsistent end-user experience.

The new version of the database now uses DataTables on all pages, including a live search, so that you can now easily search for data on every page among every column. Same goes for sorting, as all columns are now sortable, instead of just a few that were hard coded in the old version.

In addition to the new search functionality, the visuals are now based on jQueryUI and BootStrap, giving an easier look on the eye and also adding some convenient features, like having report information in separate tabs for easier navigation. Combined with live search, this should make the database a lot more fun to use.

The database now also has a real url (http://opengl.delphigl.de), instead of the old redirection, making up for much shorter urls than before, e.g. : http://opengl.delphigl.de/gl_generatereport.php?reportID=679

Feedback so far has been positive, and I also received some feature requests that I’ll ad in the future. So if you want to see a new feature, or see something that could be improved, just drop me a line or message me on twitter.

 

 

New features and url for the OpenGL hardware database

Going GitHub with gl(ES)CapsViewer

In my last posting for 2014, I wgithub-logorote a little bit about going open source with my projects. So I took the C++ rewrite of the OpenGL hardware capability viewer as a first step in releaasing more of my sources to the public.

And while I found bitbucket to be fine, I decided to move over to GitHub. Most of the developers I use to interact with are there (and not on bitbucket), and I prefer their UI and functionality over bitbucket (plus they seem to be super active with adding new stuff).

My GitHub repositories are located here.

It currently hosts the C++ port of the OpenGL hardware capability viewer, as well as it’s OpenGL ES counterpart (written in Java), the web front end of the OpenGL hardware database (PHP) and the pascal OpenGL header translation (Pascal).

So if you want to check out progress on these projects or like to fork them, just head to the repository. I’ll add other projects over time, and plan on releasing sources for some of my old (inactive) delphi projects too.

Going GitHub with gl(ES)CapsViewer

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.

Small update to the Delphi/Pascal OpenGL Header

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.

Delphi/Pascal OpenGL Header now supports OpenGL 4.5

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.

computeShaderC07

Sources : https://bitbucket.org/saschawillems/opengl-c
Compiled win32 binaries : https://bitbucket.org/saschawillems/opengl-c/downloads/computeShaderParticleSystem_win32_bin.zip

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
Enhanced C++ compute shader particle system

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.

Compute shaders for particle systems

GL_ARB_debug_output

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.

GL_ARB_debug_output