Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devel #2978

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Devel #2978

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions RenderSystems/Direct3D11/include/OgreD3D11Texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ namespace Ogre {
void createInternalResourcesImpl(void);
/// free internal resources
void freeInternalResourcesImpl(void);
/// internal method, set Texture class source image protected attributes
void _setSrcAttributes(unsigned long width, unsigned long height, unsigned long depth, PixelFormat format);
/// internal method, set Texture class final texture protected attributes
void _setFinalAttributes(unsigned long width, unsigned long height, unsigned long depth, PixelFormat format, UINT miscflags);

Expand All @@ -113,9 +111,6 @@ namespace Ogre {
void notifyDeviceLost(D3D11Device* device);
void notifyDeviceRestored(D3D11Device* device);

/// overridden from Resource
void loadImpl();

protected:
D3D11Device& mDevice;

Expand Down
22 changes: 0 additions & 22 deletions RenderSystems/Direct3D11/src/OgreD3D11Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,6 @@ namespace Ogre

}
//---------------------------------------------------------------------
void D3D11Texture::loadImpl()
{
Texture::loadImpl();

if (mUsage & TU_RENDERTARGET)
{
return;
}

_setSrcAttributes(mWidth, mHeight, mDepth, mFormat);
}
//---------------------------------------------------------------------
void D3D11Texture::freeInternalResourcesImpl()
{
mpTex.Reset();
Expand Down Expand Up @@ -483,16 +471,6 @@ namespace Ogre
_createSurfaceList();
}
//---------------------------------------------------------------------
void D3D11Texture::_setSrcAttributes(unsigned long width, unsigned long height,
unsigned long depth, PixelFormat format)
{
// set source image attributes
mSrcWidth = width;
mSrcHeight = height;
mSrcDepth = depth;
mSrcFormat = format;
}
//---------------------------------------------------------------------
void D3D11Texture::_createSurfaceList(void)
{
// Create new list of surfaces
Expand Down
2 changes: 0 additions & 2 deletions RenderSystems/Direct3D9/include/OgreD3D9Texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ namespace Ogre {
void createInternalResourcesImpl(IDirect3DDevice9* d3d9Device);
/// free internal resources
void freeInternalResourcesImpl(void);
/// internal method, set Texture class source image protected attributes
void _setSrcAttributes(unsigned long width, unsigned long height, unsigned long depth, PixelFormat format);
/// internal method, set Texture class final texture protected attributes
void _setFinalAttributes(IDirect3DDevice9* d3d9Device, TextureResources* textureResources,
unsigned long width, unsigned long height, unsigned long depth, PixelFormat format);
Expand Down
42 changes: 0 additions & 42 deletions RenderSystems/Direct3D9/src/OgreD3D9Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -857,48 +857,6 @@ namespace Ogre
_createSurfaceList(d3d9Device, textureResources);
}
/****************************************************************************************/
void D3D9Texture::_setSrcAttributes(unsigned long width, unsigned long height,
unsigned long depth, PixelFormat format)
{
// set source image attributes
mSrcWidth = width;
mSrcHeight = height;
mSrcDepth = depth;
mSrcFormat = format;
// say to the world what we are doing
if (!TextureManager::getSingleton().getVerbose()) return;
switch (getTextureType())
{
case TEX_TYPE_1D:
if (mUsage & TU_RENDERTARGET)
LogManager::getSingleton().logMessage("D3D9 : Creating 1D RenderTarget, name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
else
LogManager::getSingleton().logMessage("D3D9 : Loading 1D Texture, image name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
break;
case TEX_TYPE_2D:
if (mUsage & TU_RENDERTARGET)
LogManager::getSingleton().logMessage("D3D9 : Creating 2D RenderTarget, name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
else
LogManager::getSingleton().logMessage("D3D9 : Loading 2D Texture, image name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
break;
case TEX_TYPE_3D:
if (mUsage & TU_RENDERTARGET)
LogManager::getSingleton().logMessage("D3D9 : Creating 3D RenderTarget, name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
else
LogManager::getSingleton().logMessage("D3D9 : Loading 3D Texture, image name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
break;
case TEX_TYPE_CUBE_MAP:
if (mUsage & TU_RENDERTARGET)
LogManager::getSingleton().logMessage("D3D9 : Creating Cube map RenderTarget, name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
else
LogManager::getSingleton().logMessage("D3D9 : Loading Cube Texture, base image name : '" + getName() + "' with " + StringConverter::toString(mNumMipmaps) + " mip map levels");
break;
default:
unloadImpl();
OGRE_EXCEPT( Exception::ERR_INTERNAL_ERROR, "Unknown texture type", "D3D9Texture::_setSrcAttributes" );
}
}
/****************************************************************************************/
D3DTEXTUREFILTERTYPE D3D9Texture::_getBestFilterMethod(IDirect3DDevice9* d3d9Device)
{
D3D9Device* device = D3D9RenderSystem::getDeviceManager()->getDeviceFromD3D9Device(d3d9Device);
Expand Down