Posts Tagged ‘OpenGL’

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 OpenGL: Get the ModelView Matrix on Cupcake (1.5)

Click here to read Android OpenGL: Get the ModelView Matrix on Cupcake (1.5)

One of the most annoying things when developing apps with OpenGL in Android 1.5, is the fact that there’s no access to the ModelView or the Projection matrices. It is not possible to call the glGetFloatv function because it wasn’t implemented until OpenGL ES 1.1, which isn’t available in the Cupcake versions. So, how to get the ModelView matrix on Android 1.5? The first thing you are going to do is grab these three classes: MatrixGrabber, MatrixStack and MatrixTrackingGL. All of them are inside the API demos, under the package com.example.android.apis.graphics.spritetext.

Matrix Classes Image

You're going to need these.

(more…)

Android OpenGL: Texture from Canvas

Click here to read Android OpenGL: Texture from Canvas

Another post about Android programming, although this time, it’s going to incorporate some OpenGL techniques. The code below shows how to draw a Canvas into a Bitmap, and then, load it as a OpenGL texture object. This means that it is possible to use all Canvas methods to draw into a texture, like drawCircle(), drawPoints() or drawText(). This is useful to render text to a texture and to dynamically generate textures.

So here’s the code: (more…)