A Conversation with Bard

16 minute read

A sober conversation about AI and jobs with Google’s brand new chat AI, Bard, turns into a bit of a mess at the end. I have some experience using ChatGPT but only got access to Bard today. I thought I’d record this to perhaps compare to interactions in the future.

Read 3,503 more words...

Intel Arc A770: One Month In

3 minute read

The Intel Arc A700 Box

In building a PC mostly as a workstation, my choice of a GPU came as more of a secondary choice. My thought process was: sure, I’ll play some games every once in a while, but really, this is my work machine. It needs to do workstation stuff and not much more.

Read 668 more words...

mkdocs-alias-plugin 0.5.0 Release

less than 1 minute read

The latest version, v0.5.0, of the mkdocs-alias-plugin is now available here. This new version adds the ability to use the use_relative_link config flag, which causes the plugin to generate relative links to the aliased document rather than absolute ones. This flag is useful for those who host their wikis in subdirectories.

mkdocs-alias-plugin is an MkDocs plugin allowing links to your pages using a custom alias such as [[my-alias]] or [[my-alias|My Title]].

Call Me By Your Name Review

3 minute read

Call me By Your Name Book Cover

Warning: spoilers

When I was about ten pages into Call Me By Your Name by André Aciman, I thought this would be a book I couldn’t finish. The book’s narrator is its main character, a seventeen year old boy named Elio who lives with his parents in Italy. He is intelligent, shy, studious, and has a raging hormone-driven desire for Oliver, a twenty-four-year-old American houseguest of his parents. But Elio is a brat and seems to sabotage himself with every step along the way.

Read 601 more words...

The Drawing of the Three Review

1 minute read

The Drawing of the Three Book Cover

Note: This is a spoiler-free reflection.

Ever since I heard of the Dark Tower series, I’ve wanted to dig into it. I was practically raised on Stephen King novels but never felt ready to immerse myself in this series. Too daunting of a task. When I read The Gunslinger back in October of 2013, I liked it, but not enough to hook me. Ten years later, I decided to give the second book a shot, and things changed.

Read 198 more words...


less than 1 minute read

This weekend I took the time to find all of my ancient blog posts from various now-defunct blogs and stick them here. Finally, all of my failed projects are collected in one place!

Read 162 more words...

Back to top ↑


Learning to Type

6 minute read

One day in the early nineties when I was around eight or nine years old, my dad came home with two mysteriously acquired computers. Living in a tiny Dutch country town of about 1500 inhabitants, I wasn’t exposed to much in the way of high-tech, so this all felt very special and a bit magical. I had seen a computer before at school and on TV, but never actually used any, so this was all very exciting. I loved the way these machines looked: one was massive and square, a Commodore PET model 4016, the other rounded and much smaller (this may have been a simple dumb terminal like a Lear Siegler ADM-3A, I don’t remember).

Read 1,148 more words...

Back to top ↑


Hello Again, Macbook

1 minute read

Hello Again

Well, that didn’t take too long.

If you’ve been following along, you know that I’ve been trying to use Linux for my local development purposes on an Intel NUC (as well as a Lenovo laptop). I have to say, I still love the NUC and am going to find another use for it somehow, I’m just not sure what yet. However, Linux was somewhat of a disaster for me.

Read 274 more words...

Getting Rusty Code and Racer to Work Together

less than 1 minute read

While installing the Rusty Code extension in Visual Studio Code is pretty straightforward, Racer wouldn’t work out of the box after clicking the “install dependencies” (or whatever it was called) button. In fact, I never received a confirmation message that the dependencies finished installing.

Read 133 more words...

Back to top ↑


Bye MacBook, Hello Intel NUC

4 minute read

For a while now, my 2011 13” i5 MacBook Air which I use for development purposes has been showing signs of pending death: flickering screen when moving the lid, excessive heat, inability to be charged, killing 2 replacement batteries and 3 chargers, slowing down with new OS X/macOS installs, etc. etc.

Read 803 more words...

Elementary OS First Impressions

4 minute read

elementary OS

It’s been about a week of using elementary OS and I’ve compiled a few of my first impressions. First off, I want to start off with that I understand that elementary is still somewhat immature, so don’t take any of the criticism as me putting the project on blast. Far from it, in fact, but more on that later.

Read 777 more words...

RSpec be_truthy, exist, or be true?

1 minute read

The documentation for RSpec is amazingly detailed, but sometimes falls a bit short on when to apply certain matchers. In many of the specs that I’ve reviewed, incorrect matchers were used to test for pure Boolean values.

Read 483 more words...

Back to top ↑


C++ PImpl Template

less than 1 minute read

If you’re not familiar with the PImpl (private implementation) idiom, read this Wikipedia article first. While this is more or less “syntactic sugar” since the templates are expanded during compilation, but I think it makes for cleaner looking code.

Read 261 more words...

Back to top ↑


C++ Events with lambda expressions, and std::function

4 minute read

One of the things that C++ doesn’t have out-of-the-box is events, which is not necessarily a bad thing. However, with the additions to the C++0x/C++11 specification, we can implement something like an event system found in higher level languages such as C# using relatively easy to use code.

Read 1,080 more words...

OpenGLBook.com Launch

less than 1 minute read

Just launched OpenGLBook.com, a website on learning OpenGL 4.0 programming in online book format. The first two chapters are online, new chapters to be released periodically.

Carmack on OpenGL & Direct3D

less than 1 minute read

John Carmack, of DOOM, Wolfenstein, and Quake fame, has spoken out on the issue of Direct3D vs OpenGL in an interview with the folks at bit-tech. Check out the article here. Note that Carmack is still using OpenGL in his game engines because of cross-platform compatibility reasons, but prefers Direct3D’s more modern API.

It’s sad to see OpenGL in such a state of disrepair that even a contributor (id Software) to the specification denounces the standard.

P.S. Happy π day.

Epic Games’ New Unreal Engine at GDC 2011

less than 1 minute read

More news from this year’s Game Developers Conference shows some amazing next-gen graphics from Epic Games through their Unreal Engine. It’s certainly worth checking out the article at Tom’s Hardware right here.

OpenGL vs Direct3D: Where are we on Windows? (Win32)

5 minute read

It’s almost weekend, and time for a lighthearted post on the two realtime 3D computer graphics libraries that are available on Windows in 2011: OpenGL and Direct3D. The reason I mention the year is simply because of the fact that two years from now, this information will be as untrue as the Wikipedia article* on this matter due to rapid hardware and software developments. But for now, let’s bash it out.

Read 1,091 more words...

Hurry Up, AMD

1 minute read

You’ve heard of Intel’s recent “Cougar Point” chipset screwup causing all motherboards for Sandy Bridge-based Core i7 processors to be pulled from the market until next month when new parts will appear. We’ve also all read the reviews that show the new i7 processors to be very fast and beating AMD’s current lineup in terms of performance. So where does AMD stand?

Read 316 more words...

BC42104: Variable ‘X’ is used before it has been assigned a value.

1 minute read

