Creating a Window Wrapper Class: Redux

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 the rest of this entry »

The Bookshelf

Added a new page to the site called The Bookshelf, which contains all of the (programming) books that I currently have within hand’s reach. You can check it out here.

In other news, the blog has moved from blog.scriptionary.com to scriptionary.com, which means that I’ve removed the main site and all of its contents. I’ll repost the things worth reposting from the old site right here.

A High-Resolution Timer for Win32

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 the rest of this entry »

WebGL: OpenGL ES 2.0 for the Web

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.

The WebGL logoOne of the only areas that didn’t have hardware accelerated 3D graphics up to this point was the web browser. There have been many talks about 3D browser graphics throughout the years and many more plug-ins, but nothing concrete or long lasting. This is about to change with the development of WebGL, which is a library based on OpenGL ES accessible through ECMAScript (which is basically a fancy name for JavaScript).

Yes, you’ve read that correctly: you’ll be able to use hardware accelerated graphics through JavaScript.

This opens up a myriad of possibilities for online games that were previously almost exclusive to Adobe Flash, which is a proprietary platform and requires a browser plug-in. WebGL on the other hand will be as native to your browser and as standardized as HTML, CSS, or JavaScript. And being based on OpenGL ES, you’ll have access to all the goodies that come with it such as Buffer Objects (VBOs, etc.) and GLSL shaders.

The WebGL context will be bound to the HTML 5 <canvas> element, which will serve the exact same function as a device context in OpenGL — you pretty much can’t get more generic and platform independent than that.

Currently, a widely supported WebGL implementation is still in the future but it’s coming closer by the day since we already see implementations in the beta versions of Firefox 4 and Google Chrome 5. This means that if you’re interested in WebGL and want to get an advantage, you can already pick up a copy of on of these browsers, read the draft specification, read some documentation and tutorials, and start building WebGL applications.

There are already a few (very impressive) examples out there showcasing the potential of WebGL, I’ve listed a few below and if you know any more, drop a link in a comment.

Counting Processor Cores and Threads

Wafer showing many Intel Nehalem cores
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++.

If you have the need to count cores, or if you wish to determine if the system running your program is multicore, this snippet can come in handy.

By “counting threads” I mean counting the logical processors present, since Hyper-Threaded processors may display multiple logical cores per physical core — counting these is the tricky part.

Read the rest of this entry »

First Public Larrabee Demo

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

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

DirectX 10 Logo
Yeah, I don’t have the DX11 logo yet…
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.

« Previous Entries Next Entries »