Add a checkbox to the debugging window to show being ids.

Reviewed-by: Ablu
Removing constructor of DebugSwitches.

The class DebugSwitches is a derived class from Container, 'which
automatically deletes its child widgets, so there is no need for
such fragile cleanup code.'

acked-by: bjorn
Graphics: take only const pointers to images.

Acked-by: Erik Schilling
Revert "Graphics: take only const pointers to images."

This reverts commit 4eea727b7649726670d8963d11ab4fd429624b3e.

It broke the overrides of the virtual functions and leaves the Graphics
API in inconsistent state with some Image* being const and others not.
Fixed indentation of Image::_GLload

Reviewed-by: Stefan Beller
Fixed mixup of parameter types in OpenGL code

Textures were not rendering correctly on cards that did not support the
GL_ARB_texture_rectangle extension, since the alternative code path was
passing ints as floats and floats as ints to OpenGL.

Reviewed-by: Erik Schilling
Some cleanups in OpenGL code

* Removed empty and unused function `setTargetPlane`
* Removed duplicated enabling of `GL_VERTEX_ARRAY`
* Removed strange smoothing code from `drawRescaledImage`

Reviewed-by: Erik Schilling
Added support for ARB_texture_non_power_of_two extension

If the graphics driver supports this, there is no need to create
textures with power-of-two dimensions. It is then also preferred to use
regular textures than relying on the older GL_ARB_texture_rectangle
extension.

Reviewed-by: Erik Schilling
Specify a more specific image format when uploading textures

While simply specifying "4 components" works, it is preferred to specify
the actual image format like GL_RGBA8 in our case.

http://www.opengl.org/wiki/Common_Mistakes#Image_precision

Reviewed-by: Erik Schilling
Avoid copying surfaces unnecessarily for upload to texture

When uploading an SDL surface to an OpenGL texture, it was always making
a copy that had the desired size and pixel format. Now this copy is no
longer being made when the existing surface already has the target size
and pixel format.

In fact most images are already in 32-bit RGBA format after loading them.

Reviewed-by: Erik Schilling
Removed all the hardcoded sizes of the various setup tabs

Instead, support for dynamically adjusting layout was added to the
Container class.

Various other places were also adapted to use the new layout support in
Container.

Reviewed-by: Erik Schilling
Removed 'virtual' from methods of Image

Maybe it used to be necessary for these methods to be virtual, but this
is no longer the case. Hence we can avoid wasting CPU ticks searching
through virtual function tables, especially for frequently used methods
like getWidth, getHeight and setAlpha.

MapLayer::getTile was inlined.

Reviewed-by: Erik Schilling
Enable OpenGL by default on all platforms

Before it was only enabled by default for Mac.

Reviewed-by: Erik Schilling
Removed linking with guichan_opengl from C::B project

Actually we're not depending on this library.

Reviewed-by: Erik Schilling
Enabled manaserv support in Code::Blocks project

Reviewed-by: Erik Schilling
Fixed drawing issues with tiles that don't match the grid

An optimization in the tile layer rendering code meant for drawing
repeated tiles faster was not taking into account the case where the
tile width does not match the width of the tile grid.

Reviewed-by: Stefan Beller
Fixed issue where previous special entries were drawn underneath

Reviewed-by: Erik Schilling.