My dearest VB.NET programmers (and C# programmers up to a point), I once again have to inform you of one of my pet peeves. This is pretty much a follow-up to one of my previous posts, but more than two years after, I still work in projects from various online sources as well as professionally that are littered with the warnings about undefined variables:

Read 428 more words...

C Bitwise Operations Cheat Sheet

1 minute read

Operations Table

Operation Sample C Operator
AND 1001 AND 0101 = 0001 & (ampersand)
OR 1001 OR 0101 = 1101 | (pipe)
NOT NOT 1001 = 0110 ~ (tilde)
XOR 1001 XOR 1011 = 0010 ^ (caret)
LEFT-SHIFT LEFT-SHIFT 0001 BY 1 = 0010 <<

C Assignment Operators

Operation Syntax Short For
AND X &= Y; X = X & Y;
OR X |= Y; X = X | Y;
XOR X ^= Y; X = X ^ Y;
LEFT-SHIFT X <<= Y; X = X << Y;
RIGHT-SHIFT X >>= Y; X = X >> Y;

Read 287 more words...

Five Quick Check-In Guidelines

1 minute read

If you work in a source controlled environment, these are the minimal guidelines that you’ll have to stick to for making your teammates’ lives a bit easier.

  1. Don’t Check-In Broken Code: More than often, you’ll pull down the latest version of a project from your repository only to find that the code won’t build. Please, don’t check-in code to the main project that doesn’t compile, even if you intend to pick up the slack the next day. However:
  2. Don’t Go Home Without a Check-In: Even though you shouldn’t check-in your broken code to the main branch, many source control systems have a way to branch a user’s changes and merge them back later. If you’re using Team Foundation Server, take a look at Shelve Sets.
  3. Use Check-In Comments: Always leave a descriptive comment of the work you’ve done when your check-in. Your teammates weren’t hired to analyze undocumented code, so that 500-line change across multiple files better have a comment.
  4. Check-In Association: If your source control system allows this type of integration, associate your check-in with a work item, bug, or help-desk ticket. If it does not, at least make a reference to the work item’s identifier in the comment section.
  5. Use Check-In Policies: Use check-in policies to ensure that all of the above things aren’t impeding your build if your source control system supports them. These policies make your life easier and disallow sneaky developers from checking-in their broken spaghetti code.

Share any tips you may have!

C Tutorial 01: Hello, World!

7 minute read

If you ask a programmer which programming language you should learn as your first, they’ll often prescribe you their personal favorite, often not considering if the language is supported on multiple platforms, easy to learn, exposing underlying system mechanics, and fully featured.

This post is the first of a series of tutorials intended to teach you the C programming language, an excellent first language because of the following reasons:

Read 1,667 more words...

CONFIRMED: Windows is going ARM

less than 1 minute read

Microsoft confirmed today at the 2011 CES that the next generation of the Windows operating system will indeed run on ARM processors, following wild rumors and speculation this past week.

Windows on ARM processors means that the operating system is now capable of running on a plethora of mobile devices, thus opening up an entirely new market segment for Microsoft. Is this the end of Windows Phone? Will Windows 8 be the new Microsoft mobile OS?

EDIT (01/06): Not much more info was released in last night’s keynote speech by Steve Ballmer. However, the implications of having the full-fledged Windows operating system on a mobile device such as a phone are tremendous. Android and iOS will have to pick up some speed to compete with the OS that has been in the making since 1985 and has excellent hardware and software support e.g.: multi-threading, scheduling, peripheral support, .NET Framework, WPF, Win32 API, etc., etc.

Back to top ↑


Thoughts on Sandy Bridge’s HD 3000 IGP

less than 1 minute read

Sandy Bridge is Intel’s new microarchitecture, slated for release in January of 2011. Sandy Bridge processors will effectively phase-out the current lineup of processors, based on the LGA 1366 socket, with processors fitting a brand new socket, LGA 2011.

While I understand the need for technology to move forward, and am an avid user of Intel CPUs myself, I can’t help but feel underwhelmed by the reviews, especially on the IGP (integrated graphics processor) front, the part that concerns me greatly.

The tech that Intel chose to use on the die is the HD 3000, and it’s little brother the HD 2000. Let’s hope it’s nothing like the GMA (Graphics Media Accelerator) X3000 and family, the scourge of the entire IGP world. Please, Intel, please.

Note: the continued body of this blog post was not archived, and is thus lost to the ages.

Creating a Window Wrapper Class: Redux

4 minute read

Okay, so I know you’re probably here because you searched for “window wrapper class” or something similar and expected the article that I use to host on Scriptionary that threw a bunch of C++ code at you for you to copy and paste. I regret to inform you that the article you were looking for has ceased to exist.

Sorry about that.

However, in its place I have for you this very post which will teach you how to accomplish creating such a wrapper all by yourself. I hope that is okay since all you really need to know is the how to create a window procedure that you can use with your custom class.

Read 1,043 more words...

A High-Resolution Timer for Win32

2 minute read

This post lists the code for creating a high resolution timer for the Microsoft Windows platform. High resolution timers are often used in multimedia and entertainment applications for timing events up to the microsecond.

This is a heavily modified re-post of the article that used to be on the Scriptionary.com website before the change to the blog, read the source code for details.

Read 705 more words...

WebGL: OpenGL ES 2.0 for the Web

2 minute read

As an OpenGL junkie I just have to dedicate at least one post to this topic.

By now you’ve undoubtedly heard of OpenGL ES, the OpenGL based library used on embedded devices such as cell phones and gaming consoles. OpenGL ES is what gives many Android based phones and iPhones their 3D gaming capabilities that rival the desktop machines of only a few years ago in terms of power. It seems like these days we’re all carrying a little computer in our pocket.

Read 328 more words...

Counting Processor Cores and Threads

5 minute read

Here’s a little snippet I’d like to share with you since there really isn’t a good example online that shows you how to count the processor cores and threads on Microsoft Windows using the Windows API through C++.

Read 1,417 more words...

Back to top ↑


First Public Larrabee Demo

less than 1 minute read

Intel demoed Larrabee for the first time to the public at the IDF (Intel Developer Forum), according to PC Pro.

The attached screenshot is a bit underwhelming but maybe we’ll see some impressive examples soon. In any case, if the demo is at the IDF now, the public release couldn’t be far off.

Edit (2010)

In case you haven’t heard — it seems like Larrabee was cancelled for good.

DirectX Developer Blog

less than 1 minute read

Apparently, the DirectX team has had a blog since late April of this year it’s just not very popular I guess.

They’ve posted a shipload of information over the last couple of months, so if you’re like me and had no idea this existed, you’ll have quite some reading to catch up to. It’s mostly about Windows 7 and the new graphics APIs (Direct2D, DirectWrite, etc.) but it’s interesting nonetheless.

August 2009 DirectX SDK

less than 1 minute read

Today the August 2009 DirectX SDK was released on MSDN, strangely enough the August SDK was released in September.

This release contains the first official release of Direct3D 11 (RTM), which was previously only a technical preview. According to the release notes, this version of Direct3D 11 will only work on the RTM version of Windows 7, not on the RC and Beta versions. So I guess only vendors and MSDN subscribers will be able to develop software until Windows 7 hits the retail market.

There’s also the issue of pure Direct3D 11 hardware not being sold yet but that should be right around the corner if the SDK is here.

Hungarian Notation: What to do?

1 minute read

Edit: FYI, by Hungarian notation, I mean Systems Hungarian such as bIsSucky.

It seems I’m in some kind of pickle. For some reason, two of the programmers at the company I work for still use Hungarian notation.

In case you don’t know what that is, in short: Hungarian notation prefixes an abbreviation of either the data type or purpose of the variable to its name. For example, Microsoft’s WINAPI still uses it, hence we have things such as hInstance, nShow, szCompany, etc. So it’s quite ugly and confusing to the programmer.

Yet these two programmers still cling to their old ways and refuse to give up on this ancient method. Even in VB.NET. One of these programmers happens to be Joe the Programmer mentioned before, go figure.

I was asked by one of them “Why not use Hungarian notation?” In case you dind’t know, dear reader, the name of the variable should give away the data type, use UpperCamelCase and logic for your naming conventions. Turns out, UpperCamelCase is a programming convention in this company, so why we were arguing, I don’t know. Now if only logic were a convention, we’d be set.

But it was like pissing against the wind as neither them nor I were persuaded in the end. How would you persuade a person to switch to a different methodology? By them using Hungarian notation, people who will eventually take over their source code will want to shoot themselves.

Back to top ↑


What if .NET would be Discontinued?

1 minute read

I’m not known as a person who particularly likes the .NET framework but I still have to use it. The .NET Framework is basically a massive library of general purpose functions, much like the Standard Library is to C or the Standard Template Library is to C++.

But what if it all would be discontinued?

It’s not an impossibility and rather likely considering Microsoft’s track-record. The millions of applications, libraries and websites created with .NET would be useless.

I’ve been fortunate enough to be part of a VB6 (CGI) to ASP.NET (VB) conversion team and, trust me when I say this, you don’t want to be part of such an effort. These conversions require truckloads of time and money, and if you work for a mid-sized to large corporation, this could easily lead into the millions of dollars.

Now imagine all of your code obsolete. Everything you’ve coded since .NET 1.0. What would you do? Let’s take FoxPro as an example. Microsoft bought FoxPro in 1992 and released a couple of versions under the “Visual”-family of products. The last version was released in 2007 and a statement of Microsoft suggests that this is the last version.

No migration tools to any other language are being provided.

Another product would be J#, which will be retired in 2015. Keep in mind that J# is a fairly recent product and was only released with Visual Studio.NET.

How far will .NET go before a turning point is reached? Consider that .NET was first released publicly in 2002 and will be a decade old in less than four years. Knowing Microsoft, the end is quite possibly much nearer than you think.

Amount of Digits in an Integer

1 minute read

Here’s another little snippet that might come in handy in your programmatic travels. I’ll show you an example of usage below, which might also be of interest to you. The code presented is in C, not C++. First, the code to count the amount of digits in an integer:

Read 498 more words...

Flattening Multidimensional Arrays

1 minute read

Edit: Thank you, fixitman for the insightful comment; the code has been fixed to work with non-square arrays as well.

In an effort to produce a better performing multidimensional array, I would like to share the following with you. Say we have a Matrix (or multidimensional array) of 5 x 5 integer elements, M. In order to allocate such an array in C++, we use the following code:

Read 489 more words...

CriticalSection wrapper class

2 minute read

2023 Update: You probably don’t want to use this code since there are likely some serious issues with it. But, fun fact: a major tech company reached out to me to clarify what the license for this is. So, if you want to screw yourself over and use it, let’s say it’s MIT licensed and call it a day.

What: A C++ wrapper around both WINAPI (Microsoft Windows) and PThreads (POSIX threads) functionality.

Why: To abstract cross platform functionality.

Remarks: On windows, CRITICAL_SECTION objects cannot be shared cross-process. This means that the class is tied to your application or DLL process. Comments are in Doxygen/Javadoc style.

Read 568 more words...

Preliminary view of DirectX 11

less than 1 minute read

Following is a list of the major features that have been announced to be included in Direct3D 11, the next generation Graphics API included in the DirectX SDK. In my opinion, the changes (rather, additions) brought into this API are excellent so far. It seems as if the API has finally grown up and is in no way, shape or form comparable with older DX versions and deprecates OpenGL 3.0 at this point.

Read 115 more words...

Don’t worry, it’s just a warning.

less than 1 minute read

I don’t like Visual Basic, yet in many Microsoft shops, VB is still being used especially in combination with ASP.NET. The problem with Visual Basic is that it’s not very strongly typed. Conventions are often thrown out of the window and Senior VB developers often hold their seniority as experience which, is more fiction than fact.

How many more times do I have to see Functions which don’t return anything and should have been declared as Subs.


Variable 'XYZ' is used before it has been assigned a value.


Variable declaration without an 'As' clause; type of Object assumed.

Ugh. You’d think that people with 15 years of development experience wouldn’t dismiss this kind of stuff and just do the right thing.

OpenGL 3.0 - 1 hour after

1 minute read

Artistic License?

Once upon a time there was a little old API, struggling for its life amongst the giants of software. Little old OpenGL knew that in order to survive it had to adapt to a strange, bewildering and new environment; it was a strange new world indeed. For two years, rumors of old OpenGL’s struggles reached the user-groups and there was much rejoicing indeed. But on one faithful day, August the 11th of 2008, OpenGL perished. Its age and idleness had (as with all things good and bad) caught up with him and slayed little old OpenGL in its path.

After reading the spec and looking desperately for the promised object model, I felt quite like a (self-censored) taking the newsletters seriously and writing about them so explicitly.

For those who haven’t read the specification yet, it’s OpenGL 2.1 plus and minus some stuff, hardly the fruition of two years labor. The anticipation that followed the initial announcement of OpenGL 3.0’s Object Model was tremendous. For the first time in a long time, people started noticing OpenGL again and maybe a place for it in modern multimedia applications such as PC games besides id Software’s titles.

Alas, it was not to be. Woe is me for my old API is truly dead. D3D, hello.

NVIDIA to Release OpenGL 3.0 Drivers September

less than 1 minute read

It’s been a while since I posted but this one will make up for it. A messy screenshot of NVIDIA’s 2008 timeline has emerged on Chilehardware (CHW) and reveals that OpenGL 3.0 drivers/implementation will be due in September of this year in a collection called Big Bang II (Big Bang I was SLI).

CHW member KaiserGerhardI has provided a deciphering of the screenshot which provides more information on the contents of the screenshot:

  • First: Quad ?????? Release February
  • Hybrid Shipped Spring
  • Spring Notebook Cycle
  • GT200 + ????
  • Big Bang II-Fall Will Focus on
    • Now/WWW features
    • SLI connectivity features
    • Display connectivity
    • Quality improvements
    • Performance improvements
    • OpenGL 3.0

The words which could not be deciphered are marked with question marks. What this means for OpenGL enthusiasts and developers is that we won’t have to attend SIGGRAPH, NVISION or any other meeting for that matter, since this is basically a confirmation on its own.

Now, let’s hope that ATI will also provide an implementation this soon.

Geforce GTX 200 Series Announced

less than 1 minute read

NVIDIA officially announced its new line of GPUs today on their website. Two models from the line have been announced, namely the GTX 260 and the GTX 280.

NVIDIA claims that the cards have a 50% performance increase over the Geforce 8800 Ultra (figures anyone?). Below are some highlighted specs for the high-end GTX 280:

NVIDIA Geforce GTX 280 Specs

Processor Cores 240
Graphics Clock 602 MHz
Processor Clock 1,296 MHz
Texture fill rate 48.2 billion/second
Memory 1GB DDR3
Memory Interface Width 512 bits
Memory Clock 1,107 MHz
DirectX Version 10
OpenGL Version 2.1
Card Dimensions (WxHxL) 2 Slots x 4.376″ x 10.5″

I’d love to see a benchmark done on this puppy.

DirectX 11 @ NVISION 2008

less than 1 minute read

DirectX 11 is to be presented at NVISION 08, click here for details.

Looking at the few mentioned features on the page (tessellation, multithreaded rendering, compute shaders, Shader Model 5), I’d say OpenGL is in big trouble if they want to catch up.

Vista and DirectX 10

1 minute read

This weekend I took some time out to reformat my development computer in preparation for Windows Vista. I used Vista before but switched back to XP x64 in less than a week’s time. But heck, after a year and a Service Pack, I was willing to take the chance with Vista.

I wanted to take advantage of the DirectX 10 features Vista exposes since they’re not available on XP but was kind of disappointed with the performance of the API in Vista. It seems to me that the samples provided in the DirectX SDK simply run much slower than on XP.

Granted, I bought the most budget oriented GPU that supports DX10 (Geforce 8500GT 512VRAM) but that was simply because of the reason that I want my projects to be able to run on the lowest budget hardware possible while still being able to access DX10-like features. Dell, in fact, offers the 8400 on their laptops and budget desktop PCs, which is a fair share of the market and should be targeted.

Vista itself seems pretty solid so far; it certainly responds better than a year ago and supports all of my hardware and development tools (VS 2008, AQTime, Intel C++ compiler, etc). The big test will be OpenGL: Will it also have performance drops or stay the same? I’ll see tonight.

Why OpenGL 3.0 is Important

10 minute read

Some questions have come up in regards to my last post, The Ghost of OpenGL 3.0, and one of them keeps popping out on top: Why do we need OpenGL 3.0 and What’s wrong with OpenGL 2.1? This post will attempt to take you through the pre-published materials on the OpenGL API, version 3.0 and show you the major changes and differences. Or you could simple jump to the answer and conclusion without reading the features provided by OpenGL 3.0, if you don’t feel like getting informed.

Terms used:

  • Mutable: something which can change shape or form.
  • Immutable: something which cannot change shape or form.
  • API: Application Programming Interface, an interface designed to allow transactions with a library or application.

Hardware Evolution

Besides being a graphics API, OpenGL sets a standard for IHVs (Independent Hardware Vendors) to comply with. By doing this, we can be sure that a certain type of hardware is compliant with a specific set of demands, not unlike what Microsoft has been doing with DirectX 10 and higher, albeit not an open standard. For example, OpenGL 2.0 formally introduced the GLSL (OpenGL Shading Language) which was not available in 1.5, thus forcing IHVs to implement the capabilities according to the OpenGL standard.

A comparison with the Direct3D side of things would be the enforcement of Direct3D 10.1 compliance by setting a mandatory requirement of 4x anti-aliasing.

OpenGL 3.0 is said to be able to function on OpenGL 2.1/DirectX 9 level hardware, so basically anything from the GeForce FX series and upwards (supporting High Level shaders).

The Software Side

The OpenGL logoMost of the readers here are programmers, so the hardware side of the OpenGL standard will probably be less interesting to you than the features OpenGL 3.0 will bring. We all know that the OpenGL 3.0 specification has not yet been finalized, so all material discussed here is subject to change and compiled from various sources which I will list at the end of the post.


One of the major changes that OpenGL 3.0 will introduce is the usage of objects. Yes, the specification is still specified through the C programming language which natively does not support the OOP (Object Oriented Programming) paradigm but a way around this is being implemented.

The objects themselves are similar to native C structs which are used for creating user-defined data-types. Please note that I refrain from using the word class since a class is a data-type on its own, not found in the C programming language nor used in combination with the OpenGL API.

So far, four object categories have been announced, namely:

  • Templates
    • Put in simple terms: a placeholder for the definition of a specific object type. Attributes can be set to fulfill the creation of a specific object type. For example, to create an “image” object, one must first create a template object with specific parameters for the creation of the image object, set the attributes required for the object and pass it to an image object constructor function, e.g.: glCreateTemplate(GL_IMAGE_OBJECT); returns a GLtemplate object, after which attributes are applied, glCreateImage(variable to GLtemplate object); returns the handle to an image object (see Data Objects below) constructed according to the attributes supplied to the image template. Templates may be modified at any time since they are defined and stored on the client-side.
  • State Objects
    • State Objects are simple objects containing a specific set of attributes applicable to multiple objects. State Objects are partially mutable once created, meaning that only certain aspects of the object can be altered after it has been constructed. Data Objects
    • The example given above at Templates talked about an “image object” which contains image data, stored in a Data Object. These objects have an immutable structure but the data is mutable. These Data Objects get stored VRAM (or RAM depending on the implementation) and can be shared amongst multiple contexts. Examples of Data Objects are Image Objects and Buffer Objects.
  • Container Objects
    • The best way to describe a Container Object is by the example of the VAO (Vertex Array Object). The VAO represents a piece of geometry by describing an array of vertices stored in memory and may not be referenced amongst multiple contexts. The Container Object contains a mutable attachment (VAO: Vertex Buffer) and immutable attachment properties.

This new object-based system seems to be the biggest part of the restructuring of the standard and it certainly opens up a new realm of possibilities for IHVs/driver implementers. By abstracting the objects to the server-side, the underlying driver code can be optimized to handle the new data-types more efficiently. The more the API pushes to the server-side, the better the performance can potentially be optimized.

Asynchronous Transactions

While this basically falls under the “Objects” heading, it’s a feature worth mentioning alone. In an effort to improve parallelism, Object creation calls are asynchronous. This means that during the time that an object is being created, a valid handle to the object has already been returned for usage, even before the object’s resources have actually been allocated.

What this means is that more commands can be executed on the client side while the server-side takes care of the execution thus resulting in a faster command chain.

Backwards Compatibility

The OpenGL API has always been backwards compatible throughout its revisions and OpenGL 3.0 will not be an exception. Plans have been made to retain backwards compatibility with the current OpenGL 2.1 standard without breaking older applications.

Another feature, which has not been set in stone, is the manner of interoperability between OpenGL 3.0 and 2.1 which would allow an OpenGL 2.1 application to attain an OpenGL 3.0 rendering context.

Goodbye, Fixed Function Pipeline

OpenGL 3.0 removes the fixed function pipeline which was eradicated in the Direct3D API in version 10. This means that many parts of a normal graphics pipeline are now programmable. This is a huge shift towards the future of a fully-programmable graphics pipeline which would be the definitive step in perfecting a graphics API.

The removal of the so-called “fixed function” pipeline means that all graphical output has to be defined through the “programmable pipeline” though a mechanism often called “Shaders.” Shaders are programmed in a language called the OpenGL Shading Language (GLSL or glslang) or through an intermediary language such as Cg. Shaders not only allow for shading the geometry but also the transformation of its vertices (vertex shader) and individual pixels (fragment shader).

If you’ve read the heading above this one, you’ll notice that OpenGL 3.0 is backwards compatible with older versions which support the fixed pipeline functionality. OpenGL also supports these functions but internally these are transformed into the form of shaders.

OpenGL version “Mount Evans”, which will be released after OpenGL 3.0, will support the functionality provided by Geometry Shaders which allows for the manipulation of “pieces” of geometry and generation of new geometry as well. This allows the programmer to take advantage of currently available hardware-accelerated functionality such as tessellation. Even though this functionality is said to be provided after 3.0 has been released, it is likely that this functionality will be provided with the formal release of OpenGL 3.0 instead.

So, what’s wrong with 2.1?

By now you might have noticed that I haven’t exactly formally answered the question “What’s wrong with OpenGL 2.1?” The answer is: There’s nothing wrong with OpenGL 2.1.. informally. OpenGL 2.1 is a very capable API which could support many of the features that OpenGL 3.0 incorporated. The big difference is of course that the functionality in OpenGL 3.0 will be a formal standard while the 3.0-like functionality in OpenGL 2.1 is provided through IHV-developed OpenGL extensions which may differ from one and other.

The above, and the fact that the new API works with Objects, is causing the anticipation. OpenGL 3.0 will formally push the API into the next-generation era and will finally be able to compete with Direct3D 10, which is why OpenGL 3.0 is important.


As said above, OpenGL 3.0 will push the API into the next generation. In my personal opinion, the new structure of OpenGL 3.0 could severely compromise the position of Direct3D in the Microsoft Windows gaming market since the functionality provided with OpenGL 3.0 will also work on Windows XP, unlike Direct3D 10. Vista is still being viewed upon as somewhat of a quirky Operating System and many developers and users are sticking with XP for the time being.

I’d like to conclude by saying that this post does not present all of the new published features in OpenGL 3.0, rather it lists the features which I find most compelling about the new API. Also, I’m not affiliated with the Khronos Group in any way so everything you read here is non-official and compiled from various online sources, talking about the unfinished and proposed API. Last but not least, I don’t guarantee the correctness of the article, nor the correctness of the sources used — correct me if I’m wrong about something.

Some old Comments

Taken from the original, now lost blog post comment section:

Korval says; 16 May 2008 - 13:01

Nobody really says that GL 3.0 isn’t important. But the fact is that it’s too late. There was a pretty good window of opportunity for a new and improved GL API to swoop in and garner attention among PC game developers. That time has passed. Vista adoption is up, which means that D3D10 usage will be up. The break between Vista/XP and D3D10/9 (ie: if you use XP, you can’t have D3D10 features) was a good opportunity that the ARB has squandered.

Furthermore, if the GL ARB couldn’t get this done last year, why should we believe them this year? The fact is that the ARB has failed, monstrously. They did it before back when they were working on render-to-texture. They spent 2 years on something that shouldn’t have taken more than 6. The younger GL programmers may not remember the days before VBO, but it took an awfully long time to get VBOs as well; until then, we had to rely on a bunch of vendor-specific extensions.

I love the ideas behind GL 3.0; I even wrote my GL 2.1-based rendering abstraction layer based on those ideas. But the fact is that it’s very, very late. And even that wouldn’t be so much of a problem if they could just tell us WHY it’s late. But they won’t. Which means it’s either IP or some stupid argument about something that matters very little. And if it’s the latter, then that means that the ARB is so worried about making a mistake that they won’t actually produce anything. Which makes them ineffective.

For 1 year, the ARB was good about updating us on their progress. And then they stopped. That shows a blatant lack of respect for us the potential users of OpenGL. So why should we respect them back?

Dave says; 19 May 2008 - 4:38

I think exactly the same to #Korval.

Every version of DirectX has the great disvantage of relying on a binary format for method calling and structs memory layout that is completely incompatible between major versions.

OpenGL has a smarter design in the sense of using raw C functions (instead of virtual C++ like methods) and almost no C structs.

But it is released with a functional equivalence to DX almost 2 years before. Otherways, using non-standar extensions is a nightmare.

Current OpenGL version has a lot of inconsistences, and a lot of legacy unusefull methods.

But the modern design of DX is not the only advantage over OGL, but a consistent DirectX SDK with a compact documentation and a pletoria of examples.

Aras Pranckevičius says; 19 May 2008 - 13:06

I don’t mind D3D changing the API with each major revision. API itself is nothing; it’s really easy to rewrite “the same stuff” to another API. Underlying hardware is still the same, so if the API is not Completely Stupid, it’s not a big deal.

What I do mind though, is whether API and everything related to it (drivers) work. OpenGL fails miserably in this regard, with it’s approach of “let’s let each IHV make their own bugs in the whole stack!” it’s just horrible. FBOs? GLSL? Argh!

Another thing that I don’t mind that much is all the legacy APIs/extensions. There’s probably ten ways to submit vertex data, while in fact there should be vertex buffers only. And even then, VBOs in GL don’t match up what was available in D3D for years (updating a portion of VBO without additional memory copy, anyone?).

So in my view GL3 does not bring anything new to the table. Ok, maybe it will be simpler for IHVs to implement, which would take care of some bugs in the drivers. But what they should really do is force a common stack upon everyone, and make only the lowest-level driver be a responsibility of IHV.

NVIDIA PhysX SDK + more

less than 1 minute read

As you might know, NVIDIA has recently purchased Ageia, makers of the PhysX real-time physics SDK. Since then, NVIDIA has taken over the development of the SDK and a new version of the SDK is now available for free in binary form from the NVIDIA website, click here to go to check it out. A special license for the source code version of the SDK can be acquired for a mere $50K.

In other NVIDIA news: two new free book releases are now available on the NVIDIA website, namely: The Cg Tutorial and GPU Gems 2 which are two incredibly useful books. NVIDIA is on a roll, and looking at the manner in which freebies are coming in lately, I’ll be the last one to stop ‘em.

The Ghost of OpenGL 3.0

2 minute read

OpenGL 3.0 seems to become more and more of a promise that’s bound to be broken; like a friend who promises you to give back the money you loaned him, always tomorrow.

The expected API promises many new features, enhancements and is the first total rewrite of the existing OpenGL Standard. The API promises an interface compatible with the next generation of computer graphics programming and is set to compete with Microsoft’s DirectX 10.

Well, that’s the plan at least. OpenGL 3.0 has been delayed tremendously since its scheduled release in October of 2007. On October 30th of 2007, ARB member Barthold Lichtenbelt (NVIDIA employee) made an official announcement on the OpenGL.ORG forums claiming that the release date was postponed until further notice because “[the OpenGL Working group] don’t want to spend time fixing mistakes made in haste.”

The announcement settled fine with most of the OpenGL community since at least there was news. But after 7 months of neither news nor updates, some of the community is giving up on (or dismissing) the possibility of a new API at all.

But is it really possible to give up on OpenGL? The API is pretty much the only viable hardware accelerated option on platforms other than Microsoft Windows, and even on Windows many developers are reluctant to switch from XP to Windows Vista in order to take advantage of Direct3D 10.

The Khronos Group have been putting out updates on the other software which they maintain the standards of with the exception of their most popular/anticipated one, OpenGL.

So what does that mean? Either OpenGL is being actively developed on and public discussion is prohibited per NDA, or development has halted and there is reluctance in releasing the bad news. My hopes are up for the former option since the OpenGL API is without a doubt the most flexible Graphics API available today.

Of course, there is a third option which is quite scary and different. Khronos has been publishing information on a new API called OpenKODE which bundles several APIs in a DirectX-like manner of platform abstraction. Maybe the OpenGL API will become a part of this which would set back the development even more, but this is (as are the other options) a wild guess.

If there’s one thing to consider, it’s the fact that OpenGL is a standard (a definition), not an implementation. Which means that the actual source code for 3.0 would have to implemented by: A. the independent hardware vendors or B. the platform developers. So even if the OpenGL 3.0 API would be released today, the actual libraries wouldn’t be available yet since the implementation would be missing.

All in all, I think we’re still very far away from seeing a workable OpenGL 3.0 implementation that’s supported ‘cross-platform. For now we’ll just have to do with OpenGL 2.1 or Direct3D 10, which in many cases, is a limited set of options that’s impossible to choose from.

Direct3D, OpenGL and XNA Fieldguide

9 minute read

A common novice’s question in context with graphics programming is which API should I use?, Direct3D versus OpenGL or which API is better?. Getting familiar in the Graphics Programming world can be tough since many subjects don’t have definitive answers. This article attempts to clear up some of the mysteries surrounding the APIs and compare them as far as it is possible. The individual APIs discussed in this document are Direct3D, OpenGL and XNA. If you’re new to Graphics Programming in general, read the Graphics Programming article to get a clear understanding of what exactly these APIs do.

This article is not intended to explicitly tell you which Graphics API to use, rather it simply explorer the features and limitations of the APIs discussed.

About Graphics APIs

The following sections explain what a graphics API is, what it does and what influences a Graphics API. The points here are simplified to provide a basic understanding.

A Graphics API is not

The following two section define what a Graphics API is not. If you’re looking for the topics provided here, some suggestions are made for you to continue your search.

…a Game Engine

To be clear about what’s being discussed here: Direct3D, OpenGL and XNA are not game engines. A game engine is a library or program dedicated to delivering high performance interactive 3D graphics, sound, networking, etc. A Graphics API is simply a low-level mechanism to deliver visual content to a computer’s screen. Some examples of game engines are Delta3D, NeoEngine and the C4 Game Engine.

…a 3D Engine

While 3D Engines such as Ogre3D, Irrlicht, et al implement Graphics APIs, they usually provide access to higher-level functionality such as loading models, mathematical functionality and scene management. The graphics APIs don’t provide such functionality but allow the user to create the functionality themselves through API functions provided.

Graphics APIs Usage

After reading the previous section, you might wonder what a graphics API does since it doesn’t create games or manage a scene. Think of a Graphics API as a way to talk to your graphics hardware. A Graphics API allows you to tell your hardware to draw a pixel at location X in a human understandable format.

The Difference between the APIs being the syntax of the way you talk to the hardware. To draw a pixel, API A might require you to type DrawPixel(left, top); while API B requires you to say PutPixel(left, top);. Another difference might be the way the API is initialized and made functional in the context of the code.

The Display Driver’s Role

The display driver’s role is to translate API and operating system functions into a hardware interpretable format. To understand how the process works, here’s a simplified list with the steps involved from the program to the hardware:

  • Program sends an instruction to the API
  • API sends the instruction to the Display Driver
  • Display Driver sends the instruction to the operating system
  • The operating system sends the instruction to the CPU
  • The CPU sends the instruction to the graphics hardware

Display drivers require to be updated every now and then. This is because the driver is the intermediary piece between the API and the hardware and is a piece of software, which like all software might contain bugs. Another reason for these updates might be because of added or updated functionality for a specific Graphics API.

Without the presence of a display driver or nonsupporting hardware, an API will likely fall back to a software implementation which means that all API routines will be executed by the CPU. This means that hardware acceleration will not be supported and the execution times are likely to be much higher.

API Image Quality

Contrary to popular belief, APIs rarely (if ever) affect the quality of the final image. To understand why, one must envision the different APIs talking to the same piece of hardware. When API A says DrawPixel(x,y); the hardware receives this as an instruction in machine code and executes this. When API B says PutPixel(x,y); the same instruction will be executed with the exact same machine code.

If a difference in image quality does exist, it is most likely due to the way the display driver interprets the command sent and transforms it into machine code for the graphics hardware to consume or because an API performs an automated transformation beyond the user’s control.

When comparative images show up, it is best to avoid arguments and simply ignore the statements being made since APIs have no control over how the hardware display an image. The only factors in the image quality are the quality of the artwork, the ability of the hardware and the amount of hardware integration (the amount of hardware functions) the graphics API provides.

API Performance

While image quality barely plays a role when considering an API, different APIs can certainly have performance differences. This is usually because of the amount of abstraction occurs between the API and the hardware. Abstraction simply means the amount of functional layers between the API and the hardware. Performance leans heavily towards the amount of code that’s being processed, so in many cases more code equals lower performance.

Introduction to the APIs

The OpenGL API

The OpenGL API is certainly the oldest graphics API between the three discussed in this article. Conceived in 1992 by Silicon Graphics as an open standard for graphics hardware instructions across multiple platforms, it has proven to withstand the test of time being virtually implemented on all major operating systems.

The Direct3D API

The Direct3D API is a proprietary graphics interface for Microsoft platforms such as Microsoft Windows and the Xbox platforms. It was conceived in 1995 for the Windows 95 operating system as part of the Windows Game SDK, which was later renamed to DirectX. Direct3D currently handles all 3D and 2D instructions within the DirectX SDK.

The XNA Framework

The XNA Framework is the youngest of the APIs discussed here, being released in 2007. XNA is an interface built on top of the DirectX SDK and provides high-level Object Oriented functionality for video games. XNA is currently only available in the C# programming language since it’s a managed library based off the Microsoft .NET framework. XNA currently only works on the Microsoft Windows and Xbox 360 platforms.

Comparing the APIs

Cross-Platform Support

When a program will solely run on a single platform, the choice between APIs is usually fairly clear. But it is likely that a product, whether it be a video game or professional software, has to be supported on various platforms.

Currently, the OpenGL API is the only API supported on most major platforms including Microsoft Windows, various Linux distributions and Macintosh. The OpenGL API cannot be operated on the Xbox and Xbox 360 platforms, but can be used on the PlayStation 3 platform.

The Direct3D API will only run on Microsoft platforms such as the Xbox, Xbox 360 and Microsoft Windows but can be emulated on Linux platforms through Wine which reroutes Direct3D API calls to the OpenGL API.

The XNA Framework is currently only supported on Microsoft platforms that can run the .NET framework which is limited to Microsoft Windows XP, Windows Vista and the Xbox 360.

Ease of Use

All three APIs are fairly simple to use with XNA being the simplest API and Direct3D being the most complex API in terms of code syntax. Since Direct3D and OpenGL are both native C libraries, the interface provided does not implement any classes or namespaces.

XNA on the other hand is strictly a .NET platform enabled Framework which means that it cannot be used by native languages, only by managed languages but implements classes and namespaces. XNA also includes a myriad of helper functions and libraries and is fully compatible with the .NET framework.

This means that while OpenGL and Direct3D both are closer to the hardware and can be ported to a higher level language, the time it takes to develop an OpenGL or Direct3D application will be higher than that of an XNA application. The trade-off is explained in the next section.


Since OpenGL and Direct3D are C-based APIs, they are closer to the hardware and implement fewer levels of abstraction. This means that the performance differences between Direct3D and OpenGL are minimal. Any significant performance differences are likely to be the result of the way the display driver interprets the API commands.

The XNA Framework on the other hand is a .NET library which invokes native Direct3D calls to be used on the virtual machine in which the .NET Framework operates. This high level of abstraction can cause performance issues and it is recommended to use the XNA Framework solely for lower performance applications.


APIs are usually limited by the amount of features they implemented at the time of release. This causes the developers of the API to update the API, increase the version number and release a newer version. DirectX/Direct3D is limited by such restrictions, yet updated versions of the SDK are being release routinely every three months.

The OpenGL API includes an extension mechanism which allows independent hardware vendors or end-users to implement their own features whenever a driver is released or with a next generation of graphics cards.

The XNA Framework is based on Direct3D version 9 and can only include the functionality provided by this API. If a newer version of Direct3D is released, the XNA Framework will have to implement the new functionality afterwards. This causes the library to be one to several versions behind current standards.


The OpenGL API is a community supported and developed product and currently has a new version scheduled for 2008, OpenGL 3.0. The OpenGL API is not often updated, 2.1 being the latest version from 2006 and development has fallen behind schedule as OpenGL 3.0 was supposed to be released in 2007.

The DirectX API is both community supported and professionally supported. Professional support requires at least an MSDN subscription to access the support features. A new version of the DirectX API is released every three months.

The XNA Framework is also both community and professionally supported, similarly to DirectX. XNA releases are announced in advance but doesn’t have a set update schedule.


The Direct3D API is extremely popular with Windows and Xbox platform developers where the gross of the game development occurs. Since Direct3D is developed by Microsoft, it lends itself well towards Microsoft’s platforms.

The OpenGL is popular amongst both professional graphics developers and game developers, although its usage in video games has declined somewhat since the early 2000’s. It is the only available option on non-Microsoft platforms for hardware accelerated graphics.

The XNA Framework is very popular with hobbyist programmers and lends itself well towards learning how the concepts of both 3D and 2D programming works. Yet, only a few professional titles have been released using the XNA Framework.


An important aspect of releasing software are the license restrictions which an API might implement. Both the OpenGL and Direct3D APIs have a licensing model which allows a developer to use the APIs in a commercial product without restrictions.

To release commercial software which implements the XNA Framework 2.0, a license agreement must be agreed upon between the developer and Microsoft which prohibits the usage of the network code provided by the XNA framework. The XNA Game Studio may not be used to create commercial titles for Xbox 360 but commercial Windows titles may be released. To distribute titles on the Xbox 360 platform, a $99.00 fee must be paid in order to be able to access the functionality provided by the XNA Creator’s Club.

Features OpenGL Direct3D XNA
Cross-Platform Support, amount Yes, numerous Yes, three Yes, two
Learning Curve High High Low
Native Language C C C#
Supported Languages Most Languages Most Languages .NET Languages
High Performance Yes Yes No
License Restrictions No No Yes
Support by Developer No Yes, paid Yes, paid
Library Platform Native Native Managed

Bitwise Programming in C

6 minute read

This article explains Bitwise Programming in C, a common practice in most programming languages. While bitwise operations might seem like a dark art at first, it really isn’t that scary. You simply need to know when to apply these operations and for what reasons to use them.

The article discusses bits (calculation, workings) in section one previous to the actual operators so that an understanding is made on how bits operate.

About Bits

To understand how bitwise operations work, we must first understand how bits work and what bits are. Bits are usually explained as being either a number one ( 1 ) or a number zero ( 0 ), which translates into a logical TRUE or FALSE, or ON or OFF.

Bits tell the CPU (Central Processing Unit, or processor) to be either in a state of ON or OFF for a specific time-frame. This time-frame is defined by the speed of your processor and can be pseudo-calculated like so:

If the processor is 33MHz, 33,000,000 individual bits can be processed in a single second since 1Mhz = 1,000,000Hz and 1 bit = 1Hz. This means that a modern machine of 3.0 GHz is capable of processing 3,000,000,000 (three billion) bits per second. Keep in mind that this does not mean that every single bit is a processor instruction, instructions depend entirely on the processor’s architecture.

Number Representation

Binary numbers, or Base 2 notation, can only represent their numbers in sets of ones and zeros as we found out before. The number one (1) represented in binary code like so (32 bits, spacing for readability):

00000000 00000000 00000000 00000001

But numbers are normally represented in sequences of eight or four numbers, if there is too much zero-padding, which is a what this article will continue to practice.


Base 10 to Base 2

Since (most) humans are taught to think in Base 10, binary does not come naturally. Often a conversion or calculation to the appropriate Base is required. Converting a Base 10 number (123 in this case) into Base 2 goes as follows:

123 ÷ 2 ≡ 61 r 1
61 ÷ 2 ≡ 30 r 1
30 ÷ 2 ≡ 15 r 0
15 ÷ 2 ≡  7 r 1
7 ÷ 2 ≡  3 r 1
3 ÷ 2 ≡  1 r 1
1 ÷ 2 ≡  0 r 1

Even though it’s calculated like this, the binary number for 123 is not 1101111 but 1111011 which is the number read from the last calculation to the first. At the first calculation we notice that 123 ÷ 2 ≡ 61 r 1 instead of 61.5. The notation 61 r 1 simply denotes that the number divided was not a round number and we received a remainder of 1. To calculate the remainder:

1 ≡ 123 % 2


1 ≡ 123 mod 2

Base 2 to Base 10

The following calculation is used to convert a Base 2 number into a Base 10 number:

1 × (2 ^ 6) ≡  64 +
1 × (2 ^ 5) ≡  96 +
1 × (2 ^ 4) ≡ 112 +
1 × (2 ^ 3) ≡ 120 +
0 × (2 ^ 2) ≡ 120 +
1 × (2 ^ 1) ≡ 122 +
1 × (2 ^ 0) ≡ 123

When to use Bitwise Operations

So far we’ve established that a computer uses a Base 2 system for calculation but haven’t explored why this is important to a programmer. The simplest usage example would be the usage of flags which will be the example used throughout this article.

#define SETTING_ONE    1 // 0001
#define SETTING_TWO    2 // 0010
#define SETTING_THREE  4 // 0100
// etcetera

In several APIs these settings are combined with the bitwise OR operator like so:

unsigned int uiflags = SETTING_ONE | SETTING_TWO | SETTING_THREE;

This usage allows the combining of settings into one single variable, to see how this works exactly, read the next sections.

Bitwise Comparing

Bitwise OR

Bitwise OR in C is expressed as a single pipe, |, not to be confused with the boolean or, ||, takes two or more integer values and combines their bits. For example the sample code:

#define SETTING_ONE    1 // 0001
#define SETTING_TWO    2 // 0010
#define SETTING_THREE  4 // 0100
int main ( void )
    unsigned int uiflags = SETTING_ONE | SETTING_TWO | SETTING_THREE;
    return 0;

Would result in the variable uiflags to contain 0111, or in Base 10 notation: 7. Because:

0010 OR
0100 OR
---- ≡

You might wonder what the difference would be compared to:

unsigned int uiflags = SETTING_ONE + SETTING_TWO + SETTING_THREE;

To show the difference, imagine the following program:

#define SETTING_ONE    1 // 0001
#define SETTING_XXXXX  3 // 0011
int main ( void )
    unsigned int uiflags = SETTING_ONE | SETTING_XXXXX;
    return 0;

The progam does not return the Base 10 number 4 as would be expected with the + operator, but the value 3. This because:

0011 OR
---- ≡

This means that the OR operator combines two binary values, but does not add them together arithmetically. Remember that with bitwise OR, 0001 OR 0001 does not equal 2 but 1.

The return value of OR will only be zero if both compared bits are zero: 0000 OR 0000 equals 0.

Bitwise AND

The bitwise AND operator in C, &, makes everything a bit more interesting. Also, this is not the same operator as && which is a logical operator. This operator allows you to check if a bit has been set in a certain place in two variables, for example:

0111 AND
---- ≡

Which returns a non-zero value which can be view upon as TRUE if a comparison is being made.

0101 AND
---- ≡

Returns false since none of the bits’ locations correspond to each other. If we take our code from the OR sample, and combine it like so:

#include <stdio.h>       // for EXIT_* definition codes
#define SETTING_ONE    1 // 0001
#define SETTING_XXXXX  3 // 0011
int main ( void )
    unsigned int uiflags = SETTING_ONE | SETTING_XXXXX;
    if ( uiflags & SETTING_XXXXX ) // does uiflags contain the flag?
        return EXIT_SUCCESS; // uiflags contains the flag
        return EXIT_FAILURE; // does not contain the flag

Bitwise NOT

The NOT operator in C, ~, is a simple one which requires less explanation than any other operator. The NOT operator simple negates the bits set. Example:

NOT 0001
-------- ≡

Which in Base 10 notation would be NOT 1 ≡ 8 This allows you to retrieve the exact opposite settings of the values given.

int main ( void )
    #define FAST     1;  // 0001
    #define QUANTITY 2;  // 0010
    #define SLOW     4;  // 0100
    #define QUALITY  8;  // 1000
    unsigned int highSettings = FAST | QUANTITY; // 0011
    unsigned int lowSettings  = ~highSettings;   // 1100, SLOW | QUALITY
    return 0;

Bitwise XOR

The XOR operator, ^ in C, is another interesting operator which compares two sets of bits. Unlike the other operators, XOR checks if the bits in the position are the same and returns zero. If they are not the same, it returns one. This process is called “exclusive or”, meaning that it excludes equal values and includes differing values.

1101 XOR
---- ≡

This means that if you compare two values which are equal, the result could be cast as a boolean false.

1011 XOR
---- ≡

Or in C code:

int main ( void )
    #define FAST     1;  // 0001
    #define QUANTITY 2;  // 0010
    #define SLOW     4;  // 0100
    #define QUALITY  8;  // 1000
    unsigned int highSettings = FAST | QUANTITY; // 0011
    unsigned int lowSettings  = SLOW | QUALITY;  // 1100
    unsigned int difference1  = highSettings ^ lowSettings; // 1111
    unsigned int difference2  = highSettings ^ highSettings; // 0000
    return 0;

Using XOR on a value of itself will always return a boolean cast FALSE.

NVIDIA Opens Up GPU Gems

less than 1 minute read

NVIDIA has decided to publish the acclaimed GPU Gems book on their website, free of charge. Go to the NVIDIA website to read it. Did I mention it was free? Its free.

Is Direct3D 10 on Windows XP Possible?

3 minute read

There has been a firestorm of discussions on the topic of “Is Direct3D 10 on Windows XP Possible?” This article will attempt to provide an answer to this hot topic. The answer has already been provided by Microsoft’s officials on several occasions but regardless of the manner in which DirectX 10 functions in Vista, would the functionality provided in Direct3D 10 be possible to implement? The official answer is a resounding no for the entire DirectX API, but what about Direct3D 10 which would be the only API of interest here?

What’s the argument?

Like any Direct3D version, Direct3D 10 is an API which abstracts a pre-defined set of functionality (as much as the API supports) of the underlying hardware. Ever since Direct3D 10 came out however, the minimum hardware capabilities were defined by the API rather than the hardware. This was a way to eliminate the old DEVCAPS (Device Capabilities) struct found in Direct3D 9 and below and to push a certain level of standardization or conformance.

If we take a close look at the features presented in Direct3D 10, which is easy since it’s predefined (non-expandable), we’ll notice shortly that none of the features are limited to Vista; neither are they unique to Direct3D in general:

  • Unified Architecture (programmable pipelines)
  • Shader Model 4: HLSL Pixel Shader v4.0, Vertex Shader v4.0
  • Geometry Shaders
  • Texture Arrays
  • Predicated Rendering
  • Instancing 2.0, which is a redo of the previous Microsoft Geometry Instancing

When a notice is made that these features were already available under Windows XP through OpenGL 2 and up, attention will most likely be redirected towards the WDDM, which is the Windows Display Driver Model, unique to Windows Vista.

What’s WDDM?

WDDM (Windows Display Driver Model) is a Windows Vista-only Windows Driver Model for IHVs (Independent Hardware Vendors) to base their display drivers on. WDDM allows the developers to take advantage of several new functions not available in the old XPDM Windows XP Display Driver Model, namely:

  • Virtualized Video Memory:
    • Allows the Operating system to (optionally) utilize system RAM if the Video RAM (VRAM) is insufficient.
    • Application requires a to push some data to VRAM via D3D API calls:
    • D3D10 User-Mode abstract layer handles event and triggers:
    • The Kernel-Mode WDDM interface determines:
      • If VRAM is not full, push onto VRAM stack, else:
      • Push onto RAM stack.
    • If the application needs to pop the memory from the stack, it doesn’t have to determine where to pop it from since WDDM handles this process. The stack push/pop terminology is used solely for simplifying the example and doesn’t denote the actual inner workings of the WDDM in any way since this is indeterminable.
  • GPU Threading:
    • A GPU process runs as a thread on the GPU and allows CPU-like multi-threading on a regular CPU. This means that you can spaw multiple Direct3D processes on a single GPU, thus WDDM must support the following item on this list.
  • GPU Interruptibility:
    • Allows process interruption, which means that you can switch from one GPU process to another without the process losing its context and resources.
  • Direct3D Surface Sharing:
    • Allows for a different process to access a D3D10 surface. This is necessary for the DWM (Desktop Window Manager) to function properly to allow for a final Desktop composition.
  • Other Features:
    • Allows for a Display Driver restart on failure without requiring a total reboot.

The Main Problem

Since the functionality introduced in WDDM is Kernel-Mode, there is no chance this could be implemented into Windows XP unless a total rewrite of the XPDM is initiated. The reason for this is that developers don’t have access to the underlying hardware directly, only through the usage of APIs such as Direct3D or OpenGL. This conversion of XPDM, naturally, will not happen since Windows XP is being deprecated in favor of Windows Vista.

While there have been attempts at porting Direct3D 10 / DirectX 10 over to Windows XP, this will always continue to be the main problem.

Alternative Solution

Using Direct3D 10 as it is provided in Windows Vista in Windows XP is impossible. Yet there is a possibility to achieve the same graphics quality on hardware that supports it on Windows XP; by using the OpenGL API instead. OpenGL allows the developer to access the same functionality provided by Direct3D 10 by using so-called IHV provided extensions but that’s an entirely different article. Also, note that this would only provide the same features which Direct3D provides and none of the WDDM functionality unless you find a way to emulate the Kernel-Mode functionality in User-Mode in Windows XP.

Intel GMA 945 / GMA 950 thoughts

less than 1 minute read

Over the last week I’ve been annoyed with the capabilities of the Intel 945GM chipset. While this chipset is not widely supported in graphics development, it’s a common chipset that Intel has to offer that comes standard with a bunch of PCs. So I’ve unhooked my Graphics card and attempted to run some of my code through this GPU.

Direct3D seems to work fine, pretty fast too. Pixel Shader version 2.0 seems to be supported through hardware, and Pixel Shader 3.0 through a software device. Now, you’d expect that the OpenGL implementation would have the same capabilities, or at least Pixel Shader 2.0 through hardware.

Turns out that the OpenGL version on this device is OpenGL 1.4 with to my knowledge no support for fragment shaders (GL_FRAGMENT_PROGRAM_ARB). I wonder why this is. The hardware capability is available, why not make use of it?

Valve’s hardware survey at the time of this post still reports that 22,183 people out there have the Intel (ialmrnt5.dll) driver. If so many gamers are using Intel’s chipsets, you can expect the regular end user base to be much larger. Why not give them some updates? Please? :o)

