Diligent Engine  v.2.4.g
Namespaces | Macros | Functions
TextureBase.cpp File Reference
#include "Texture.h"
#include <algorithm>
#include "DeviceContext.h"
#include "GraphicsAccessories.hpp"

Namespaces

 Diligent
 The library uses Direct3D-style math:
 

Macros

#define LOG_TEXTURE_ERROR_AND_THROW(...)   LOG_ERROR_AND_THROW("Texture '", (Desc.Name ? Desc.Name : ""), "': ", ##__VA_ARGS__)
 
#define VERIFY_TEX_PARAMS(Expr, ...)
 
#define TEX_VIEW_VALIDATION_ERROR(...)   LOG_ERROR_AND_THROW("\n Failed to create texture view '", (ViewDesc.Name ? ViewDesc.Name : ""), "' for texture '", TexDesc.Name, "': ", ##__VA_ARGS__)
 

Functions

void Diligent::ValidateTextureDesc (const TextureDesc &TexDesc) noexcept(false)
 Validates texture description and throws an exception in case of an error. More...
 
void Diligent::ValidateTextureRegion (const TextureDesc &TexDesc, Uint32 MipLevel, Uint32 Slice, const Box &Box)
 
void Diligent::ValidateUpdateTextureParams (const TextureDesc &TexDesc, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData)
 Validates update texture command paramters. More...
 
void Diligent::ValidateCopyTextureParams (const CopyTextureAttribs &CopyAttribs)
 Validates copy texture command paramters. More...
 
void Diligent::ValidateMapTextureParams (const TextureDesc &TexDesc, Uint32 MipLevel, Uint32 ArraySlice, MAP_TYPE MapType, Uint32 MapFlags, const Box *pMapRegion)
 Validates map texture command paramters. More...
 
void Diligent::ValidatedAndCorrectTextureViewDesc (const TextureDesc &TexDesc, TextureViewDesc &ViewDesc) noexcept(false)
 Validates and corrects texture view description; throws an exception in case of an error. More...
 

Macro Definition Documentation

◆ LOG_TEXTURE_ERROR_AND_THROW

#define LOG_TEXTURE_ERROR_AND_THROW (   ...)    LOG_ERROR_AND_THROW("Texture '", (Desc.Name ? Desc.Name : ""), "': ", ##__VA_ARGS__)

◆ TEX_VIEW_VALIDATION_ERROR

#define TEX_VIEW_VALIDATION_ERROR (   ...)    LOG_ERROR_AND_THROW("\n Failed to create texture view '", (ViewDesc.Name ? ViewDesc.Name : ""), "' for texture '", TexDesc.Name, "': ", ##__VA_ARGS__)

◆ VERIFY_TEX_PARAMS

#define VERIFY_TEX_PARAMS (   Expr,
  ... 
)
Value:
do \
{ \
if (!(Expr)) \
{ \
LOG_ERROR("Texture '", (TexDesc.Name ? TexDesc.Name : ""), "': ", ##__VA_ARGS__); \
} \
} while (false)