Skip to content

Commit

Permalink
error in the builtin image classes should be fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacey committed Sep 27, 2023
1 parent 390d429 commit 83c51aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,12 @@ bool Image::load(std::string_view _fname,bool _flipY) noexcept
m_height = 1024;
m_channels = 3;
m_format = GL_RGB;
m_data= std::make_unique<unsigned char []>(m_width * m_height * m_channelsx);
m_data= std::make_unique<unsigned char []>(m_width * m_height * m_channel);
size_t index = 0;
constexpr float checkSize = 20;
for(int y = 0; y < m_height; ++y)
for(GLuint y = 0; y < m_height; ++y)
{
for(int x = 0; x < m_width; ++x)
for(GLuint x = 0; x < m_width; ++x)
{
if(fmod(floor(checkSize * x / static_cast<float>(m_width)) + floor(checkSize * y / static_cast<float>(m_height)), 2.0f) < 1.0f)
{
Expand Down

0 comments on commit 83c51aa

Please sign in to comment.