HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_OGLTexture.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RE_OGLTexture.h ( RE Library, C++)
7  *
8  * COMMENTS:
9  * Base class for various OpenGL texture types: 1D, 2D, 3D, Cube,
10  * 2D rectangles, 1D arrays and 2D arrays.
11  *
12  */
13 #ifndef RE_OGLTexture_h
14 #define RE_OGLTexture_h
15 
16 class RE_Render;
17 class RE_TextureMap;
18 
19 #include <UT/UT_ValArray.h>
20 #include <UT/UT_Rect.h>
21 
22 #include "RE_CachedObject.h"
23 #include "RE_Types.h"
24 #include "RE_TextureTypes.h"
25 #include "RE_TextureFilter.h"
26 #include <IMG/IMG_FileTypes.h>
27 
28 #include <iosfwd>
29 #include <time.h>
30 
32 {
33 public:
34  ~RE_OGLTexture() override;
35 
36  /// Returns the amount of main memory (NOT graphics memory!)
37  /// owned by this RE_OGLTexture.
38  int64 getMemoryUsage(bool inclusive) const override;
39 
40  virtual const char *className() const;
41 
42  // Texture type (dimensions)
43  RE_TextureDimension getTextureType() const;
44 
45  // Returns true if this texture type is supported.
46  virtual bool hasTextureSupport(RE_Render *r);
47 
48  // True if this texture type supports mipmapping (all but tex rectangles)
49  virtual bool hasMipMapSupport(RE_Render *);
50 
51  // Returns the maximum size of a texture edge of the given texture type
52  virtual int getMaxTextureSize(RE_Render *r) = 0;
53 
54  // Returns the maximum index that can be used for arrays and cube maps
55  virtual int getMaxTextureIndex(RE_Render *r);
56 
57  // True if GL can compress textures itself.
58  bool hasAutoCompression(RE_Render *r);
59 
60  // true if this has a valid texture created for it.
61  virtual bool isValid() const;
62 
63  // true if the texture res, format, mip levels can be changed on the fly
64  bool isMutable() const { return myMutableFlag; }
65 
66  // Texture identifier - opaque handle.
67  RE_TextureID getID() const;
68 
69  // Releases the texture on the GPU; this object becomes invalid.
70  virtual void free();
71 
72  // Returns a new texture with no attributes of the given type.
73  static RE_OGLTexture *newTexture(RE_TextureDimension t);
74 
75  // Returns a new, blank texture with the same attributes as this texture.
76  RE_OGLTexture *copyAttributes() const;
77 
78  // -----------------------------------------------------------------
79  // Basic Texture data (modifying will invalidate texture,
80  // requiring a setTexture() call)
81 
82  // The texture type can be color, stencil, or depth. Stencil and depth
83  // textures are more restrictive with the types that can be sent to them.
84  // They must be single channel textures; depth can be FLOAT16,24 or 32,
85  // while stencil must be UINT1,2,4,8 or 16. The default is Color.
86  // This must be set before calling setFormat().
87  void setDataType(RE_TextureDataType type);
88  RE_TextureDataType getDataType() const;
89 
90  // The data type is the CPU-side data format, vectorsize can be 1-4.
91  // To use leaner GPU-side data formats, set a texture compression.
92  void setFormat(RE_GPUType data, int vectorsize,
93  RE_TextureFormatExtra format_extra =
95  RE_GPUType getFormatType() const;
96  int getFormatSize() const;
97  RE_TextureFormatExtra getFormatExtra() const;
98 
99  // returns the GL internal format of the texture (ie, RGBA8).
100  int getInternalFormat() const { return myGLInternal; }
101 
102  // You can pass the data in a different format than the texture type.
103  // This must be called after setFormat().
104  void setClientFormat(RE_GPUType data, int vectorsize);
105 
106  // Compress the texture on the GPU, default is to use the same format as
107  // the CPU format (RE_COMPRESS_NONE). If auto_compress is false, it is
108  // assumed that the data passed to this texture object is already
109  // compressed.
110  void setCompression(RE_TextureCompress comp,
111  bool auto_compress);
112  RE_TextureCompress getCompression() const;
113  bool getAutoCompression() const;
114 
115  // Texture Resolution
116  // Height/depth may not be required, depending on texture dimension.
117  void setResolution(int w, int h = 1, int depth = 1,
118  bool force_pow2 = false);
119  int getWidth() const;
120  int getHeight() const;
121  int getDepth() const;
122 
123  // GL may differ from getWidth/Height/Depth if GPU requires pow2 textures
124  // These sizes will never be smaller than the above sizes.
125  int getGLWidth() const;
126  int getGLHeight() const;
127  int getGLDepth() const;
128 
129  // If the texture size differs from the GL size, this will return a value
130  // less than 1 to represent the coord where the image ends in the texture
131  float getTexS() const;
132  float getTexT() const;
133  float getTexR() const;
134 
135  // For multisample textures (2D)
136  virtual void setSamples(int samples);
137  int getSamples() const;
138 
139  // Enables mipmapping and auto-generation of mipmaps. Not all texture data
140  // formats can be mipmapped (specifically floating point). This also sets
141  // the minify filter to RE_FILT_LINEAR_MIPMAP_LINEAR if not set to a MIPMAP
142  // filter and it is enabled, or back to RE_FILT_LINEAR if disabled.
143  void setMipMap(bool m, bool autogen = true);
144  bool getMipMap() const;
145  bool getMipMapAutoGenerate() const;
146 
147  // Returns true if the texture actually is mipmapped, not just requested
148  // to be (some formats don't mipmap).
149  bool isMipMapped() const;
150 
151  // This can be called before the texture is created to determine if it's
152  // possible to use. Returns false if it's not possible to create. If the
153  // texture is already created, it returns the actual OpenGL texture values.
154  // 'format' is an internal OpenGL format specification (like GL_RGBA8).
155  bool queryTextureStats(RE_Render *r,
156  int *width, int *height, int *depth,
157  int *format);
158 
159  void setLabel(RE_Render *r, const char *label);
160 
161 
162  // ---------------------------------------------------------------------
163  // Texture transfer methods (CPU/GPU).
164 
165  // set/getTexture() writes or reads the entire texture.
166  // It is assumed that data points to a chunk of memory large enough for the
167  // texture. A set method must be called afterwards to reinitialize the
168  // texture if the above parameters are changed.
169  // If non-pow2 textures are not supported and you set the resolution to a
170  // non-pow2 size, you still pass in non-pow2 data and it will be written
171  // properly (do not pad to pow2). If you do not wish this to be the case,
172  // set a pow2 resolution insteead. When rendering a non-pow2 emulated
173  // texture, use the getTexS/T/R() methods to determine the edge of the data.
174 
175  // 'level' is the texture mipmap level.Must be -1 if mipmapping is disabled.
176  // 'index' varies by texture type; face for cube maps and index for arrays.
177  // 'proxy' does a texture proxy call, merely seeing if the texture can be
178  // created without generating any errors.
179  virtual void setTexture(RE_Render *r, const void *data,
180  int level=-1, int index=-1,
181  bool proxy=false) = 0;
182 
183  // How large a block is required to initialize or fetch this texture.
184  virtual int64 getSizeBytes() const;
185 
186  // The size of one scanline in the image. The second version using sublen
187  // instead of GLwidth
188  int64 getScanBytes() const;
189  int64 getScanBytes(int sublen) const;
190 
191  // Number of bits in a full pixel (ie, fp16 RGB has 48b).
192  int64 getBitsPerPixel() const;
193 
194  // Actual size of texture in GPU mem.
195  int64 getTextureSize() const;
196 
197  // Write to or read from a portion of the texture. Not all dimensions may
198  // be used. See derived classes for the meaning of 'z'. These can only be
199  // used after setTexture(), though it can be called with data=nullptr to set
200  // up the texture for setSubTexture().
201  virtual void setSubTexture(RE_Render *r,
202  const void *data, int level,
203  int xoffset, int xsize,
204  int yoffset=0, int ysize=1,
205  int zoffset=0, int zsize=1) = 0;
206 
207  // Reads the entire texture at 'level' back into 'data'. 'data' must point
208  // to a block of at least 'getSizeBytes()' in size.
209  // Note that a non-pow2 emulated texture will return the entire GL pow2
210  // size, since there is no way to read a portion of a texture.
211  virtual void getTexture(RE_Render *r, void *data,
212  int level=0, int index=-1) const;
213 
214  // copies 'area' block of pixels from the read buffer to this texture,
215  // in screen coords (if nullptr, the entire area) at offset (x,y,z) and
216  // miplevel 'level'. The pixels are converted to this texture's data format
217  virtual bool copyFromBuffer(RE_Render *r, int x, int y, int z = 0,
218  const UT_DimRect *bufferarea = nullptr,
219  int level = 0) = 0;
220 
221  // Copy a subregion from a source texture to this texture. The x,y,z and
222  // width, height, depth parameters have different meanings depending on the
223  // source and destination texture types (eg, depth in cubemap is the face,
224  // height in a 1D array is the index). Requires RE_EXT_TEXTURE_COPY (GL4.3)
225  // Buffer textures cannot be copied to or from.
226  bool copyFromTexture(RE_Render *r,
227  const RE_OGLTexture *src_texture,
228  int src_x, int src_y, int src_z,
229  int dst_x, int dst_y, int dst_z,
230  int width = -1, // -1 = full src width
231  int height = -1,
232  int depth = -1,
233  int mip_level = 0);
234 
235 
236  // Build mip-maps from mip level 0 of the texture. Useful for
237  // filtering render-to-texture targets. Returns true if mipmaps were
238  // generated.
239  bool generateMipMaps(RE_Render *r);
240 
241  // ---------------------------------------------------------------------
242  // Texture Parameters (changing will modify, does not require setTexture)
243 
244  // Filter to use when displaying the texture at less than 100% zoom
245  void setMinFilter( RE_Render *r, RE_TexFiltType t );
246  RE_TexFiltType getMinFilter() const;
247 
248  // Filter to use when displaying the texture at greater than 100% zoom
249  void setMagFilter( RE_Render *r, RE_TexFiltType t );
250  RE_TexFiltType getMagFilter() const;
251 
252  void setMaxAnisotropy(RE_Render *r, int atf);
253  int getMaxAnisotropy() const;
254 
255  // Fixed bias value that is added to the level-of-detail parameter for
256  // the texture before texture sampling (when mipmapping).
257  void setLodBias(RE_Render *r, float bias);
258  float getLodBias() const;
259 
260  // Texture wrapping - clamp or repeat. Not all dimension may be used.
261  void setTextureWrap(RE_Render *r,
262  RE_TexClampType clamp_s,
263  RE_TexClampType clamp_t = RE_CLAMP_EDGE,
264  RE_TexClampType clamp_r = RE_CLAMP_EDGE);
265  bool getWrapS() const;
266  bool getWrapT() const;
267  bool getWrapR() const;
268 
269  void setBorder(RE_Render *r,
271  const UT_Vector4F *color_alpha = nullptr);
272  UT_Vector4F getBorderColor() const;
273 
274  // Sets all of the above in one go.
275  void setTextureFilter(RE_Render *r,
276  const RE_TextureFilter &filter);
277 
278  // When on, depth comparison is used. When used in a shader, a shadow
279  // sampler must be used. If disabled, the raw depth value is returned and
280  // a normal texture sampler must be used. 'compare' can be set to a
281  // negative, positive or zero value, indicating less/equal, greater/equal or
282  // equal compare mode.
283  void setDepthCompareMode(RE_Render *r, bool enabled,
286 
287  // If RE_EXT_TEXTURE_SWIZZLE is supported, texture components can be
288  // shuffled about or set to a constant 0 or 1 value.
289  bool setTextureSwizzle(RE_Render *r,
294 
295  void setAlphaInfo(IMG_FileAlphaInfo a) { myAlphaInfo = a; }
296  IMG_FileAlphaInfo getAlphaInfo() const { return myAlphaInfo;}
297 
298  // --------------------------------------------------------------------
299  // Bindless Textures (requires RE_EXT_TEXTURE_BINDLESS)
300 
301  // Creates a bindless handle for the texture. Once this is done, the texture
302  // is immutable - its texel contents can change, but nothing else.
303  // Will return false if bindless texture is unsupported.
304  bool createTextureHandle(RE_Render *r);
305 
306  // returns the bindless texture handle. createTextureHandle() must be called
307  // first. If bindless is unsupported or create was not called, returns 0.
308  uint64 getTextureHandle() const { return myBindlessHandle; }
309 
310  // Before a bindless texture can be used, it must be made resident.
311  bool makeResidentTexture(RE_Render *r);
312 
313  // When a bindless texture is no longer needed, it should be removed from
314  // resident status to free up resources.
315  bool removeResidentTexture(RE_Render *r);
316 
317 
318 
319  // --------------------------------------------------------------------
320 
321  static int getGLTextureType(RE_TextureDimension t);
322  static RE_TextureDimension getRETextureType(int gl_type);
323  static RE_OGLTexture *findTextureWithID(RE_TextureID id);
324 
325  // Mostly for debug, this writes the texture out to a file (any supported
326  // image format, determined by the extension). 3D textures are best written
327  // as deep raster formats, like .pic.
328  bool writeToFile(RE_Render *r, const char *name,
329  int level = 0) const;
330 
331  // Expands a 2D multisample texture into a 2D texture with dimensions
332  // increased by the sampling factor: 2x (2,1), 4x (2,2), 6x (3,2), 8x (4,2)
333  RE_OGLTexture * expandMultisampleTexture(RE_Render *r) const;
334 
335  static void adjustPow2(int &w, int &h, int &d);
336 
337 
338  // References on this texture by other objects
339  void addReference(void (*cb)(void *, RE_OGLTexture *),
340  void *ref_obj);
341  void removeReference(void *ref_obj);
342 
343  void setFileModTime(time_t time) { myModTime = time; }
344  bool hasFileModTime() const { return myModTime != 0; }
345  time_t getFileModTime() const { return myModTime; }
346 
347 
348  void invalidateCache();
349 
350  // print a summary of this texture. If os is nullptr, use std::cerr.
351  void print(std::ostream *os = nullptr);
352 
353  // Dump all textures currently in use by Houdini. If min_tex_size is
354  // specified, only those textures >= the size will be printed. The summary
355  // line will always include stats from all textures.
356  static void dumpTextureTable(std::ostream &os,
357  int64 min_tex_size = -1);
358 protected:
359 
361 
362  void deleteObject();
363  void setupTextureParameters(RE_Render *r, bool force);
364  void validate();
365 
366  // These return various GL types (ie, GL_TEXTURE_2D, GL_PROXY_TEXTURE_2D,
367  // GL_TEXTURE_BINDING_2D)
368  virtual int getGLType() const = 0;
369  virtual int getGLProxy() const = 0;
370  virtual int getGLTypeBinding() const = 0;
371  virtual int getGLCreateType() const { return getGLType(); }
372 
373  // These methods must be called from within a locked context
374  virtual bool buildMipMaps(RE_Render *r, const void *data) = 0;
375 
376  bool createTextureID();
377 
378  RE_GPUType getClientType() const;
379 
380  // returns a malloc'ed image with the compressed data, which must be freed.
381  // If no compression is necessary, this will return nullptr.
382  void * compressTexData(const void *src, int &w, int &h);
383  void determineCompressionInternal();
384  void determineTextureSize(RE_Render *r);
385 
386  // OpenGL data
388  int myGLType;
394  time_t myModTime;
396 
397  void updateTextureWrap(RE_Render *r, bool force);
398  void updateFilters(RE_Render *r, bool force);
399 
400 private:
401  void buildFormatTable();
402 
403  // RE data
404  RE_TextureDataType myTextureDataType;
405  RE_GPUType myDataType;
406  RE_GPUType myClientType;
407  RE_TextureFormatExtra myFormatExtra;
408  RE_TextureDimension myTexDimension;
409  int myVectorSize;
410  int myWidth;
411  int myHeight;
412  int myDepth;
413  RE_TextureCompress myCompression;
414  bool myMipMapFlag;
415  bool myMipMapAutoGenFlag;
416  bool myAutoCompressFlag;
417  bool myCompressFlag;
418  bool myValidFlag;
419  bool myMutableFlag;
420  RE_TextureFilter myCurrentFilterState;
421  RE_TextureFilter myFilter;
422  int64 myTexSize;
423  IMG_FileAlphaInfo myAlphaInfo;
424  UT_ValArray<void *> myReferences;
426 
427  uint64 myBindlessHandle;
428  int myResidentCount;
429 
430 protected:
432  friend class RE_OGLRender;
433  friend class RE_OGLFramebuffer;
434  friend class RE_TextureMap;
435 };
436 
437 inline RE_TextureDimension
439 {
440  return myTexDimension;
441 }
442 
443 inline void
445 {
446  myTextureDataType = type;
447 
448  if(myVectorSize > 0)
449  setFormat(myDataType, myVectorSize, myFormatExtra);
450 }
451 
452 inline RE_TextureDataType
454 {
455  return myTextureDataType;
456 }
457 
458 inline bool
460 {
461  return myID != 0 && myValidFlag;
462 }
463 
464 inline RE_TextureID
466 {
467  return myID;
468 }
469 
470 inline RE_GPUType
472 {
473  return myDataType;
474 }
475 
476 inline RE_GPUType
478 {
479  return myClientType;
480 }
481 
482 inline int
484 {
485  return myVectorSize;
486 }
487 
490 {
491  return myFormatExtra;
492 }
493 
494 inline int
496 {
497  return myWidth;
498 }
499 
500 inline int
502 {
503  return myHeight;
504 }
505 
506 inline int
508 {
509  return myDepth;
510 }
511 
512 inline int
514 {
515  return myGLWidth;
516 }
517 
518 inline int
520 {
521  return myGLHeight;
522 }
523 
524 inline int
526 {
527  return myGLDepth;
528 }
529 
530 inline RE_TextureCompress
532 {
533  return myCompression;
534 }
535 
536 inline bool
538 {
539  return myAutoCompressFlag;
540 }
541 
542 inline bool
544 {
545  return true;
546 }
547 
548 inline bool
550 {
551  return myMipMapFlag;
552 }
553 
554 inline bool
556 {
557  return myMipMapFlag && myCanMipMap;
558 }
559 
560 inline bool
562 {
563  return myMipMapAutoGenFlag;
564 }
565 
566 inline RE_TexFiltType
568 {
569  return myCurrentFilterState.getMinFilter();
570 }
571 
572 inline RE_TexFiltType
574 {
575  return myCurrentFilterState.getMagFilter();
576 }
577 
578 inline float
580 {
581  return myCurrentFilterState.getLodBias();
582 }
583 
584 inline int
586 {
587  return myCurrentFilterState.getMaxAnisotropy();
588 }
589 
590 inline bool
592 {
593  return myCurrentFilterState.getWrapS();
594 }
595 
596 inline bool
598 {
599  return myCurrentFilterState.getWrapT();
600 }
601 
602 inline bool
604 {
605  return myCurrentFilterState.getWrapR();
606 }
607 
608 inline const char *
610 {
611  return "RE_OGLTexture";
612 }
613 
614 inline bool
616 {
617  return true;
618 }
619 
620 inline void
622 {
623  myValidFlag = true;
624 }
625 
626 inline int
628 {
629  return 1;
630 }
631 
632 inline float
634 {
635  return float(myWidth) / float(myGLWidth);
636 }
637 
638 inline float
640 {
641  return float(myHeight) / float(myGLHeight);
642 }
643 
644 inline float
646 {
647  return float(myDepth) / float(myGLDepth);
648 }
649 
650 inline int64
652 {
653  return myTexSize;
654 }
655 
656 inline int64
658 {
659  return getScanBytes(myGLWidth);
660 }
661 
662 
663 #endif
int getGLHeight() const
void setFileModTime(time_t time)
virtual int getMaxTextureIndex(RE_Render *r)
float getTexR() const
bool isMipMapped() const
GLint GLint GLint yoffset
Definition: glcorearb.h:412
bool getMipMapAutoGenerate() const
int getGLDepth() const
GLint GLint GLsizei GLint border
Definition: glcorearb.h:108
RE_GPUType getClientType() const
bool getWrapS() const
virtual const char * className() const
#define RE_API
Definition: RE_API.h:10
int64 getMemoryUsage(bool inclusive) const override
int64 getTextureSize() const
GT_API const UT_StringHolder time
RE_TextureFormatExtra getFormatExtra() const
RE_TextureSwizzle
int getWidth() const
GLfloat GLfloat blue
Definition: glcorearb.h:112
RE_TexFiltType getMagFilter() const
RE_TextureID myID
GLint level
Definition: glcorearb.h:108
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2539
GLuint const GLchar * name
Definition: glcorearb.h:786
RE_TextureDimension
bool getAutoCompression() const
GLenum src
Definition: glcorearb.h:1793
unsigned long long uint64
Definition: SYS_Types.h:117
int getDepth() const
int getMaxAnisotropy() const
float getLodBias() const
GLdouble GLdouble t
Definition: glew.h:1403
virtual int getGLCreateType() const
virtual bool hasMipMapSupport(RE_Render *)
GLsizei samples
Definition: glcorearb.h:1298
RE_TexFiltType getMagFilter() const
int getInternalFormat() const
GLint GLenum GLint x
Definition: glcorearb.h:409
RE_TextureDimension getTextureType() const
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
RE_TexFiltType
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:476
bool hasFileModTime() const
CompareResults OIIO_API compare(const ImageBuf &A, const ImageBuf &B, float failthresh, float warnthresh, ROI roi={}, int nthreads=0)
RE_GPUType
Definition: RE_Types.h:44
bool getWrapR() const
GLfloat bias
Definition: glew.h:10316
RE_TextureID getID() const
RE_TextureCompress myCompression
unsigned int RE_TextureID
bool getWrapT() const
time_t getFileModTime() const
RE_TextureFormatExtra
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
RE_TexClampType
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
int getFormatSize() const
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
long long int64
Definition: SYS_Types.h:116
virtual bool hasTextureSupport(RE_Render *r)
RE_TextureCompress getCompression() const
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1297
RE_TextureBorder
int64 getScanBytes() const
GLint GLint xoffset
Definition: glcorearb.h:411
int getMaxAnisotropy() const
int getHeight() const
GLint GLsizei width
Definition: glcorearb.h:103
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
RE_TexFiltType getMinFilter() const
uint64 getTextureHandle() const
IMG_FileAlphaInfo
RE_TextureDataType
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:108
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
virtual bool isValid() const
Cached object implementation for RE_TextureCache.
float getTexS() const
float getLodBias() const
RE_TexClampType getWrapR() const
RE_TexClampType getWrapS() const
GLboolean red
Definition: glew.h:2176
RE_TextureDataType getDataType() const
GLuint index
Definition: glcorearb.h:786
GLfloat green
Definition: glcorearb.h:112
RE_GPUType getFormatType() const
RE_TexFiltType getMinFilter() const
const GLdouble * m
Definition: glew.h:9166
void setAlphaInfo(IMG_FileAlphaInfo a)
IMG_FileAlphaInfo getAlphaInfo() const
int getGLWidth() const
void setDataType(RE_TextureDataType type)
float getTexT() const
RE_TextureCompress
type
Definition: core.h:1059
RE_TexClampType getWrapT() const
GLboolean r
Definition: glcorearb.h:1222
GLfloat GLfloat GLfloat alpha
Definition: glcorearb.h:112
FMT_INLINE void print(format_string< T...> fmt, T &&...args)
Definition: core.h:2976
bool getMipMap() const
RE_TextureCompare
bool isMutable() const
Definition: RE_OGLTexture.h:64
GLint y
Definition: glcorearb.h:103
GLint GLint GLint GLint zoffset
Definition: glcorearb.h:477
void setFormat(RE_GPUType data, int vectorsize, RE_TextureFormatExtra format_extra=RE_TEXTURE_FORMAT_EXTRA_NONE)
Definition: format.h:895