quick check with linters
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
Framebuffer::Framebuffer(uint fbo, uint depth, std::unique_ptr<Texture> texture)
|
||||
: fbo(fbo), depth(depth), texture(std::move(texture))
|
||||
{
|
||||
if (texture) {
|
||||
width = texture->getWidth();
|
||||
height = texture->getHeight();
|
||||
if (this->texture) {
|
||||
width = this->texture->getWidth();
|
||||
height = this->texture->getHeight();
|
||||
} else {
|
||||
width = 0;
|
||||
height = 0;
|
||||
|
||||
@@ -35,11 +35,10 @@ ImageData::~ImageData() {
|
||||
}
|
||||
|
||||
void ImageData::flipX() {
|
||||
uint size;
|
||||
switch (format) {
|
||||
case ImageFormat::rgb888:
|
||||
case ImageFormat::rgba8888: {
|
||||
size = (format == ImageFormat::rgba8888) ? 4 : 3;
|
||||
uint size = (format == ImageFormat::rgba8888) ? 4 : 3;
|
||||
ubyte* pixels = (ubyte*)data;
|
||||
for (uint y = 0; y < height; y++) {
|
||||
for (uint x = 0; x < width/2; x++) {
|
||||
@@ -58,11 +57,10 @@ void ImageData::flipX() {
|
||||
}
|
||||
|
||||
void ImageData::flipY() {
|
||||
uint size;
|
||||
switch (format) {
|
||||
case ImageFormat::rgb888:
|
||||
case ImageFormat::rgba8888: {
|
||||
size = (format == ImageFormat::rgba8888) ? 4 : 3;
|
||||
uint size = (format == ImageFormat::rgba8888) ? 4 : 3;
|
||||
ubyte* pixels = (ubyte*)data;
|
||||
for (uint y = 0; y < height/2; y++) {
|
||||
for (uint x = 0; x < width; x++) {
|
||||
|
||||
@@ -38,8 +38,7 @@ void TextureAnimator::update(float delta) {
|
||||
uint elemDstId = elem.dstTexture->getId();
|
||||
uint elemSrcId = elem.srcTexture->getId();
|
||||
|
||||
if (changedTextures.find(elemDstId) == changedTextures.end())
|
||||
changedTextures.insert(elemDstId);
|
||||
changedTextures.insert(elemDstId);
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, fboD);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, elemDstId, 0);
|
||||
|
||||
Reference in New Issue
Block a user