|
VTK
9.5.2
|
#include "vtkObject.h"#include "vtkRenderingOpenGL2Module.h"#include "vtkWeakPointer.h"#include "vtkWrappingHints.h"Go to the source code of this file.
Classes | |
| class | vtkTextureObject |
| In case DepthTextureCompare is true, specify the comparison function in use. More... | |
Functions | |
| static bool | IsSupported (vtkOpenGLRenderWindow *renWin, bool requireTexFloat, bool requireDepthFloat, bool requireTexInt) |
| Returns if the context supports the required extensions. | |
| static bool | IsSupported (vtkOpenGLRenderWindow *renWin) |
| Check for feature support, without any optional features. | |
| void | CopyFromFrameBuffer (int srcXmin, int srcYmin, int dstXmin, int dstYmin, int width, int height) |
| Copy a sub-part of a logical buffer of the framebuffer (color or depth) to the texture object. | |
| void | GetShiftAndScale (float &shift, float &scale) |
| Get the shift and scale required in the shader to return the texture values to their original range. | |
| void | Resize (unsigned int width, unsigned int height) |
| void | AssignToExistingTexture (unsigned int handle, unsigned int target) |
| Assign the TextureObject to a externally provided Handle and Target. | |
| vtkTextureObject () | |
| ~vtkTextureObject () override | |
| bool | LoadRequiredExtensions (vtkOpenGLRenderWindow *renWin) |
| Load all necessary extensions. | |
| void | CreateTexture () |
| Creates a texture handle if not already created. | |
| void | DestroyTexture () |
| Destroy the texture. | |
| GetGenerateMipmap () | |
| / /** Tells the hardware to generate mipmap textures from the first texture image at BaseLevel. | |
| virtual void | SetGenerateMipmap (bool) |
| / /** Tells the hardware to generate mipmap textures from the first texture image at BaseLevel. | |
| virtual void | SetMaximumAnisotropicFiltering (float) |
| Set/Get the maximum anisotropic filtering to use. | |
| virtual float | GetMaximumAnisotropicFiltering () |
| Set/Get the maximum anisotropic filtering to use. | |
| static int | GetMaximumTextureSize (vtkOpenGLRenderWindow *context) |
| Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular context. | |
| static int | GetMaximumTextureSize3D (vtkOpenGLRenderWindow *context) |
| Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular context. | |
| int | GetMaximumTextureSize3D () |
| Overload which uses the internal context to query the maximum 3D texture size. | |
| void | CopyToFrameBuffer (vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao) |
| Copy the texture (src) in the current framebuffer. | |
| void | CopyToFrameBuffer (int srcXmin, int srcYmin, int srcXmax, int srcYmax, int dstXmin, int dstYmin, int dstXmax, int dstYmax, int dstSizeX, int dstSizeY, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao) |
| Copy the texture (src) in the current framebuffer. | |
| void | CopyToFrameBuffer (int srcXmin, int srcYmin, int srcXmax, int srcYmax, int dstXmin, int dstYmin, int dstSizeX, int dstSizeY, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao) |
| Copy the texture (src) in the current framebuffer. | |
| void | CopyToFrameBuffer (float *tcoords, float *verts, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao) |
| Copy the texture (src) in the current framebuffer. | |
| virtual bool | GetUseSRGBColorSpace () |
| Is this texture using the sRGB color space. | |
| virtual void | SetUseSRGBColorSpace (bool) |
| Is this texture using the sRGB color space. | |
| virtual void | UseSRGBColorSpaceOn () |
| Is this texture using the sRGB color space. | |
| virtual void | UseSRGBColorSpaceOff () |
| Is this texture using the sRGB color space. | |
Variables | |
| vtkGenericOpenGLResourceFreeCallback * | ResourceCallback |
| int | NumberOfDimensions |
| unsigned int | Width |
| unsigned int | Height |
| unsigned int | Depth |
| unsigned int | Samples |
| bool | UseSRGBColorSpace |
| float | MaximumAnisotropicFiltering |
| unsigned int | Target |
| unsigned int | Format |
| unsigned int | InternalFormat |
| unsigned int | Type |
| int | Components |
| vtkWeakPointer< vtkOpenGLRenderWindow > | Context |
| unsigned int | Handle |
| bool | OwnHandle |
| bool | RequireTextureInteger |
| bool | SupportsTextureInteger |
| bool | RequireTextureFloat |
| bool | SupportsTextureFloat |
| bool | RequireDepthBufferFloat |
| bool | SupportsDepthBufferFloat |
| int | WrapS |
| int | WrapT |
| int | WrapR |
| int | MinificationFilter |
| int | MagnificationFilter |
| float | MinLOD |
| float | MaxLOD |
| int | BaseLevel |
| int | MaxLevel |
| float | BorderColor [4] |
| bool | DepthTextureCompare |
| int | DepthTextureCompareFunction |
| bool | GenerateMipmap |
| int | AutoParameters |
| vtkTimeStamp | SendParametersTime |
| vtkOpenGLHelper * | ShaderProgram |
| vtkOpenGLBufferObject * | BufferObject |
| GetGenerateMipmap | ( | ) |
/ /** Tells the hardware to generate mipmap textures from the first texture image at BaseLevel.
Initial value is false, as in OpenGL spec.
|
virtual |
/ /** Tells the hardware to generate mipmap textures from the first texture image at BaseLevel.
Initial value is false, as in OpenGL spec.
|
virtual |
Set/Get the maximum anisotropic filtering to use.
1.0 means use no anisotropic filtering. The default value is 1.0 and a high value would be 16. This might not be supported on all machines.
|
virtual |
Set/Get the maximum anisotropic filtering to use.
1.0 means use no anisotropic filtering. The default value is 1.0 and a high value would be 16. This might not be supported on all machines.
|
static |
Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular context.
It should be noted that this size does not consider the internal format of the texture and therefore there is no guarantee that a texture of this size will be allocated by the driver. Also, the method does not make the context current so if the passed context is not valid or current, a value of -1 will be returned.
|
static |
Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular context.
It should be noted that this size does not consider the internal format of the texture and therefore there is no guarantee that a texture of this size will be allocated by the driver. Also, the method does not make the context current so if the passed context is not valid or current, a value of -1 will be returned.
| int GetMaximumTextureSize3D | ( | ) |
Overload which uses the internal context to query the maximum 3D texture size.
Will make the internal context current, returns -1 if anything fails.
|
static |
Returns if the context supports the required extensions.
If flags for optional extensions are set then the test fails when support for them is not found.
|
static |
Check for feature support, without any optional features.
Definition at line 659 of file vtkTextureObject.h.
| void CopyToFrameBuffer | ( | vtkShaderProgram * | program, |
| vtkOpenGLVertexArrayObject * | vao ) |
Copy the texture (src) in the current framebuffer.
A variety of signatures based on what you want to do Copy the entire texture to the entire current viewport
| void CopyToFrameBuffer | ( | int | srcXmin, |
| int | srcYmin, | ||
| int | srcXmax, | ||
| int | srcYmax, | ||
| int | dstXmin, | ||
| int | dstYmin, | ||
| int | dstXmax, | ||
| int | dstYmax, | ||
| int | dstSizeX, | ||
| int | dstSizeY, | ||
| vtkShaderProgram * | program, | ||
| vtkOpenGLVertexArrayObject * | vao ) |
Copy the texture (src) in the current framebuffer.
A variety of signatures based on what you want to do Copy the entire texture to the entire current viewport
| void CopyToFrameBuffer | ( | int | srcXmin, |
| int | srcYmin, | ||
| int | srcXmax, | ||
| int | srcYmax, | ||
| int | dstXmin, | ||
| int | dstYmin, | ||
| int | dstSizeX, | ||
| int | dstSizeY, | ||
| vtkShaderProgram * | program, | ||
| vtkOpenGLVertexArrayObject * | vao ) |
Copy the texture (src) in the current framebuffer.
A variety of signatures based on what you want to do Copy the entire texture to the entire current viewport
| void CopyToFrameBuffer | ( | float * | tcoords, |
| float * | verts, | ||
| vtkShaderProgram * | program, | ||
| vtkOpenGLVertexArrayObject * | vao ) |
Copy the texture (src) in the current framebuffer.
A variety of signatures based on what you want to do Copy the entire texture to the entire current viewport
| void CopyFromFrameBuffer | ( | int | srcXmin, |
| int | srcYmin, | ||
| int | dstXmin, | ||
| int | dstYmin, | ||
| int | width, | ||
| int | height ) |
Copy a sub-part of a logical buffer of the framebuffer (color or depth) to the texture object.
src is the framebuffer, dst is the texture. (srcXmin,srcYmin) is the location of the lower left corner of the rectangle in the framebuffer. (dstXmin,dstYmin) is the location of the lower left corner of the rectangle in the texture. width and height specifies the size of the rectangle in pixels. If the logical buffer is a color buffer, it has to be selected first with glReadBuffer().
| void GetShiftAndScale | ( | float & | shift, |
| float & | scale ) |
Get the shift and scale required in the shader to return the texture values to their original range.
This is useful when for example you have unsigned char data and it is being accessed using the floating point texture calls. In that case OpenGL maps the uchar range to a different floating point range under the hood. Applying the shift and scale will return the data to its original values in the shader. The texture's internal format must be set before calling these routines. Creating the texture does set it.
| void Resize | ( | unsigned int | width, |
| unsigned int | height ) |
|
virtual |
Is this texture using the sRGB color space.
If you are using a sRGB framebuffer or window then you probably also want to be using sRGB color textures for proper handling of gamma and associated color mixing.
|
virtual |
Is this texture using the sRGB color space.
If you are using a sRGB framebuffer or window then you probably also want to be using sRGB color textures for proper handling of gamma and associated color mixing.
|
virtual |
Is this texture using the sRGB color space.
If you are using a sRGB framebuffer or window then you probably also want to be using sRGB color textures for proper handling of gamma and associated color mixing.
|
virtual |
Is this texture using the sRGB color space.
If you are using a sRGB framebuffer or window then you probably also want to be using sRGB color textures for proper handling of gamma and associated color mixing.
| void AssignToExistingTexture | ( | unsigned int | handle, |
| unsigned int | target ) |
Assign the TextureObject to a externally provided Handle and Target.
This class will not delete the texture referenced by the handle upon releasing. That is up to whoever created it originally. Note that activating and binding will work. Properties such as wrap/interpolate will also work. But width/height/format etc are left unset.
|
protected |
|
overrideprotected |
|
protected |
Load all necessary extensions.
|
protected |
Creates a texture handle if not already created.
|
protected |
Destroy the texture.
|
protected |
Definition at line 742 of file vtkTextureObject.h.
|
protected |
Definition at line 759 of file vtkTextureObject.h.
|
protected |
Definition at line 760 of file vtkTextureObject.h.
|
protected |
Definition at line 761 of file vtkTextureObject.h.
|
protected |
Definition at line 762 of file vtkTextureObject.h.
|
protected |
Definition at line 763 of file vtkTextureObject.h.
|
protected |
Definition at line 764 of file vtkTextureObject.h.
|
protected |
Definition at line 766 of file vtkTextureObject.h.
|
protected |
Definition at line 768 of file vtkTextureObject.h.
|
protected |
Definition at line 769 of file vtkTextureObject.h.
|
protected |
Definition at line 770 of file vtkTextureObject.h.
|
protected |
Definition at line 771 of file vtkTextureObject.h.
|
protected |
Definition at line 772 of file vtkTextureObject.h.
|
protected |
Definition at line 774 of file vtkTextureObject.h.
|
protected |
Definition at line 775 of file vtkTextureObject.h.
|
protected |
Definition at line 776 of file vtkTextureObject.h.
|
protected |
Definition at line 777 of file vtkTextureObject.h.
|
protected |
Definition at line 778 of file vtkTextureObject.h.
|
protected |
Definition at line 779 of file vtkTextureObject.h.
|
protected |
Definition at line 780 of file vtkTextureObject.h.
|
protected |
Definition at line 781 of file vtkTextureObject.h.
|
protected |
Definition at line 782 of file vtkTextureObject.h.
|
protected |
Definition at line 784 of file vtkTextureObject.h.
|
protected |
Definition at line 785 of file vtkTextureObject.h.
|
protected |
Definition at line 786 of file vtkTextureObject.h.
|
protected |
Definition at line 787 of file vtkTextureObject.h.
|
protected |
Definition at line 788 of file vtkTextureObject.h.
|
protected |
Definition at line 790 of file vtkTextureObject.h.
|
protected |
Definition at line 791 of file vtkTextureObject.h.
|
protected |
Definition at line 792 of file vtkTextureObject.h.
|
protected |
Definition at line 793 of file vtkTextureObject.h.
|
protected |
Definition at line 794 of file vtkTextureObject.h.
|
protected |
Definition at line 796 of file vtkTextureObject.h.
|
protected |
Definition at line 797 of file vtkTextureObject.h.
|
protected |
Definition at line 799 of file vtkTextureObject.h.
|
protected |
Definition at line 801 of file vtkTextureObject.h.
|
protected |
Definition at line 802 of file vtkTextureObject.h.
|
protected |
Definition at line 805 of file vtkTextureObject.h.
|
protected |
Definition at line 808 of file vtkTextureObject.h.