Use signtool.exe with a Windows Batch Script - Code Sign an EXE
I recently needed to use signtool.exe from a Windows batch script. Here is a basic script for signing binary files. It demonstrates batch script commands for setting and using variables and also changing directories.

Signtool is included with Visual Studio 2005 - 2010. For a complete list of signtool.exe commands and options visit the MSDN page.
Neural Networking Demo: Lawn Mowing Agents Cut Grass
Train a group of lawn mowers how to cut the grass. Lawn mowers randomly move in the training area. Mowers that cut the most grass are mated with other high scoring mowers for the next generation.

This is an older binary demo I developed when studying neural networks. Requires DirectX 9C and Windows >= XP.
OpenGL GLSL Shader Container Class in C++
Here is an OpenGL shader class using ARB extensions. Two versions for Windows and OSX. Class supports creation of GLSL objects from file or character array. Set common uniform variables like int, float, and matrices.

Note: The class sets uniform textures using a gl texture class called gll_texture which is not included in the download.
Implementing Adobe® Photoshop® Blend Modes in C/C++
Photoshop layers are combined using a variety of default blending modes. Here you will find C/C++ implementations of the Photoshop blending functions.

Each inline function takes base and foreground channels, and also an opacity value, then returns the blended channel. View the C/C++ source or download the zip file.
Picking Alpha Tested Geometry with Microsoft® Direct3D
Alpha tested geometry (foliage, leaves, etc.) can be selected with the mouse, ignoring invisible pixels, by first rendering a color (pick) map where each pixel is a node index encoded color then by picking the pixel in texture-space and decoding the node index.

This method allows for the selection of 256^3-1 (16,777,215) nodes. View the C++ source.
Mouse Point Ray Picking using Microsoft® Direct3D
Source code demonstrating the conversion of mouse coordinates to a 3D ray for picking Direct3D objects using functions such as D3DXPlaneIntersectLine.

This is done by creating a pick ray in screen space then transforming it into world space using the inverse view matrix.

View the C++ source or download the zip file.
OpenGL Programming on Mac OS X using C++ and GLUT
A simple framework for developing OpenGL applications on Mac OSX. Using GLUT the application provides functions for drawing frames and processing keyboard input. A GCC makefile is included.

View the C++ source and makefile or click below to download the zipped files.
SSE Tutorial - A Beginners Guide to Streaming SIMD Extensions
SSE is a collection of 128 bit CPU registers. These registers can be packed with four 32 bit scalars after which an operation is performed on each of the four elements simultaneously.

This is an introduction to the SSE instruction set. Source code demonstrates common 3D vector operations using SSE and inline assembly with Visual C++.
The PHP Color Rotation Function used on $this->Page.
The PHP function used to rotate the text color for each entry on this page is available for download.

The function starts with predefined static RGB values. For each call to rotate_color() the values are incremented and converted to a hexadecimal string which is returned.

Download the zipped PHP source below.

Copyright © 2014 Neil Kemp ( argbz )