Often when you develop an app which needs some sort of data-retrieval from a server or something like that, you will need something that lets you press a button to update the data. When you press this button, you will want to show the user that it is updating and you want to show the user that the updating process has ended. This tutorial will show you a nice way of doing this, just like popular apps like GMail do nowadays.
Drawing text seems quite easy but it is often a hard task for most beginning game developers. OpenGL and similar systems do not offer any function that renders text out of the box. This means you have to create one yourself. We are going to show you how. This tutorial will continue with the source code of the previous tutorial.
All OpenGL calls are quite expensive if look at the time needed for those calls (see part 5). In game development we want to reduce the amount of time needed to update and render a frame to minimum so we need to create a system that will need as little OpenGL calls as possible. This tutorial will show you how to use texture atlases so that you decrease the render calls quite a bit. This tutorial will continue on the code of the previous tutorials.
In our third shaders tutorial we will use the knowledge we have gained from the second tutorial and we use it to create gray scaled textures. You can create a texture that is already gray scaled and use it with our simple texture shader and you are right, however, there are some situation in which you want to be able to do it runtime. We will show you various forms of gray scaling available using shaders.
We have rendered images on screen and learned a lot about the OpenGL’s graphics system and the results looks fine for learning purposes but if we want to create an actual game and release it to the world, it should look the same on all devices, no matter what size the screen is or what resolution the device supports. This tutorial will show a simple system that you can use in order to get your game looking the same on almost every device.
In this second installment of our OpenGL ES 2.0 Shader tutorials for Android we will look into using textures in our shaders. In our previous tutorial we have explained the whole shader system in OpenGL ES 2.0 and we have made an app that renders a colored triangle. This is nice but if we want to make a game more appealing we should use images instead of only colored objects. In our Real 2D tutorials we have already explained and given code to render textured quads on screen representing an game object. This tutorial will explain just a bit more of what we can do with shaders regarding textures and colors.
In the previous tutorials we have created a textured 2D image that we can control and transform. We have talked about the texturing just a little bit. The shader parts will be explained in great detail in our future tutorials about shaders. The OpenGL ES 2.0 part of the code is what we are going to handle in this tutorial. I will have to warn you, this tutorial will be theory for the most part as it will try to explain how the texture system works in OpenGL ES 2.0.
There are a lot of different phones, tablets and hardware configurations available when it comes to Android. Assuming that everything is working correctly right from the factory may be a little bit naive. At the moment a lot of developers still support Android 2.3 and some phones like the HTC Desire, HTC Desire S and Samsung Galaxy Ace have a little GPU from the Adreno 200 series (200 & 205) that does not work as all the other GPU’s regarding textures. Let us elaborate a bit on this as you should incorporate our hack if you use multiple textures per shaderprogram so that those users won’t complain .
Android is a complex system of all sorts of logic and systems which are available to us. This is very nice but it also gives us multiple ways to achieve the same thing and here it gets a little bit complicated. In this post we will look a bit into checking if your application is the currently active one.
OpenGL ES 2.0 requires us to use shaders, which is very nice because it lets us do a lot of nice things. This series of tutorials will go into the subject of shaders. This installment will cover the basic setup of a shader and explains a bit what’s what.