Flattening Multidimensional Arrays
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 all 395 wordsCriticalSection wrapper class
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 all 419 wordsPreliminary view of DirectX 11
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 all 182 wordsDon't worry, it's just a warning.
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.
Read all 123 wordsOpenGL 3.0 - 1 hour after
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.
Read all 215 words
OpenGL 3.0 Specification - August 2008
It’s here, (Edit: It’s official) haven’t read it yet but here it is:
The OpenGL ® Graphics System: A Specification (Version 3.0 - August 11, 2008)
Link to the registry containing the link
Let me know what you think of it, thanks nosmileface!
NVIDIA to Release OpenGL 3.0 Drivers September
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:
Read all 163 wordsGeforce GTX 200 Series Announced
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″
Read all 123 wordsDirectX 11 @ NVISION 2008
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
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.
Read all 222 words