New Year’s Update

less than 1 minute read

First of all, happy new year to you all even though it’s a bit late. Have some cake.

I’ve been keeping busy with some new “projects” lately, most involve OpenGL and Direct3D but more on this later when I have something to show or share.

Right now I’ve been disappointed with the stability of the new Visual Studio version, 2008. While there are some great new features for C++ programmers, my debugger seems to crash every now and then when debugging native code. I wonder if any of you out there have had the same problems…

Nevertheless, I like the new version and what its capable of concerning native C++.

Back to top ↑


Visual Studio 2008 Released to MSDN Subscribers

1 minute read

While Visual Studio was originally planned to be released in February of 2008, November 19th 2007 seemed like a better release date for Microsoft. MSDN Subscribers can already download the Retail versions of Visual Studio 2008 Professional, Standard and the Visual Studio Express editions through their Top Subscriber Downloads screen when logged on to MSDN.

At the moment downloads seem very slow (probably due to high network traffic) and connections might fail. Remember: because Microsoft is offering this through the Top Subscriber Downloads box, the downloads will open in an Akamai window instead of the regular Transfer Manager offered by Microsoft; this causes problems.

Click here to log into your MSDN subscriber Account

Coming Soon to MSDN Subscriptions – Visual Studio 2008 The next version of Visual Studio, Microsoft Visual Studio 2008, will provide an industry-leading developer experience for Windows Vista, the 2007 Microsoft Office system, and the Web. We expect to have Visual Studio 2008 editions available on MSDN Subscriber Downloads shortly after release. For a faster, more reliable download experience, please utilize “Top Downloads” below. All English Visual Studio 2008 editions will be available here first. Visual Studio 2008 editions also will be released—on a staggered schedule—to Subscriber Downloads. To find out more about the new versions, see the Visual Studio Developer Center. All English Visual Studio 2008 Editions will be available from “Top Downloads” below. Please utilize “Top Downloads” for a faster, more reliable download experience.

