diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-29 10:40:11 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-29 10:40:11 +0200 |
commit | 677ce3960cd13cbf994311c76d75b343b22fd480 (patch) | |
tree | ee2bab43ec29cdf94d8c1173ee022fe95c2a0222 /src/graphics/core/texture.h | |
parent | 77952a85e63ca13dd9cfc93c7b6a271d7c91e59a (diff) | |
download | colobot-677ce3960cd13cbf994311c76d75b343b22fd480.tar.gz colobot-677ce3960cd13cbf994311c76d75b343b22fd480.tar.bz2 colobot-677ce3960cd13cbf994311c76d75b343b22fd480.zip |
Some fixes and optimizations
- fixed 2nd texture setting
- added padding to some structs for faster access
- changed rendering primitives to glDrawArrays()
- optimized texture modesetting calls
- fixed some valgrind errors
Diffstat (limited to 'src/graphics/core/texture.h')
-rw-r--r-- | src/graphics/core/texture.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/graphics/core/texture.h b/src/graphics/core/texture.h index e9117e2..3ebbee5 100644 --- a/src/graphics/core/texture.h +++ b/src/graphics/core/texture.h @@ -28,6 +28,7 @@ // Graphics module namespace namespace Gfx { + /** * \enum TexImgFormat * \brief Format of image data @@ -117,11 +118,12 @@ enum TexMixArgument }; /** - \struct TextureCreateParams - \brief Parameters for texture creation - - These params define how particular texture is created and later displayed. - They must be specified at texture creation time and cannot be changed later. */ + * \struct TextureCreateParams + * \brief Parameters for texture creation + * + * These params define how particular texture is created and later displayed. + * They must be specified at texture creation time and cannot be changed later. + */ struct TextureCreateParams { //! Whether to generate mipmaps @@ -149,11 +151,12 @@ struct TextureCreateParams }; /** - \struct TextureStageParams - \brief Parameters for a texture unit - - These params define the behavior of texturing units (stages). - They can be changed freely and are feature of graphics engine, not any particular texture. */ + * \struct TextureStageParams + * \brief Parameters for a texture unit + * + * These params define the behavior of texturing units (stages). + * They can be changed freely and are features of graphics engine, not any particular texture. + */ struct TextureStageParams { //! Mixing operation done on color values @@ -193,11 +196,12 @@ struct TextureStageParams }; /** - \struct Texture - \brief Info about a texture - - Identifies (through id) a texture created in graphics engine. - Also contains some additional data. */ + * \struct Texture + * \brief Info about a texture + * + * Identifies (through id) a texture created in graphics engine. + * Also contains some additional data. + */ struct Texture { //! ID of the texture in graphics engine; 0 = invalid texture |