Skip to content

Commit

Permalink
compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Sep 20, 2024
1 parent 681973d commit 081c763
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions RenderSystems/Direct3D11/src/OgreD3D11HLSLProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ namespace Ogre
GET_SIZE_OF_NAMES( memberTypeNameSize, mMemberTypeName, Name );

// clang-format off
int sizeOfData = sizeof(uint32) + mMicroCode.size()
size_t sizeOfData = sizeof(uint32) + mMicroCode.size()
+ sizeof(uint32) // mConstantBufferSize
+ sizeof(uint32) // mConstantBufferNr
+ sizeof(uint32) // mNumSlots
Expand Down Expand Up @@ -973,7 +973,7 @@ namespace Ogre

// create microcode
GpuProgramManager::Microcode newMicrocode =
GpuProgramManager::getSingleton().createMicrocode( sizeOfData );
GpuProgramManager::getSingleton().createMicrocode( (uint32)sizeOfData );

# define WRITE_START( curlist, memberType ) \
{ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ namespace Ogre
Windows::Foundation::Rect rc = mCoreWindow->Bounds;
mLeft = (int)floorf( rc.X * scale + 0.5f );
mTop = (int)floorf( rc.Y * scale + 0.5f );
mRequestedWidth = rc.Width;
mRequestedHeight = rc.Height;
mRequestedWidth = (int)floorf( rc.Width + 0.5f );
mRequestedHeight = (int)floorf( rc.Height + 0.5f );
}
//-----------------------------------------------------------------------------------
D3D11WindowCoreWindow::~D3D11WindowCoreWindow() { destroy(); }
Expand Down Expand Up @@ -176,8 +176,8 @@ namespace Ogre
Windows::Foundation::Rect rc = mCoreWindow->Bounds;
mLeft = (int)floorf( rc.X * scale + 0.5f );
mTop = (int)floorf( rc.Y * scale + 0.5f );
mRequestedWidth = rc.Width;
mRequestedHeight = rc.Height;
mRequestedWidth = (int)floorf( rc.Width + 0.5f );
mRequestedHeight = (int)floorf( rc.Height + 0.5f );

resizeSwapChainBuffers( 0, 0 ); // pass zero to autodetect size
}
Expand Down Expand Up @@ -245,8 +245,8 @@ namespace Ogre
static_cast<float>( mSwapChainPanel->ActualHeight ) );
mCompositionScale = Windows::Foundation::Size( mSwapChainPanel->CompositionScaleX,
mSwapChainPanel->CompositionScaleY );
mRequestedWidth = sz.Width;
mRequestedHeight = sz.Height;
mRequestedWidth = (int)floorf( sz.Width + 0.5f );
mRequestedHeight = (int)floorf( sz.Height + 0.5f );
}
//-----------------------------------------------------------------------------------
D3D11WindowSwapChainPanel::~D3D11WindowSwapChainPanel() { destroy(); }
Expand Down Expand Up @@ -363,8 +363,8 @@ namespace Ogre
static_cast<float>( mSwapChainPanel->ActualHeight ) );
mCompositionScale = Windows::Foundation::Size( mSwapChainPanel->CompositionScaleX,
mSwapChainPanel->CompositionScaleY );
mRequestedWidth = sz.Width;
mRequestedHeight = sz.Height;
mRequestedWidth = (int)floorf( sz.Width + 0.5f );
mRequestedHeight = (int)floorf( sz.Height + 0.5f );

int widthPx = std::max( 1, (int)floorf( mRequestedWidth * mCompositionScale.Width + 0.5f ) );
int heightPx = std::max( 1, (int)floorf( mRequestedHeight * mCompositionScale.Height + 0.5f ) );
Expand Down

0 comments on commit 081c763

Please sign in to comment.