2019-04-15 23:24:21 +00:00
|
|
|
//============================================================================
|
2016-05-20 21:25:50 +00:00
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
//
|
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
2019-04-15 23:24:21 +00:00
|
|
|
//============================================================================
|
2016-05-20 21:25:50 +00:00
|
|
|
#ifndef vtk_m_TextureGL_h
|
|
|
|
#define vtk_m_TextureGL_h
|
|
|
|
|
2016-09-01 16:19:29 +00:00
|
|
|
#include <vtkm/rendering/vtkm_rendering_export.h>
|
|
|
|
|
2018-01-18 18:55:15 +00:00
|
|
|
#include <vtkm/Types.h>
|
2016-05-20 21:25:50 +00:00
|
|
|
|
2016-09-12 17:08:06 +00:00
|
|
|
#include <memory>
|
2016-05-20 21:25:50 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-05-20 21:25:50 +00:00
|
|
|
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT TextureGL
|
2016-05-20 21:25:50 +00:00
|
|
|
{
|
2016-06-01 17:37:03 +00:00
|
|
|
public:
|
2016-09-01 16:19:29 +00:00
|
|
|
TextureGL();
|
|
|
|
|
|
|
|
~TextureGL();
|
|
|
|
|
|
|
|
bool Valid() const;
|
|
|
|
|
|
|
|
void Enable() const;
|
|
|
|
|
|
|
|
void Disable() const;
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
void CreateAlphaFromRGBA(vtkm::Id width, vtkm::Id height, const std::vector<unsigned char>& rgba);
|
2016-09-01 16:19:29 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
struct InternalsType;
|
2016-09-12 17:08:06 +00:00
|
|
|
std::shared_ptr<InternalsType> Internals;
|
2016-05-20 21:25:50 +00:00
|
|
|
};
|
2017-05-18 14:29:41 +00:00
|
|
|
}
|
|
|
|
} //namespace vtkm::rendering
|
2016-05-20 21:25:50 +00:00
|
|
|
|
|
|
|
#endif //vtk_m_rendering_TextureGL_h
|