Go to the documentation of this file.
28 #ifndef __D3D11TEXTURE_H__
29 #define __D3D11TEXTURE_H__
35 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined(_WIN32_WINNT_WIN8)
36 #ifndef USE_D3DX11_LIBRARY
37 #define USE_D3DX11_LIBRARY
66 template<
typename fromtype,
typename totype>
69 HRESULT hr = from->QueryInterface(__uuidof(totype), (
void **)to);
76 "D3D11Texture::_queryInterface" );
80 #ifdef USE_D3DX11_LIBRARY
ID3D11DepthStencilView * mDepthStencilView
unsigned long long int ResourceHandle
ID3D11Texture2D * GetTex2D()
Abstract class representing a Texture resource.
ID3D11Texture1D * mp1DTex
D3D11 pointer.
virtual ~D3D11RenderTexture()
void _create1DResourceView()
vector< HardwarePixelBufferSharedPtr >::type SurfaceList
Vector of pointers to subsurfaces.
void freeInternalResourcesImpl(void)
free internal resources
ID3D11ShaderResourceView * mpShaderResourceView
ID3D11Texture2D * mp2DTex
bool mDynamicTextures
The memory pool being used.
void _setFinalAttributes(unsigned long width, unsigned long height, unsigned long depth, PixelFormat format, UINT miscflags)
internal method, set Texture class final texture protected attributes
Class representing an image file.
ID3D11Texture3D * mp3DTex
cubic texture pointer
virtual void getCustomAttribute(const String &name, void *pData)
Gets a custom (maybe platform-specific) attribute.
void _queryInterface(fromtype *from, totype **to)
void unprepareImpl(void)
Internal function for undoing the 'prepare' action.
D3D11_SHADER_RESOURCE_VIEW_DESC getShaderResourceViewDesc() const
void copyToTexture(TexturePtr &target)
overridden from Texture
bool releaseIfDefaultPool(void)
For dealing with lost devices - release the resource if in the default pool (and return true)
void prepareImpl(void)
Internal implementation of the meat of the 'prepare' action.
const bool isError() const
String _getCubeFaceName(unsigned char face) const
internal method, the cube map face name for the spec. face index
HardwarePixelBufferSharedPtr getBuffer(size_t face, size_t mipmap)
Return hardware pixel buffer for a surface.
DXGI_FORMAT mBBPixelFormat
device creation parameters
SharedPtr< vector< MemoryDataStreamPtr >::type > LoadedStreams
ID3D11ShaderResourceView * getTexture()
retrieves a pointer to the actual texture
bool requiresTextureFlipping() const
void createInternalResourcesImpl(void)
Implementation of creating internal texture resources.
void _loadTex(LoadedStreams &loadedStreams)
internal method, load a normal texture
void _create3DTex()
internal method, create a blank cube texture
void postLoadImpl()
overridden from Resource
void rebind(D3D11HardwarePixelBuffer *buffer)
PixelFormat
The pixel format used for images, textures, and render surfaces.
void _createSurfaceList(void)
internal method, create D3D11HardwarePixelBuffers for every face and mipmap level.
ID3D11Texture3D * GetTex3D()
void loadImage(const Image &img)
overridden from Texture
LoadedStreams mLoadedStreams
Vector of pointers to streams that were pulled from disk by prepareImpl but have yet to be pushed int...
DXGI_FORMAT _chooseD3DFormat()
internal method, return a D3D pixel format for texture creation
D3D11_SHADER_RESOURCE_VIEW_DESC mSRVDesc
void _create2DTex()
internal method, create a blank normal 2D texture
ID3D11RenderTargetView * mRenderTargetView
RenderTexture implementation for D3D11.
Defines a generic resource handler.
Reference-counted shared pointer, used for objects where implicit destruction is required.
ID3D11Resource * mpTex
actual texture pointer
void freeInternalResources(void)
Frees internal texture resources for this texture.
bool mAutoMipMapGeneration
bool HasAutoMipMapGenerationEnabled() const
LoadedStreams _prepareCubeTex()
bool recreateIfDefaultPool(D3D11Device &device)
For dealing with lost devices - recreate the resource if in the default pool (and return true)
Shared pointer implementation used to share pixel buffers.
void _create1DTex()
internal method, create a blank normal 1D Dtexture
ID3D11Texture1D * GetTex1D()
This class represents a RenderTarget that renders to a Texture.
ID3D11Resource * getTextureResource()
void loadImpl()
overridden from Resource
void createInternalResources(void)
Creates the internal texture resources for this texture.
void _loadDDS(DataStreamPtr &dstream)
LoadedStreams _prepareNormTex()
D3D11Texture(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
constructor
void _create3DResourceView()
D3D11RenderTexture(const String &name, D3D11HardwarePixelBuffer *buffer, D3D11Device &device)
const String getErrorDescription(const HRESULT hr=NO_ERROR) const
#define OGRE_EXCEPT(num, desc, src)
void _create2DResourceView()
Interface describing a manual resource loader.
LoadedStreams _prepareVolumeTex()
String mCubeFaceNames[6]
cube texture individual face names
~D3D11Texture()
destructor
D3D11Device & mDevice
D3DDevice pointer.
void _setSrcAttributes(unsigned long width, unsigned long height, unsigned long depth, PixelFormat format)
internal method, set Texture class source image protected attributes
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15