MSDN Blog post

OpenGL 3.0: Finally some news!

2 minute read

After waiting for a long time an update has been issued about the OpenGL 3.0 specification. While this is an update, there is still no specification but the promise that the OpenGL ARB is working hard on the spec is below.

You understandably want to know where the OpenGL 3 specification is. I have good news and some bad news. First the bad news. Obviously, the specification isn’t out yet. The OpenGL ARB found, after careful review, some unresolved issues that we want addressed before we feel comfortable releasing a specification. The good news is that we’ve greatly improved the specification since Siggraph 2007, added some functionality, and flushed out a whole lot of details. None of these issues we found are of earth-shocking nature, but we did want them discussed and resolved to make absolutely sure we are on the right path, and we are. Rest assured we are working as hard as we can on getting the specification done. The ARB meets 5 times a week, and has done so for the last two months, to get this out to you as soon as possible. Getting a solid specification put together will also help us with the follow-ons to OpenGL 3: OpenGL Longs Peak Reloaded and Mount Evans. We don’t want to spend time fixing mistakes made in haste.

Here’s a list of OpenGL 3 features and changes that we decided on since Siggraph 2007:

  • State objects can be partially mutable, depending on the type of the state object. These state objects can still be shared across contexts. This helps in reducing the number of state objects needed in order to control your rendering pipeline. For example, the alpha test reference value is a candidate to be mutable.
  • We set a minimum bar required for texturing and rendering. This includes:
    • 16 bit floating point support is now a requirement for textures and renderbuffers. Supporting texture filtering and blending is still option for these formats.
    • S3TC is a required texture compression format
    • Interleaved depth/stencil is a required format for FBO rendering
    • At least one GL3-capable visual or pixel format must be exported which supports front-buffered rendering.
  • OpenGL 3 will not have support for the GL_DOUBLE token. This means it will not be possible to send double precision vertex data to OpenGL.
  • A format object has to be specified per texture attachment when a Program Environment Object is created. This helps minimize the shader re-compiles the driver might have to do when it discovers that the combination of shader and texture formats isn’t natively supported by the hardware.
  • GL 3 will only cache one error, and that is the oldest error that occurred.
  • The OpenGL pipeline will be in a valid state once a context is created. Various default objects, created as part of the context creation, will have reasonable default values. These values are such that a simple polygon will be drawn into the window system provided drawable without having to provide a Vertex array object, vertex shader or fragment shader.
  • GLSL related changes:
    • GLSL 1.30 will support a #include mechanism. The actual shader source for the #include is stored in a new type of object, A “Text Buffer” object. A text buffer object also has a name property, which matches the string name specified in a #include directive.
    • Legacy gl_* GLSL state variables are accessible through a common block.

