summaryrefslogtreecommitdiff
path: root/src/render/Texture.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-11 00:27:13 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-11 00:27:13 +0200
commit26579fa9627c46af851efea1381e910ea48e3e73 (patch)
treee4643d1aa0125976e20c183bda49db5ed21196c1 /src/render/Texture.cpp
parent0c61a1530f2da2571e8285df106b31af73843411 (diff)
texture: fix styling
Diffstat (limited to 'src/render/Texture.cpp')
-rw-r--r--src/render/Texture.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/render/Texture.cpp b/src/render/Texture.cpp
index ff466f32..1820d0fb 100644
--- a/src/render/Texture.cpp
+++ b/src/render/Texture.cpp
@@ -12,11 +12,10 @@ CTexture::CTexture(wlr_texture* tex) {
m_iTarget = attrs.target;
m_iTexID = attrs.tex;
- if (m_iTarget == GL_TEXTURE_2D) {
+ if (m_iTarget == GL_TEXTURE_2D)
m_iType = attrs.has_alpha ? TEXTURE_RGBA : TEXTURE_RGBX;
- } else {
+ else
m_iType = TEXTURE_EXTERNAL;
- }
m_vSize = Vector2D(tex->width, tex->height);
}
@@ -29,7 +28,6 @@ void CTexture::destroyTexture() {
}
void CTexture::allocate() {
- if (!m_iTexID) {
+ if (!m_iTexID)
glGenTextures(1, &m_iTexID);
- }
} \ No newline at end of file