Greetings, fellow programs!

Hello, my name is Kevin Harris and I welcome you to CodeSampler.com... home of the simple sample! This website is devoted to 3D game and graphics programming using DirectX and OpenGL. Here you can find and download source code samples and tutorials written in languages such as C++, C#, Python, and Lua, which I think will be very helpful to anyone wanting to program and design their own games, games engines, or level editors.

This site also specializes in comparative source code samples which help demonstrate the differences between Microsoft's Direct3D API and OpenGL's API. These special samples are very useful for programmers who find themselves needing to port their code from one API to the other since they allow a developer to leverage his or her knowledge of one API to learn the other much faster.

Google
 
Web CodeSampler.com

11/13/07

Two new and highly useful, user-submitted samples have come in this week... or should I say last week since I'm so very lazy! Any way, one demonstrates High Dynamic Range Rendering with OpenGL and the other is a DirectX 9.0 port of the popular Volumetric Lines sample which I, in turn, ported from an nVIDIA sample.

  

08/08/07

Before I forget, here's two new samples which are the results of my current research. One demonstrates how to use the new geometry shaders and the other tackles the confusing world of multisample transparency.

  

07/17/07

Again, I would like thank Christoph for submitting another fine sample. This particular little treat comes in two flavors: the ever desirable, super cool per-pixel version of reflective environment mapping and a slimmer per-vertex version for those of us who often have to choose frame-rate over eye-candy.

06/12/07

I would like to thank Christoph Kabek, a Software Engineer living in Germany,  for submitting a great new OpenGL/Cg sample covering the topic of Reflective Bump Mapping.

It doesn’t take much Googling to see that good beginner-level samples on this topic are hard to come by.

02/27/07

In an effort to test new waters, I've created two new samples targeting the new XNA Game Studio. The first one is as simple as you can get and does nothing more than initialize the framework while the second sample jumps straight to loading a 3D model for viewing. Both samples are available below. Try to guess which one is which!

    

Please note, you'll need to install the latest DirectX SDK, Visual C# Express, and the XNA Game Studio SDK to compile and run these samples. But I must warn you, with a dial-up connection this will take you roughly a bazillion years or until the Sun burns out leaving the Earth a desolate and uninhabitable dirt ball!

Now, If you don't have that kind of time, you can just stick with the OpenGL samples and try out this new one from Tomas Dirvanauskas, which demonstrates how to perform vertex animation using VBOs.

01/30/07

New C++ template samples have been added to the Miscellaneous Source Page and all of the Python samples which demonstrate how to extend and embed Python using C++ have been updated to Python 2.5 and Boost 1.33.1.

Also, a Linux friendly version of Andrea's latest sample has been added for all of you Linux hackers.

01/08/07

As if Andreas's first z-fail shadow sample wasn't good enough, he gives us a new and improved version with soft edges.

More Site News...