More details will follow soon in an upcoming OpenGL Pipeline newsletter.

Barthold Lichtenbelt
OpenGL ARB Working Group chair

A retrospective view of a 1996 Steve Jobs interview

3 minute read

I know it’s easy to sit back and criticize what someone said 11 years ago. That’s why I won’t criticize Steve Jobs for what he said, rather, I’d like to show the difference of what the prediction was and what the reality is at the moment - regardless of who said it.

On a side note: It doesn’t matter if you like Apple, Steve Jobs or any of the associated parties, Jobs is an incredible innovator and one of the great digital-minds of the 20th (and turns out 21st) century. In all honesty, I personally do not “like” Apple’s machines and Operating System but that doesn’t mean that I don’t like the innovation that they have brought about in the field of computing and computer software - it is simply mind boggling when you research it.

This blog post (remember that it’s an informal blog post) is a personal view of an interview that Steve Jobs gave to Wired Magazine in 1996 and was published online at Aether.com. Interestingly enough, 1996 was the year that Apple bough NeXT (Jobs’ company at the time) and informally hired Jobs back. This interview precedes those events. I’ll only pick things that are somewhat relevant to this site or that I find interesting; this is a blog, you know?

The desktop computer industry is dead

This will be the first thing that’ll pop out of the page. While at first this might sound like a ridiculous claim, you must place it in context with the entire section. For someone who was at the birth of Desktop computing, the 90’s might have seemed extremely dull in comparison to the 70’s and 80’s when many new things started to come into existence (The PC, CD-ROM, color displays, GUI, the Mouse, HDDs became cheaper, etc.).

