summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/src/rendering/backend/opengl.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/engine/src/rendering/backend/opengl.rs b/engine/src/rendering/backend/opengl.rs
index 49f857b..c5e3217 100644
--- a/engine/src/rendering/backend/opengl.rs
+++ b/engine/src/rendering/backend/opengl.rs
@@ -1248,7 +1248,7 @@ fn update_texture_object(
let gl_texture = GlTexture::from_raw(texture_obj.as_raw());
- gl_texture.store_image(
+ gl_texture.store_image_2d(
curr_gl_ctx,
0,
offset.into(),
@@ -1310,14 +1310,17 @@ fn create_gl_texture(
) -> Result<GlTexture, GlTextureError>
{
let gl_texture = GlTexture::builder()
- .image(image.as_bytes(), get_image_pixel_data_format(image))
.size(image.dimensions().into())
.color_space(if image.color_space_is_srgb() {
GlTextureColorSpace::Srgb
} else {
GlTextureColorSpace::Linear
})
- .create(curr_gl_context)?;
+ .create_2d(
+ curr_gl_context,
+ image.as_bytes(),
+ get_image_pixel_data_format(image),
+ )?;
gl_texture.set_wrap(
curr_gl_context,