texture2d_array.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net)
  3. ///////////////////////////////////////////////////////////////////////////////////////////////////
  4. // Created : 2011-04-06
  5. // Updated : 2011-04-06
  6. // Licence : This source is under MIT License
  7. // File : gli/core/texture2d_array.hpp
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////
  9. #ifndef GLI_CORE_TEXTURE2D_ARRAY_INCLUDED
  10. #define GLI_CORE_TEXTURE2D_ARRAY_INCLUDED
  11. #include "texture2d.hpp"
  12. namespace gli
  13. {
  14. class texture2DArray
  15. {
  16. public:
  17. typedef texture2D::dimensions_type dimensions_type;
  18. typedef texture2D::texcoord_type texcoord_type;
  19. typedef texture2D::size_type size_type;
  20. typedef texture2D::value_type value_type;
  21. typedef texture2D::format_type format_type;
  22. typedef texture2D::data_type data_type;
  23. typedef texture2D::level_type level_type;
  24. typedef std::vector<texture2D>::size_type layer_type;
  25. public:
  26. texture2DArray();
  27. explicit texture2DArray(
  28. layer_type const & Layers,
  29. level_type const & Levels);
  30. ~texture2DArray();
  31. texture2D & operator[] (
  32. layer_type const & Layer);
  33. texture2D const & operator[] (
  34. layer_type const & Layer) const;
  35. bool empty() const;
  36. format_type format() const;
  37. layer_type layers() const;
  38. level_type levels() const;
  39. void resize(
  40. layer_type const & Layers,
  41. level_type const & Levels);
  42. private:
  43. std::vector<texture2D> Arrays;
  44. };
  45. }//namespace gli
  46. #include "texture2d_array.inl"
  47. #endif//GLI_CORE_TEXTURE2D_ARRAY_INCLUDED