When I went to Xerox PARC in 1979, I saw a very rudimentary graphical user interface. It wasn’t complete. It wasn’t quite right. But within 10 minutes, it was obvious that every computer in the world would work this way someday.

While this view was shared by competitors it has proven to be about 99% right. Almost every computer in the world works with some sore of user interface albeit underdeveloped. With the exception of pure Unix-based machines and low-level terminals, I can’t think of any other Operating System that doesn’t have an integrated GUI.

Objects are just going to be the way all software is going to be written in five years or - pick a time. It’s so compelling.

It took about five years for software developers to completely grasp Object Oriented Programming and to apply it correctly so in this regards Jobs was right. OOP has become the norm. While there are still many programmers out there that write procedural code, OOP has largely taken over — and that’s a good thing in most cases.

The Web is not going to change the world, certainly not in the next 10 years.

Jobs was a bit off here. While the dot-com boom didn’t change the entire world, it did change the way that we use and look at the web in most parts of the worlds. I can’t think of many countries that don’t have internet access or people that have never heard of the internet besides underdeveloped or oppressed civilizations.

I don’t see most people using the Web to get more information.

While I do see Jobs’ point (he mentions information-overload and the ability to process information) we only tend to gather the information that we really care about and massive amounts of it. For example, Wikipedia is one of the most active websites on the internet used daily by a massive amount of people.

As to what’s now known as e-Commerce:

I think we’re still two years away.

A bit too optimistic but pretty accurate. Again, the dot-com boom pretty much exploded e-commerce into our lives which happened around 2000-2001.

End thought: The thing that struck me most in this interview was the amount of expectancy in regards to technology that Jobs has. It’s something to think about. “Am I as an end-user the catalyst of innovation?” or “If I expect more, will I get more?” It should be that way but it often isn’t. Companies don’t really seem to listen that much to their customers with the rogue exception here and there. In the end Jobs seems to be pretty accurate with his predictions of the future I’d like to say more so than another software icon but then I’d just be trolling around.

Jobs on the topic of superior European washing machines:

I got more thrill out of them than I have out of any piece of high tech in years.

Re: Microsoft Open Source

1 minute read

Matthew Mullenweg at Photomatt.net “predicts” that:

Microsoft will Open Source Windows before 2017.

While I usually like Matt’s posts — I get them through the Wordpress control panel — I think that he might be a bit off this time. The Windows kernel is still under constant development and was derived from the DOS base architecture first founded in 1981.

This means that DOS is now 26 years old, almost 27.

Since MS-DOS hasn’t been released under an Open Source license I think it’s ridiculous to say that MS Windows will be releasing it under an O.S. license any time in the distant future — even with Open Source getting more and more popular.

An older product, BASIC which was first released on the Altair in 1975 (32 years old) is no longer being developed, is no longer being shipped with any Microsoft Operating Systems but has evolved in Microsoft’s Visual Basic / Visual Basic .NET. Products which in their own right have helped form products like C# and the Visual Studio product line. While you could get the BASIC source “code” (in patch point form), later binary versions of BASIC aren’t open and haven’t been opened up ever since.

While Microsoft gives you many tools to build upon the Windows Platform, I don’t think that Microsoft will open the source to Windows, not even Windows 1.0. I might be wrong — and I hope I am — but I got a pretty good feeling that current Microsoft CEO Steve Ballmer is more focussed on monetary rewards for him and Microsoft than anything else.

Source / Reference: Microsoft Open Source

Atom: a gem in the making

1 minute read

Timothy Farrar over at FarrarFocus.com is creating a unique game called Atom. The reason why I call it unique is that unlike many games out there the content for Atom is 100% dynamic which means that (for example) everything can be set in motion. Here’s a quote from Timothy’s post on GameDev.net:

Atom started with the idea to go back to PC gaming’s roots (low risk investment, experimenting with technology, fun timeless gameplay, taking a wild idea from concept to market), while taking advantage of the power of modern hardware.


