23 #ifndef vtkTextureObject_h 24 #define vtkTextureObject_h 26 #include "vtkRenderingOpenGL2Module.h" 37 #if GL_ES_VERSION_2_0 != 1 || GL_ES_VERSION_3_0 == 1 56 NumberOfDepthTextureCompareFunctions
61 #if GL_ES_VERSION_2_0 != 1 89 NumberOfMinificationModes
120 NumberOfDepthModeFormats
144 {
return this->Width*this->Height*this->Depth; }
160 int GetTextureUnit();
177 void ReleaseGraphicsResources(
vtkWindow *win);
187 void SendParameters();
194 bool Create2DFromRaw(
unsigned int width,
unsigned int height,
195 int numComps,
int dataType,
void *
data);
201 bool CreateDepthFromRaw(
unsigned int width,
unsigned int height,
209 bool CreateTextureBuffer(
unsigned int numValues,
int numComps,
214 #if GL_ES_VERSION_2_0 != 1 224 bool Create1D(
int numComps,
226 bool shaderSupportsTextureInt);
231 bool Create1DFromRaw(
unsigned int width,
int numComps,
232 int dataType,
void *data);
237 bool CreateAlphaFromRaw(
unsigned int width,
245 #if GL_ES_VERSION_2_0 != 1 || GL_ES_VERSION_3_0 == 1 251 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
253 bool shaderSupportsTextureInt);
260 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
262 bool shaderSupportsTextureInt);
267 bool Create3DFromRaw(
unsigned int width,
unsigned int height,
268 unsigned int depth,
int numComps,
269 int dataType,
void *data);
281 bool CreateDepth(
unsigned int width,
291 bool AllocateDepth(
unsigned int width,
unsigned int height,
297 bool Allocate1D(
unsigned int width,
int numComps,
int vtkType);
302 bool Allocate2D(
unsigned int width,
unsigned int height,
int numComps,
309 bool Allocate3D(
unsigned int width,
unsigned int height,
310 unsigned int depth,
int numComps,
317 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
318 int vtktype,
bool shaderSupportsTextureInt);
319 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
320 int numComps,
int vtktype,
bool shaderSupportsTextureInt);
324 int GetVTKDataType();
328 int GetDataType(
int vtk_scalar_type);
329 void SetDataType(
unsigned int glType);
335 unsigned int GetInternalFormat(
int vtktype,
int numComps,
336 bool shaderSupportsTextureInt);
337 void SetInternalFormat(
unsigned int glInternalFormat);
343 unsigned int GetFormat(
int vtktype,
int numComps,
344 bool shaderSupportsTextureInt);
345 void SetFormat(
unsigned int glFormat);
352 void ResetFormatAndType();
354 unsigned int GetDepthTextureModeFormat(
int vtktype);
355 unsigned int GetMinificationFilterMode(
int vtktype);
356 unsigned int GetMagnificationFilterMode(
int vtktype);
357 unsigned int GetWrapSMode(
int vtktype);
358 unsigned int GetWrapTMode(
int vtktype);
359 unsigned int GetWrapRMode(
int vtktype);
433 { this->SetMagnificationFilter(val?Linear:Nearest); }
437 {
return this->MagnificationFilter==Linear; }
514 static bool IsSupported(
516 bool requireTexFloat,
517 bool requireDepthFloat,
534 void CopyToFrameBuffer(
int srcXmin,
int srcYmin,
535 int srcXmax,
int srcYmax,
536 int dstXmin,
int dstYmin,
537 int dstXmax,
int dstYmax,
538 int dstSizeX,
int dstSizeY,
543 void CopyToFrameBuffer(
int srcXmin,
int srcYmin,
544 int srcXmax,
int srcYmax,
545 int dstXmin,
int dstYmin,
546 int dstSizeX,
int dstSizeY,
551 void CopyToFrameBuffer(
float *tcoords,
float *verts,
567 void CopyFromFrameBuffer(
int srcXmin,
585 void CreateTexture();
588 void DestroyTexture();
590 int NumberOfDimensions;
603 bool RequireTextureInteger;
604 bool SupportsTextureInteger;
605 bool RequireTextureFloat;
606 bool SupportsTextureFloat;
607 bool RequireDepthBufferFloat;
608 bool SupportsDepthBufferFloat;
613 int MinificationFilter;
614 int MagnificationFilter;
615 bool LinearMagnification;
621 float BorderColor[4];
623 bool DepthTextureCompare;
624 int DepthTextureCompareFunction;
GLsizei GLsizei GLenum GLenum const GLvoid * data
static bool IsSupported(vtkOpenGLRenderWindow *renWin)
abstract base class for most VTK objects
vtkOpenGLHelper * ShaderProgram
bool GetLinearMagnification()
#define vtkGetMacro(name, type)
record modification and/or execution time
unsigned int InternalFormat
static bool IsSupported(vtkRenderWindow *renWin, bool requireTexFloat, bool requireDepthFloat, bool requireTexInt)
#define vtkTypeMacro(thisClass, superclass)
GLint GLint GLsizei GLsizei height
window superclass for vtkRenderWindow
GLint GLint GLsizei GLsizei GLsizei depth
virtual void PrintSelf(ostream &os, vtkIndent indent)
#define vtkSetVector4Macro(name, type)
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
GLint GLint GLsizei width
vtkWeakPointer< vtkOpenGLRenderWindow > Context
void SetLinearMagnification(bool val)
#define vtkGetVector4Macro(name, type)
abstracts an OpenGL pixel buffer object.
vtkOpenGLBufferObject * BufferObject
abstracts an OpenGL texture object.
VTKRENDERINGOPENGL_EXPORT PFNGLGENERATEMIPMAPPROC GenerateMipmap
GLclampf GLclampf GLclampf alpha
The ShaderProgram uses one or more Shader objects.
#define vtkSetMacro(name, type)