Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
Browse files Browse the repository at this point in the history
Arthurfernades committed Jan 15, 2025
1 parent 2678752 commit af659d4
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 2 additions & 8 deletions OgreMain/include/OgreTexture.h
Original file line number Diff line number Diff line change
@@ -148,11 +148,7 @@ namespace Ogre {

/** Sets the surface when you already have one
*/
virtual void _setSurface(void* surface) { mSurface = surface; }

/** Gets the surface
*/
void* getSurface(void) const { return mSurface; }
virtual void _setSurface(void* surface) {}

/** Gets the number of mipmaps to be used for this texture.
*/
@@ -481,9 +477,7 @@ namespace Ogre {
typedef std::vector<HardwarePixelBufferSharedPtr> SurfaceList;
SurfaceList mSurfaceList;

TextureType mTextureType;

void* mSurface;
TextureType mTextureType;

void prepareImpl() override;
void unprepareImpl() override;
4 changes: 4 additions & 0 deletions RenderSystems/Direct3D11/include/OgreD3D11Texture.h
Original file line number Diff line number Diff line change
@@ -108,6 +108,8 @@ namespace Ogre {
/// mipmap level. This method must be called after the D3D texture object was created
void _createSurfaceList(void);

void _setSurface(void* surface) override;

void notifyDeviceLost(D3D11Device* device);
void notifyDeviceRestored(D3D11Device* device);

@@ -128,6 +130,8 @@ namespace Ogre {

D3D11_SHADER_RESOURCE_VIEW_DESC mSRVDesc;
bool mAutoMipMapGeneration;

void* mSurface;
};

/// RenderTexture implementation for D3D11
2 changes: 2 additions & 0 deletions RenderSystems/Direct3D11/src/OgreD3D11Texture.cpp
Original file line number Diff line number Diff line change
@@ -548,6 +548,8 @@ void D3D11Texture::_createSurfaceList(void)
}
}
//---------------------------------------------------------------------
void D3D11Texture :: _setSurface(void* surface) { mSurface = surface; }
//---------------------------------------------------------------------
// D3D11RenderTexture
//---------------------------------------------------------------------
void D3D11RenderTexture::rebind(D3D11HardwarePixelBuffer* buffer)

0 comments on commit af659d4

Please sign in to comment.