The graphics engine is completely unconventional, 100% dynamic (no static geometry, everything moves), and based on an animated solid hierarchical cellular representation with an “animation bone” for each cell which is linked into a physics/CFD engine which gives life to the world. Rendering is done via a special purpose painters order micro-impostor compositing engine (old-school, not based on polygons!) which also provides realistic motion blur. Content creation is done with a mix of hand controlled procedural generation.

Due to Atom’s unique world representation, you can literally zoom into the molecular structure of anything, even on the inside. This also works in reverse, Atom is able to simplify any structure, and thus has infinite level of detail control. A custom visible surface determination algorithm eliminates overdraw allowing for both wide and telephoto views inside and side any structure no matter how sparse or dense the geometry.

Source: GameDev.net

The concept seems very promising, I suggest watching this project grow. Another thing worth mentioning is that the API used to generate the images is OpenGL, not DirectX. Timothy has posted on his blog that SM 4.0 will might be added to the engine. This is good news for XP users since there will be no need to upgrade to Vista if you want to try out this game.

Check out the Atom project here and watch the videos.

The State of DirectX 10

less than 1 minute read

Quite recently I released a small article discussing if you (as a developer) should upgrade to Vista to take advantage of DirectX 10 functionality only available in Windows Vista. Quite simply the answer was “yes” in my article. As a developer you should always take advantage of new technologies, specially if that technology will replace an existing technology.

HotHardware.com has released an article more aimed towards the end-user than the developer which discusses the State of DirectX 10. In this article both performance and image quality are evaluated to give a fair estimation.

It’s 13 pages long but worth the read, check it out at HotHardware.com.

id Software: John Carmack’s Response to OpenGL issue

less than 1 minute read

Recently I’ve created a post about how id Software will no longer use OpenGL as their primary graphics API for game development. Here’s John Carmack’s response to the rumors:

There is certainly no plans for a commercially supported linux version of Rage, but there will very likely be a linux executable made available. It isn’t running at the moment, but we have had it compiled in the past. Running on additional platforms usually provides some code quality advantages, and it really only takes one interested programmer to make it happen.

The PC version is still OpenGL, but it is possible that could change before release. The actual API code is not very large, and the vertex / fragment code can be easily translated between cg/hlsl/glsl as necessary. I am going to at least consider OpenGL 3.0 as a target, if Nvidia, ATI, and Intel all have decent support. There really won’t be any performance difference between GL 2.0 / GL 3.0 / D3D, so the api decision will be based on secondary factors, of which inertia is one.

John Carmack

This was posted as a comment on Slashdot.

idTech 5, Rage, and more in 3 Videos

1 minute read

Somehow I keep getting back on this topic. Maybe it’s because of the excitement that was involved with the features promised by the idTech 5 engine as presented in the earlier QuakeCon demo.

Today was one of those exciting days for me. I just finished watching a two part video commentary on the development aspect of idTech 5 that was posted on GameSpy. A third video is an interview with John Carmack on the changes that will be occurring within id Software and other issues. The two commentary videos feature commentaries by John Carmack and Matt Hooper from id Software.

Keep in mind that the “lag” that you might notice is because you’re viewing a technical demo of an unfinished product. Another thing that might be worthy to notice is that the OpenGL API is no longer being used as primary graphics API, yet the company is moving towards DirectX as their primary API.

The first video is presented by John Carmack and is about the development of idTech 5 and Rage. The backdrop for this video is pretty much continuous, so you might want to look away to avoid insanity. He speaks about graphics development, Enemy Territory: Quake Wars and other things that might be interesting to developers.

The second video introduces Matt Hooper as a secondary host and talks more about the tools and assets given to the level designers and artists in idTech 5. For an unreleased product, it looks amazing. There seems to be a great (if not massive) improvement over older tools such as GtkRadiant by having a more intuitive user interface. But you can judge for yourself below by watching the videos attached to this post.

The third video announces a new “game” or adaptation of the existing Quake 3 code base and create a free to download online game, hear all about it in the third video.

Edit: as of 2023, it seems that these videos have been lost to the ravages of time.

Way Off Topic: Internet Taxes, November 1st 2007

less than 1 minute read

If you’re an American citizen or resident and you’re not aware of this issue, keep reading. Otherwise, take action. Links follow.

The Internet is the “Information Highway.” It provides unlimited information, a myriad of free resources and some commercial resources. Due to an expiration of the “Internet Tax Freedom Act of 1998” we might be hitting some toll-plazas along our routes. If you do not feel comfortable paying taxes for free information, sign up at DontTaxOurWeb.org to take some action. If you want to do more, write your senator, but do it promptly. We’re almost at November 1st.

This could potentially be doomsday for many of us. The main thing that the tax would cause is a limit on information which would hurt everyone. Since a large percentage of Americans use the internet, it is imperative that we keep an international resource out of local hands.

At this moment there are many opposed to internet taxes in the senate but it will not hurt to petition and write your congressman or congresswoman. This needs to be fought, freedom of information is at stake.

id Software: bye OpenGL, bye Linux

1 minute read

John Carmack and the id Software company have always been great supporters of the OpenGL Graphics API. Alas, major development with the API stops here for the game developer.

id Software has been working on a new game engine that would “revolutionize” the gaming industry and provide many advanced features. One of its main features is that it can support a constant 60fps on console systems. It was also announced that their new engine will run on: PC, Mac, Xbox 360 and PlayStation 3. Eh, are we missing something important here?

Linux. Linux has always been a supported system when it came down to games from id Software. Yet according to Todd Hollenshead (id Software), id’s upcoming game “Rage” (which will be using idTech5) will be primarily a DirectX 9 game, not DirectX 10, nor OpenGL. Yet OpenGL will be used for the Mac release of both the engine and the game.

This could mean that OpenGL might become very unattractive in the game development community since there will be one less patron to support its Open cause.

One benefit from all this is that the game will be able to run on the Windows XP platform and not solely on Vista as all DirectX 10 games require. This, of course, is no consolidation for the Linux people who will now have to run the game on Windows.

DirectX 10: Is it worth upgrading to Vista for?

2 minute read

As a developer (and gamer) you always want the latest gadgets and DirectX 10 seems to be one of these gadgets that you just “need to have”.

But does it justify spending much money for an upgrade?

What does DirectX 10 have that DirectX 9 doesn’t? According to some technology demos - not so much. Ok, some special effects but what about the rest? A game isn’t made out of SFX (although it seems to become a trend).

It turns out that DirectX 10 isn’t only about special effects but defines a new style of next generation technology. Video Card manufacturers are forced to use optimized pathways to support the new industry standard resulting in very fast hardware such as the Geforce 8 series (8800 GTX, 8800 GTS).

One of these features is WDDM which stands for Windows Display Driver Model. WDDM is basically a resource manager for graphics processes. One example of what WDDM does is this: In XP when you switch from one Direct3D application you will receive a DEVICE_LOST exception, which basically means that you can’t run two processes from one GPU. Your application crashes and you’ll have to write X amount of handlers dealing with the exception. According to Microsoft this is now a thing of the past.

Since the Vista desktop is a 3D environment you’d loose your application everytime you minimize. This has now been eliminated. Each GPU process is its own thread (just like in regular programming) meaning that you can have X amount of 3D processes running without the need for special handlers. Also in the same category is improved crash handling that comes with DirectX 10.

Ok, so that’s neat but I’ll need more to be convinced to switch to DirectX 10 hardware and Windows Vista.

Another feature of WDDM is that if you run out of video memory WDDM can virtualize your System’s memory for video processes. Which - in theory - sounds very cool, but I don’t know if this would cause slowdowns.

Here’s a list of new features

  • Shader Model 4
  • Texture arrays
  • DirectSound is gone, XACT is its replacement
  • Less load on the CPU - GPU tasks really get processed by the GPU this time
  • Unified Pipeline Architecture - the Programmable Graphics pipeline (SM 4.0)
  • No object limit - There is no software limit to how many objects you can add to your scene. The only factor in this is your graphics hardware
  • Geometry Shaders
  • Instancing 2.0 - An optimized version of the Instancing technology found in Geforce 6 series up and Radeon 9500 and up

So as a developer is it worth it to upgrade to Vista and DirectX 10 hardware? In my opinion, yes. This is simply the new generation of computer graphics, just because you have to upgrade doesn’t mean is’t evil.

Remember when you upgraded from your TNT 2 card to a Geforce? Same thing. Yet this time the improvements revolve more around the pipeline than the actual quality of the image.

Programmer’s Block

less than 1 minute read

I guess writers have this, but now I have it with coming up with new programs. I just can’t think of anything. I’ve been wasting my time reading many programming books on Agile, Design Concepts etc. but that didn’t give me any ideas either. Some knowledge, yes, but inspiration, no.


Google Music Trends

less than 1 minute read

Google Music Trends

This is probably one of the coolest ideas that I’ve seen on the Internet in a loooong long time. Google Music Trends is a small program that you download that interacts with your music player and uploads statistics to Google. At the moment the most listened to song is “In the end” by Linkin Park. Of course this has to change ;)

Again, participate!

ATi too slow or NVIDIA too fast?

1 minute read


In November of last year, NVIDIA released its latest flagship graphics card chipset, the 8800 / G80. This chipset featured the first full featured DirectX 10 support ever conceived and was (still is at the moment) the only DirectX 10 card on the market.

So when will the other giant, ATi, catch up? According to rumor, ATi is planning to release its latest chipset (R600) in the first quarter of 2007, more precisely an early March launch.

But did ATi push its launch too far back or did NVIDIA jump the bullet on this one? Some say that ATi is holding back for a reason so they can improve their technology and beat NVIDIA performance wise. Others say that ATi didn’t expect NVIDIA to launch this early and is trying to throw together a product too fast. The latter, I personally don’t believe.

ATi has been a major player in graphics technology for a while, so it would be a strange decision to underestimate DirectX 10 and continue focusing on their X1900 technology. I think we can safely assume that ATi is preparing its product to perform to the fullest and maybe be waiting for better software support in Vista - something that NVIDIA has been lacking.

Also, what good is a DirectX 10 card if there are no DirectX 10 games out yet? Again, some say that the 8800 is simply “the best DirectX 9 card out there that happens to have DirectX 10 support.” Yet according to hardware tests on TomsHardware.com, the ATi X1950 XTX stands above the card with full head and shoulders.

So what can we expect in the near future from these two graphics giants? In my opinion (Nostradamus style), ATi will launch the R600 chipset and will make the G80 look like something from 1999 performance wise. The 8800 GTX will get a successor soon enough that will compete with the R600 and I think that ATi will get you more value for the money, as is happening with all AMD and ATi products lately (same company).

I was eagerly looking into buying a G80 or 8800 but I have a feeling I’ll be regretting it within the span of one month. After all, the G80 is already 4 months “old”.

Back to top ↑


Microsoft.com’s Recent Update

less than 1 minute read

Conforming with the Ajax/Web 2.0 trend, Microsoft has updated their Microsoft.com homepage to a sleeker looking page stuffed with DHTML goodies. Yet as with most media-rich websites it’s very slow on older computers (probably the one you have in your office also ;) ) so it becomes quite tedious to navigate through.

One good thing about all this is that the website works well in Firefox, you’d think they’d screw it up but they didn’t. Gotta give some kudos for that one.

What the new page comes down to is a roll-over navigation system to the left side of the screen, and less links as before if I see correctly. Apart from the homepage, nothing has changed, except that instead of going to the http://www.microsoft.com/ page you get redirected to http://www.microsoft.com/en/us/default.aspx which has no PageRank and I doubt the search engines will like a 302.

