removed wasm-unsupported set_border_color of gpu texture

This commit is contained in:
Dmitry Stepanov
2025-03-20 23:04:38 +03:00
parent 46f4491b24
commit 548b4e0989
2 changed files with 1 additions and 22 deletions
-16
View File
@@ -19,7 +19,6 @@
// SOFTWARE.
use crate::{
core::color::Color,
error::FrameworkError,
gl::{server::GlGraphicsServer, ToGlConstant},
gpu_texture::{
@@ -501,21 +500,6 @@ impl GpuTextureTrait for GlTexture {
}
}
fn set_border_color(&self, #[allow(unused_variables)] color: Color) {
#[cfg(not(target_arch = "wasm32"))]
unsafe {
let temp_binding = self.make_temp_binding();
let color = color.as_frgba();
let color = [color.x, color.y, color.z, color.w];
temp_binding.server.gl.tex_parameter_f32_slice(
self.kind.get().gl_texture_target(),
glow::TEXTURE_BORDER_COLOR,
&color,
);
}
}
fn set_data(
&self,
kind: GpuTextureKind,
+1 -6
View File
@@ -23,7 +23,7 @@
#![warn(missing_docs)]
use crate::{core::color::Color, define_shared_wrapper, error::FrameworkError};
use crate::{define_shared_wrapper, error::FrameworkError};
use fyrox_core::define_as_any_trait;
/// A kind of GPU texture.
@@ -634,11 +634,6 @@ pub trait GpuTextureTrait: GpuTextureAsAny {
/// Returns current wrap mode for the given coordinate.
fn wrap_mode(&self, coordinate: Coordinate) -> WrapMode;
/// Sets border color of the texture. Works together with [`WrapMode::ClampToBorder`] and
/// essentially forces the GPU to use the given color when it tries to read outside the texture
/// bounds.
fn set_border_color(&self, color: Color);
/// Sets the new data of the texture. This method is also able to change the kind of the texture
/// and its pixel kind.
fn set_data(