If you are looking for the OpenGL ES 3.0 Programming Guide sample code, you can find it at http://github.com/danginsburg/opengles3-book/ . This repo contains the sample code from the OpenGL ES 2.0 Programming Guide. This was originally hosted on Google Code, but was migrated to GitHub due to the shutdown. The build instructions are provided below. This information is likely to be quite out-of-date. Please see http://github.com/danginsburg/opengles3-book/ for more recent updates.
The sample code from the book is available for the following platforms:
In order to be able to build and run the code samples, you will need:
Please checkout the source code from the subversion repository by doing:
svn checkout http://opengles-book-samples.googlecode.com/svn/trunk/ opengles-book-samples-read-only
The iPhone projects are located in the /iPhone
directory.
Instructions for building and using the samples are in an e-Chapter on the iPhone 3GS available for download in PDF format from this link: http://www.opengles-book.com/OpenGL_ES_20_Programming_Guide_iPhone_eChapter.pdf.
In order to be able to build and run the code samples, you will need:
You will need to download and install the following:
In order to build and run the code samples, you will need
RenderMonkey
example workspaces, you will need to download and install RenderMonkey
v1.81. This tool can be downloaded from AMD Developer Central at http://developer.amd.com/gpu/rendermonkey/Pages/default.aspx.All of the code samples and RenderMonkey
workspaces can either be checked out from the opengles-book-samples subversion tree or downloaded from the following link: http://www.opengles-book.com/OpenGL_ES_Programming_Guide_v1.0.2.zip.
RenderMonkey
samples, Till Rathmann posted a workaround over at the AMD Developer Forums at the following link (7/26/09).OpenGL_ES_Programming_Guide_v1.0.1.zip
to its own folder or checkout the opengles-book-samples project from subversion.C:\program files\AMD\OpenGL ES 2.0 Emulator v1.1\bin
to the \Bin
folder:
C:\program files\AMD\OpenGL ES 2.0 Emulator v1.1\lib
to the \Lib
folder:
\Lib
folder:
OpenGL_ES_Programming_Guide_v1.0.1.zip
to its own folder.C:\Imagination Technologies\PowerVR SDK\OGLES2_WINDOWS_PCEMULATION_2.02.22.0756\Builds\OGLES2\WindowsPC\Lib
to the \Bin
folder:
C:\Imagination Technologies\PowerVR SDK\OGLES2_WINDOWS_PCEMULATION_2.02.22.0756\Builds\OGLES2\WindowsPC\Lib
to the \Lib
folder:
C:\Imagination Technologies\PowerVR SDK\OGLES2_WINDOWS_PCEMULATION_2.02.22.0756\Builds\OGLES2\Include
to the \Common\Include
folder (overwriting the existing headers).The WebGL sample code is available from the opengles-book-samples subversion repository.
svn checkout http://opengles-book-samples.googlecode.com/svn/trunk/ opengles-book-samples-read-only
You can also view the WebGL sample code in action at http://www.opengles-book.com/webgl.html.
I have ported most of the samples to Java on Android 2.2. As of this writing, the emulator does not support OpenGL ES 2.0, so you will have to run the samples on your Android 2.2 device. The code is available in the subversion repository in the /Android
directory.
To build the code using Android SDK API 8 (or greater), in Eclipse:
That's it. You should then be able to run on an Android 2.2-device (I have tested them only on the Motorola DroidX, let me know if there are problems on your device).
The Linux versions of the examples have been tested to run against Ubuntu Linux 11.04, 11.11 and Fedora Linux 15. Before trying to compile the source make sure the development environment is set up correctly. To do so, run these commands based on your operating system:
Ubuntu 11.04/11.11:
sudo apt-get install make gcc libgles2-mesa-dev
Fedora 15:
su -c "yum install make gcc mesa-libGLES-devel mesa-libEGL-devel"
Note that you will need superuser rights for the environment you are operating in.
Once the development environment is setup, compiling of the examples is done using the included Makefile. Type:
make
and the process should be completed automatically. Final executables for each example are stored in the subfolder tree. The compiled executables are runnable from their respective places.
The examples are compilable with any Linux/X11 based operating system, which can provide needed requirements. The exact requirements would be development headers for EGL and GLESv2. Those can be obtained from khronos.org directly. Another thing are the EGL and GLESv2 runtime libraries. Those files would be platform specific, and in that case it is suggested to contact your platform vendor for obtaining those. However, majority of the linux distributions are shipping Mesa, which includes GLESv2 and EGL implementations. For these examples the Mesa solution is sufficient, even without hardware acceleration enabled.
The examples have been test driven with following configurations:
Please see the README.md file in the Blackberry folder of the source tree for instructions on installing and building the samples for the Blackberry Native SDK.