Microsoft.com’s new DHTML layout.

Another Saturday: Firefox, Zune and more

less than 1 minute read

First Alpha release of Firefox 3

And you can get it: Here from Mozilla.org if you’re interested in trying it out. I am, I’ll report on it later.

Zune Again

I was actually wondering if anybody has actually seen a “Zune” since the introduction on November 14th this year. I haven’t, and I’ve seen one commercial so far on the TV. Even on the internet, I haven’t seen many things yet (or maybe I’m just on the wrong sites). I have some colleagues that didn’t even know what “a Zune” is and didn’t bother to find out.

Nintendo Sued

A company named Interlink has sued Nintendo over the type of remote the Wii is using. interlink claims to have a patent on the motion technology, yet ArsTechnica claims this is not entirely true. I think that Interlink knew that Nintendo was going to use this technology long ago but just waited for the actual release so they could get lots of money out of law suits. Dontcha love how money works? ;) src

Microsoft’s Autumn Marketing

1 minute read

Is it me or has this last season been the most productive one at Microsoft in a long time? First we get the new version of the DirectX SDK and now we finally have the final version of Internet Explorer 7, not to mention the plethora of CTPs that came out the last couple of weeks..

So, what’s going on? More marketing on MS’ side? Let’s hope so since free software is great - even though most products expire next year and it’s not free in the manner of beer and speech.

Still, allowing everyone to become a “beta-tester” is a great marketing strategy. People use the products for almost a year, become dependent on it and will have to buy the product when in comes out since the CTPs expire.

Take Windows Vista RC1 for example. This version of Windows is freely download-able but will expire on June 1st 2007. For home-users this is a great way of getting a Next Generation operating system for free and even be able to work with it for quite some time. By using CTPs/Betas you are not limited in saving files etc, there’s simply a time period - similar to trial software. Now, June 1st 2007 - Vista expires. You’re stuck with your CTP and all your important data on your hard-drive. Your copy of windows has expired and the only way to get back in is to buy Vista/License key.

Now that’s how you sell products — by creating a dependency.

MSDN Event Boca Raton Review: 10/17/2006

3 minute read

Today me and one of my co-workers (not my boss as I announced earlier) went to the MSDN Event in Boca Raton. This was my first time at one of these events so think of this post as a first-timer. There were three sessions discussed at ther Event that I’d like to go over with you.


Because me and my colleague were at the Event a tad early, we were treated with a couple of tracks from Jethro Tull’s live album at the Isle of Wight. Always nice. These tracks were chosen by our presenter. We also watched some Microsoft propaganda from http://www.escapeyesterworld.com/ .. it was funny though. Our presenter was Mr. Russ Fustino, who introduced himself to the crowd in person wearing a yellow hard-hat and red suspenders while his theme-song (yes, a song bout Russ, not by Jethro) was playing in the background. Unconventional? Maybe. But it’s an attention-getter for sure.

Session 1: Visual Studio Team Edition for Database Professionals

After all that stuff it was time to get down to business and absorb information — after all that’s what we came for. Visual Studio Team Edition for Database Professionals is a nice integration of Database accessibility into Visual Studio 2005. It looked fairly simple to set up a new database from within Visual Studio and some features were very nice. Features such as the ability to rename a table in MSSQL and automatically rename all its references in Stored procedures etc without losing Data. I guess this could be called Recursive renaming or something similar. Another striking feature was the ability to compare changes side-by-side in a Visual Studio window. This product could really save some time and money on a large production scale.

Session 2: Windows Workflow Foundation

Windows Workflow Foundation (WF for short) is a layer in the .NET 3.0 Framework and got a Visual Studio extension in which you can create/define applications from a diagram view. Similar to the Class Diagram tool in Visual Studio yet think bigger and more objects to drag and drop. Mr. Fustino Slapped together an asp project from which he called the xoml (same as xaml, different extension) file in which he made a litte if/else diagram to show how the extension works. I can honestly say that I didn’t see the benefit of having this ability. Maybe it’s the type of company I work for but most of it seemed quite redundant to me. Each object that you drag into the diagram holds code and from what I saw, the code beneath the if/else function was stored in its own functions which seemed strange. I’ll have to look more into this program to actually understand its benefits. Please note: I’m not bashing the program/functionality just not sure about its usefulness.

Session 3: Expression Web

All I saw of this presentation was “Expression Web Designer” which is the tool marketed as “similar to Dreamweaver” yet more similar to say.. FrontPage yet including ASP.NET support. Not long after the presentation began I got the gist of the program and became rather scared for Russ’ Safety while he was presenting a designer’s tool to a room filled with Software Developers. Though this tool I am sure about: a waste of money. People already had FrontPage, Dreamweaver and many more wysiwyg tools, no need for more. Expression Web Designer claims to be a standards compliant tool.. Like the Microsoft browser? Hm.


Now, one tool in the Expression package seems interesting which is the “Expression Interactive Designer”. I didn’t see it in action but I will install the CTP to my machine tonight and might make a post about how it is later this week. Regardless of the software, Russ Fustino was a great presenter who was fun to listen to and watch. Kudos for that.

500 Google IPs

less than 1 minute read

Here’s a list of 500 IPs which belong to none other than Google, just add http:// in front of them and you’re all set for whatever you use them for.

List redacted.

Zune to be here on November 14th

less than 1 minute read

Microsoft’s answer to Apple’s iPod will hit the U.S. market on November 14th as announced on the Microsoft.com website. The player will feature a 30GB hard drive, a full color display but annoyingly pre-loaded content such as music, short films and pictures. The music player will be sold for $249.99 a pop and will be available with many expensive addons and accessories. Below is an image of the music player courtesy of Microsoft’s press room.

Google’s 8th birthday

less than 1 minute read

Google is celebrating its 8th birthday today. For the occasion they’ve changed the logo:

Google 8th Birthday

Can you believe it’s been 8 years? Or do they count from the spawn of “Backrub”? Happy B-Day anyway, Google.

OT: Storm

less than 1 minute read

Wow. I was just outside for lunch and I saw this humongous stormfront coming in. It was sunny on the way to work and literally where my job is located a big shadow struck the floor and pitch-black clouds came rolling in. Kinda reminded me of the scene in the new War of the Worlds movie where the first bolts of lightning strike the planet. I have a picture of it on my phone but I don’t have a USB-cord :|


The blue dot is me in Boca Raton and the Purple dot is my wife in North Lauderdale. Looks so tiny on the map ;)

Pirates 2 - Dead Man’s Chest

less than 1 minute read

Last night at 12:01 AM Pirates of the Carribean: Dead Man’s Chest premiered to the public throughout the country. So my wife and I went to see it since we were big fans of the original movie. I have to say that this movie is BIG, I mean huge in production. The special effects, the acting and the scenery are all incredible. Johnny Depp’s performance was incredible and Orlando Bloom topped himself on this one. I can’t go in to details about the movie here since I’d spoil it for everyone, but the end of the movie was strange. Not at all what you’d expect from a movie like this. Anyway, go see it. If you liked the first one, you won’t want to miss this part of the series.

WTF Sony?

less than 1 minute read

Racist Billboard

Just.. Wow. The nerve of this company. To celebrate the coming of a white PSP, Sony has launched this Ad-Campaign in my home country of The Netherlands. The reason for this is that there is a much smaller population of black people than there than other European countries. What I don’t understand is that the Dutch government let this through their census. Certainly NL couldnt have changed that much since I’ve left? WTF Sony and Netherlands?!

Five that Fell

less than 1 minute read

King's Quest

The good people at Next-Gen.biz released an article yesterday about five great companies that fell into the clutches of nothingness. If you’ve always wondered what happened with the companies that made classics such as the Wing Commander Saga, King’s Quest and Ultima Online, check this highly reccommended article out. :)

Next Generation - Culture: Five That Fell

PS, their server seems to be under a big load so there might be a little time-out before you reach the actual page.

Riemer’s DirectX 9 Tutorials

less than 1 minute read

I’ve always had a thing for 3D and CG. So when I started programming most of my findings were either graphics or web related. More recently I’ve been delving into C# making tiny applications to connect to MySQL, rename files and an entire CMS from the desktop. But the CG world keeps having a magnetic pull on me so the last couple of months I’ve been trying out Managed DirectX in the C# programming language. Anyway, what this post is about is that there’s a great place for tutorials on this matter (C# and C++) written by Riemer Grootjans of riemers.net. This website is a very complete collection of DirectX and D3D tutorials, so go check them out here:

DirectX 9 Tutorial using C# and C++ > General > Overview

Netherlands win against Ivory Coast

less than 1 minute read

While listening to the 2nd half of the game on the radio I almost bit my fingers off in excitement. With 2-1 on the scoreboard one single goal by Ivory Coast could ruin my joy. I think the game could have been played better in terms of Goal-Count but we won nonetheless. Now I just wait until next wednesday when the Netherlands play Argentina, a game that I wouldn’t want to miss since my manager is from that country. It’s nice to have an immigrant-competative spirit at work, keeps me from falling asleep ;)

AJAX: Dictionary Search

less than 1 minute read

Much like a suggestive search I’ve created a relatively small application to search through a 1.2MB Dictionary file which is delimited by line-breaks (\n). This example updates the contents of a div container on each keystroke. For this example the prototype framework, a dictionary file from winedt.org and PHP as the actual Server-Side parser were used to display the results. If you want to see the entire code and how to call the objects, right-click on the example page and click on “view source”, the PHP and JavaScript Sources are displayed below.

PHP Code:

// removed unsafe code

Simple PHP code link this could easily be adapted to retrieve results from a SQL database or an XML file.

You may get the JavaScript and HTML source by right-clicking on the page and viewing the source, it’s all open.

Link removed.

AJAX: Simplified beyond belief with Prototype

1 minute read

Before reading this I assume you know your JavaScript.

Creating your own AJAX slash AJAH handler in JavaScript can be a huge pain in the neck. For those who have been struggling with AJAX for a while there’s an easy way out. Its called “prototype” a JavaScript framework that aims to ease development of dynamic web applications. And that’s a direct quote from prototype.conio.net. AJAX is not the only thing that prototype handles, it also eases regular operations such as the document.getElementById(’myeElementId’); by simplifying it as $F(’myElementId’);.

Now, for the AJAX part in which we are all interested. Let’s say you have a div container like below:

<div onclick="myMakeRequest('myElement');" id="myElement">
My Container

Which onclick is going to find the function makeRequest which in turn will replace the innerHTML property of this particular div (myElement) with the AJAX response.

Normally when generating your own AJAX-code you’ll be creating xmlHTTPRequest, probing browsers etc, etc. Prototype simplifies this by giving you something like this:

function myMakeRequest(elementId) {
    var url = 'my_file.xml'; // Your XML file
    var Ajax = new Ajax.Updater({success: elementId},url,{method: 'get'});

The good thing about this method is that your page or your .js file isn’t humongous in filesize. The thing that isn’t so great about it is that the prototype library is 54KB in size which could make your page quite slow qua loading time on a slower connection (non-broadband).

Still, it’s easier than coding it all yourself, I mean; what’s the point in reinventing the wheel? Especially a well-formed wheel. Below follows the entire code that will display the example given above.

<script src="prototype.js" type="text/javascript"></script>
<script type="text/javascript">
    function myMakeRequest(elementId) {
        var url = 'my_file.xml'; // Your XML file
        new Ajax.Updater({success: elementId},url,{method: 'get'});
<div onclick="myMakeRequest('myElement');" id="myElement">
    My Container

Sources and Requirements:

Back to top ↑