mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
removed wasm-unsupported set_border_color of gpu texture
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user