Posts Tagged ‘Cplusplus’

OpenGL: Configuring GLFW and GLEW in Visual C++ Express

Click here to read OpenGL: Configuring GLFW and GLEW in Visual C++ Express

This post shows how to configure Visual C++ Express 2010 with GLFW (version 3.0.1) and GLEW (version 1.9.0)[1].

There are many tutorials on the internet that explains how to configure Visual C++ Express with those exact same libraries[2]. However, this one focus on how to proceed with this setup while avoiding copying any of the header and library files to the Visual C++ Express installation folders, system folders or the Windows SDK folder.

To put it into a summarized manner, all you have to do is to download and install the Visual C++ Express; download and extract the GLFW and GLEW binaries; create a project; configure the project so it can locate the GLFW and GLEW header and lib files; and initialize and use both libraries in your application.

Therefore, this tutorial is divided into 8 parts: (more…)

Android: Use ccache with Android NDK on Cygwin

Click here to read Android: Use ccache with Android NDK on Cygwin

This Android tutorial explains how to set-up ccache to work with the NDK on Cygwin environments. Ccache is a great tool that detects unnecessary code recompilation by comparing the current source compilation with previously cached results, thus reducing the time it takes to complete. The support for ccache has been officially added to the 7th revision of the NDK.

The instructions in this posts have been tested on Windows 7 Ultimate 64 bits and Windows 7 Home Premium 64 bits, using Cygwin 6.1, Eclipse 3.5.2 and obviously, Android NDK r7. The commands to compile Android native code are from this post. (more…)

Squares, an openFrameworks application

Click here to read Squares, an openFrameworks application

This is a video from my first try to do something interactive using openFrameworks. It has been quite a learning experience. Capturing and detecting motion from a single webcam isn’t as straightforward as it appears to be.

Luckily, openFrameworks already comes with the OpenCV add-on, that makes things much easier when it comes to background subtraction and blob detection. Before that, I was trying to make my own camera movement detection based on a defined color range. It didn’t work well enough to make a video of it and it didn’t work at night, being that it was extremely susceptible to light condition changes. Using the OpenCV add-on was just a matter of choosing the background subtraction algorithm and using the blob detection at the processed image.


Configuring openFrameworks add-ons in Codeblocks

Click here to read Configuring openFrameworks add-ons in Codeblocks

At some point, when using openFrameworks to create interactive applications, one needs to use some of the bundled add-ons. This post will explain how to configure your Codeblocks project to use these add-ons and how to include the OpenCV add-on to your project. Before continuing, you should know there is an automated tool that helps the programmer in this process, specially designed to easily configure openFrameworks projects and add-ons at Google Code: ofcodeblocksplugin (official forum thread here).

Differently from this tool, this post explains on how to manually include the add-ons to your openFrameworks project. The process described here was done using Codeblocks 10.05 and openFrameworks 0.62 on a computer running Windows.


New Project: ‘Interactive Squares’

Click here to read New Project: ‘Interactive Squares’

Finally, a new project! It’s been a while since a post was published in this section of the website.

This is a project I’ve being developing, and will be called ‘Interactive Squares’ for now. It’s basically a interactive piece that is being created using the openFrameworks toolkit.

I have started this project using ActionScript, but thought it could be much more interesting if the user used a webcam for the input.

The application consists of a group of gray squares that are repelled each time the element that is controlled with the mouse collides with one of them. A gray square only returns to its original position after the black one is at a certain distance from it.

So, here’s a working prototype made with Flash: (more…)