diff --git a/core/src/gui/widgets/image.cpp b/core/src/gui/widgets/image.cpp index 0b6211af..6350df59 100644 --- a/core/src/gui/widgets/image.cpp +++ b/core/src/gui/widgets/image.cpp @@ -1,10 +1,9 @@ #include namespace ImGui { - ImageDisplay::ImageDisplay(int width, int height, GLenum format) { + ImageDisplay::ImageDisplay(int width, int height) { _width = width; _height = height; - _format = format; buffer = malloc(_width * _height * 4); activeBuffer = malloc(_width * _height * 4); memset(buffer, 0, _width * _height * 4); @@ -61,6 +60,7 @@ namespace ImGui { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _width, _height, 0, _format, GL_UNSIGNED_BYTE, activeBuffer); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, activeBuffer); } + } \ No newline at end of file diff --git a/core/src/gui/widgets/image.h b/core/src/gui/widgets/image.h index eb31d6db..13f67d24 100644 --- a/core/src/gui/widgets/image.h +++ b/core/src/gui/widgets/image.h @@ -9,7 +9,7 @@ namespace ImGui { class ImageDisplay { public: - ImageDisplay(int width, int height, GLenum format); + ImageDisplay(int width, int height); ~ImageDisplay(); void draw(const ImVec2& size_arg = ImVec2(0, 0)); void swap(); @@ -24,7 +24,6 @@ namespace ImGui { int _width; int _height; - GLenum _format; GLuint textureId;