MyGUI 3.4.1
MyGUI_TextureUtility.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_TEXTURE_UTILITY_H_
8#define MYGUI_TEXTURE_UTILITY_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Colour.h"
12#include "MyGUI_RenderFormat.h"
13
14namespace MyGUI
15{
16
17 namespace texture_utility
18 {
19
20 MYGUI_EXPORT const IntSize& getTextureSize(const std::string& _texture, bool _cache = true);
21 MYGUI_EXPORT uint32 toColourARGB(const Colour& _colour);
22
23 inline void convertColour(uint32& _colour, VertexColourType _format)
24 {
25 if (_format == VertexColourType::ColourABGR)
26 _colour = ((_colour & 0x00FF0000) >> 16) | ((_colour & 0x000000FF) << 16) | (_colour & 0xFF00FF00);
27 }
28
29
30 } // namespace texture_utility
31
32} // namespace MyGUI
33
34#endif // MYGUI_TEXTURE_UTILITY_H_
#define MYGUI_EXPORT
void convertColour(uint32 &_colour, VertexColourType _format)
uint32 toColourARGB(const Colour &_colour)
const IntSize & getTextureSize(const std::string &_texture, bool _cache=true)
uint32_t uint32
Definition: MyGUI_Types.h:47