Game Development Reference
In-Depth Information
6
Unifying OpenGL ES 3
and OpenGL 3
In this chapter, we will cover:
F
Unifying the OpenGL 3 core proile and OpenGL ES 2
F
Initializing the OpenGL 3 core proile on Windows
F
Initializing OpenGL ES 2 on Android
F
Unifying GLSL 3 and GLSL ES 2 shaders
F
Manipulating geometry
F
Unifying vertex arrays
F
Creating a wrapper for textures
F
Creating a canvas for immediate rendering
Introduction
No doubt, any game needs to render some graphics. In this chapter, we will learn how to
create a portable graphics rendering subsystem for your game. The chapter is titled
Unifying
OpenGL ES 3 and OpenGL 3
; however, in this topic we deal with portable development, so
we start our recipes with the OpenGL 3 desktop API. This serves two purposes. First, OpenGL
3 is almost a superset of OpenGL ES 3. This will allow us to port applications between two
versions of OpenGL API easily. Second, we can create a simple but very effective wrapper
to abstract both APIs from the game code, so that we are able to develop our games on a
desktop PC.