color_cast.hpp Source File

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# color_cast.hpp

    00001
    00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
    00004 // Created : 2007-06-21
    00005 // Updated : 2009-06-05
    00006 // Licence : This source is under MIT License
    00007 // File    : glm/gtx/color_cast.hpp
    00009 // Dependency:
    00010 // - GLM core
    00011 // - GLM_GTX_number_precision
    00013
    00014 #ifndef glm_gtx_color_cast
    00015 #define glm_gtx_color_cast
    00016
    00017 // Dependency:
    00018 #include "../glm.hpp"
    00019 #include "../gtx/number_precision.hpp"
    00020
    00021 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
    00022 #       pragma message("GLM: GLM_GTX_color_cast extension included")
    00023 #endif
    00024
    00025 namespace glm
    00026 {
    00027         namespace test{
    00028                 void main_ext_gtx_color_cast();
    00029         }//namespace test
    00030
    00031         namespace gtx{
    00033         namespace color_cast
    00034         {
    00035                 using namespace gtx::number_precision;
    00036
    00039
    00042                 template <typename valType> gtc::type_precision::uint8 u8channel_cast(valType a);
    00043
    00046                 template <typename valType>     gtc::type_precision::uint16 u16channel_cast(valType a);
    00047
    00048                 template <typename T> gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3<T>& c);
    00049                 template <typename T> gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3<T>& c);
    00050                 template <typename T> gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3<T>& c);
    00051                 template <typename T> gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3<T>& c);
    00052
    00053                 template <typename T> gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4<T>& c);
    00054                 template <typename T> gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4<T>& c);
    00055                 template <typename T> gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4<T>& c);
    00056                 template <typename T> gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4<T>& c);
    00057
    00058                 template <typename T> gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3<T>& c);
    00059                 template <typename T> gtc::type_precision::uint64 u64_xrgb_cast(const detail::tvec3<T>& c);
    00060                 template <typename T> gtc::type_precision::uint64 u64_bgrx_cast(const detail::tvec3<T>& c);
    00061                 template <typename T> gtc::type_precision::uint64 u64_xbgr_cast(const detail::tvec3<T>& c);
    00062
    00063                 template <typename T> gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4<T>& c);
    00064                 template <typename T> gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4<T>& c);
    00065                 template <typename T> gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4<T>& c);
    00066                 template <typename T> gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4<T>& c);
    00067
    00068                 template <typename T> gtx::number_precision::f16vec1 f16_channel_cast(T a);
    00069
    00070                 template <typename T> gtc::type_precision::f16vec3 f16_rgbx_cast(T c);
    00071                 template <typename T> gtc::type_precision::f16vec3 f16_xrgb_cast(T c);
    00072                 template <typename T> gtc::type_precision::f16vec3 f16_bgrx_cast(T c);
    00073                 template <typename T> gtc::type_precision::f16vec3 f16_xbgr_cast(T c);
    00074
    00075                 template <typename T> gtc::type_precision::f16vec4 f16_rgba_cast(T c);
    00076                 template <typename T> gtc::type_precision::f16vec4 f16_argb_cast(T c);
    00077                 template <typename T> gtc::type_precision::f16vec4 f16_bgra_cast(T c);
    00078                 template <typename T> gtc::type_precision::f16vec4 f16_abgr_cast(T c);
    00079
    00080                 template <typename T> gtx::number_precision::f32vec1 f32_channel_cast(T a);
    00081
    00082                 template <typename T> gtc::type_precision::f32vec3 f32_rgbx_cast(T c);
    00083                 template <typename T> gtc::type_precision::f32vec3 f32_xrgb_cast(T c);
    00084                 template <typename T> gtc::type_precision::f32vec3 f32_bgrx_cast(T c);
    00085                 template <typename T> gtc::type_precision::f32vec3 f32_xbgr_cast(T c);
    00086
    00087                 template <typename T> gtc::type_precision::f32vec4 f32_rgba_cast(T c);
    00088                 template <typename T> gtc::type_precision::f32vec4 f32_argb_cast(T c);
    00089                 template <typename T> gtc::type_precision::f32vec4 f32_bgra_cast(T c);
    00090                 template <typename T> gtc::type_precision::f32vec4 f32_abgr_cast(T c);
    00091
    00092                 template <typename T> gtx::number_precision::f64vec1 f64_channel_cast(T a);
    00093
    00094                 template <typename T> gtc::type_precision::f64vec3 f64_rgbx_cast(T c);
    00095                 template <typename T> gtc::type_precision::f64vec3 f64_xrgb_cast(T c);
    00096                 template <typename T> gtc::type_precision::f64vec3 f64_bgrx_cast(T c);
    00097                 template <typename T> gtc::type_precision::f64vec3 f64_xbgr_cast(T c);
    00098
    00099                 template <typename T> gtc::type_precision::f64vec4 f64_rgba_cast(T c);
    00100                 template <typename T> gtc::type_precision::f64vec4 f64_argb_cast(T c);
    00101                 template <typename T> gtc::type_precision::f64vec4 f64_bgra_cast(T c);
    00102                 template <typename T> gtc::type_precision::f64vec4 f64_abgr_cast(T c);
    00103
    00105         }//namespace color_space
    00106         }//namespace gtx
    00107 }//namespace glm
    00108
    00109 #include "color_cast.inl"
    00110
    00111 namespace glm{using namespace gtx::color_cast;}
    00112
    00113 #endif//glm_gtx_color_cast