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 #3286

Merged
merged 4 commits into from
Feb 9, 2025
Merged

Devel #3286

Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Main: Texture::getBuffer - const correctness
  • Loading branch information
paroj committed Feb 8, 2025
commit 8f48fd4e1d5690add6a5bfe04c23da82e7374203
2 changes: 1 addition & 1 deletion OgreMain/include/OgreTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ namespace Ogre {
@remarks The buffer is invalidated when the resource is unloaded or destroyed.
Do not use it after the lifetime of the containing texture.
*/
virtual const HardwarePixelBufferSharedPtr& getBuffer(size_t face=0, size_t mipmap=0);
virtual const HardwarePixelBufferSharedPtr& getBuffer(size_t face=0, size_t mipmap=0) const;


/** Populate an Image with the contents of this texture.
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/include/OgreTextureManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ namespace Ogre {
: Texture(creator, name, handle, group)
{
}
const HardwarePixelBufferSharedPtr& getBuffer(size_t, size_t) override
const HardwarePixelBufferSharedPtr& getBuffer(size_t, size_t) const override
{
static HardwarePixelBufferSharedPtr nullBuffer;
return nullBuffer;
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/OgreTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ namespace Ogre {
}
}
}
const HardwarePixelBufferSharedPtr& Texture::getBuffer(size_t face, size_t mipmap)
const HardwarePixelBufferSharedPtr& Texture::getBuffer(size_t face, size_t mipmap) const
{
OgreAssert(face < getNumFaces(), "out of range");
OgreAssert(mipmap <= mNumMipmaps, "out of range");
Expand Down