1
0
Fork 0

Minor formating fixes.

This commit is contained in:
Henrik Hautakoski 2019-12-29 22:26:05 +01:00
parent 6f53b0c069
commit 4df668e68f
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
76 changed files with 121 additions and 121 deletions

View file

@ -60,8 +60,8 @@ void Texture::create(unsigned width, unsigned heigth, PixelFormat format)
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}
glTexImage2D(GL_TEXTURE_2D, 0,
pixelFormatToInternal(format), width, heigth, 0,
glTexImage2D(GL_TEXTURE_2D, 0,
pixelFormatToInternal(format), width, heigth, 0,
pixelFormatToGL(format), GL_UNSIGNED_BYTE, &empty_pixels[0]);
setSmooth(true);
@ -98,7 +98,7 @@ void Texture::create(const Image& image)
srcFormat = pixelFormatToGL(image.getFormat());
glFormat = pixelFormatToInternal(image.getFormat());
glTexImage2D(GL_TEXTURE_2D, 0, glFormat, m_size.x, m_size.y,
glTexImage2D(GL_TEXTURE_2D, 0, glFormat, m_size.x, m_size.y,
0, srcFormat, GL_UNSIGNED_BYTE, image.getPixels());
setSmooth(true);
@ -157,8 +157,8 @@ void Texture::update(vec2u pos, const Image& image)
format = pixelFormatToGL(image.getFormat());
glTexSubImage2D(GL_TEXTURE_2D, 0, pos.x, pos.y,
image.getWidth(), image.getHeight(),
glTexSubImage2D(GL_TEXTURE_2D, 0, pos.x, pos.y,
image.getWidth(), image.getHeight(),
format, GL_UNSIGNED_BYTE, image.getPixels());
disable();
@ -180,9 +180,9 @@ Image Texture::copyToImage() const
//glPixelStorei(GL_PACK_ALIGNMENT, 4);
glGetTexImage(GL_TEXTURE_2D, 0,
pixelFormatToGL(m_format),
GL_UNSIGNED_BYTE,
glGetTexImage(GL_TEXTURE_2D, 0,
pixelFormatToGL(m_format),
GL_UNSIGNED_BYTE,
&pixels[0]);
img.create(m_format, m_size.x, m_size.y, &pixels[0]);
@ -255,4 +255,4 @@ bool Texture::operator!=(const Texture* other) const
return m_id != other->m_id;
}
} // namespace sp
} // namespace sp