gl: Update to glow 0.11.0 (#594)
* gl: update for newtype wrappers Default impl * build(deps): bump glow from 0.10.0 to 0.11.0 Bumps [glow](https://github.com/grovesNL/glow) from 0.10.0 to 0.11.0. - [Release notes](https://github.com/grovesNL/glow/releases) - [Commits](https://github.com/grovesNL/glow/commits) --- updated-dependencies: - dependency-name: glow dependency-type: direct:production update-type: version-update:semver-minor
This commit is contained in:
parent
0d5feb9454
commit
83bbb9fe4f
|
@ -784,9 +784,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glow"
|
||||
version = "0.10.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "945be163fdb893227410c8b44c2412dade922585b262d1daa6a7e96135217d4c"
|
||||
checksum = "4f04649123493bc2483cbef4daddb45d40bbdae5adb221a63a23efdb0cc99520"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"slotmap",
|
||||
|
|
|
@ -30,7 +30,7 @@ opt-level = 1
|
|||
cfg-if = "1.0.0"
|
||||
wasm-bindgen = "0.2.76"
|
||||
winit = { version = "0.25.0", features = [ "web-sys" ]}
|
||||
glow = "0.10.0"
|
||||
glow = "0.11.0"
|
||||
byteorder = "1.4.3"
|
||||
serde = "1.0.129"
|
||||
serde_json = "1.0.66"
|
||||
|
|
|
@ -259,7 +259,6 @@ pub const NEAREST_MIPMAP_LINEAR: TextureValue = gl::NEAREST_MIPMAP_LINEAR as Tex
|
|||
pub const CLAMP_TO_EDGE: TextureValue = gl::CLAMP_TO_EDGE as TextureValue;
|
||||
|
||||
/// `Texture` is a buffer of data used by fragment shaders.
|
||||
#[derive(Default)]
|
||||
pub struct Texture(glow::Texture);
|
||||
|
||||
impl Texture {
|
||||
|
@ -440,6 +439,12 @@ impl Texture {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Texture {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Texture {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
@ -459,7 +464,6 @@ pub type ShaderParameter = u32;
|
|||
pub const COMPILE_STATUS: ShaderParameter = gl::COMPILE_STATUS;
|
||||
pub const INFO_LOG_LENGTH: ShaderParameter = gl::INFO_LOG_LENGTH;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Program(glow::Program);
|
||||
|
||||
impl Program {
|
||||
|
@ -500,6 +504,12 @@ impl Program {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Program {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Program {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
@ -649,7 +659,6 @@ impl Attribute {
|
|||
// VertexArray is used to store state needed to render vertices.
|
||||
// This includes buffers, the format of the buffers and enabled
|
||||
// attributes.
|
||||
#[derive(Default)]
|
||||
pub struct VertexArray(glow::VertexArray);
|
||||
|
||||
impl VertexArray {
|
||||
|
@ -672,12 +681,17 @@ impl VertexArray {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for VertexArray {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for VertexArray {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
glow_context().delete_vertex_array(self.0);
|
||||
}
|
||||
self.0 = glow::VertexArray::default();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -710,7 +724,6 @@ pub const READ_ONLY: Access = gl::READ_ONLY;
|
|||
pub const WRITE_ONLY: Access = gl::WRITE_ONLY;
|
||||
|
||||
/// `Buffer` is a storage for vertex data.
|
||||
#[derive(Default)]
|
||||
pub struct Buffer(glow::Buffer);
|
||||
|
||||
impl Buffer {
|
||||
|
@ -765,6 +778,12 @@ impl Buffer {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Buffer {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Buffer {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
@ -809,9 +828,14 @@ pub const COLOR_ATTACHMENT_1: Attachment = gl::COLOR_ATTACHMENT1;
|
|||
pub const COLOR_ATTACHMENT_2: Attachment = gl::COLOR_ATTACHMENT2;
|
||||
pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Framebuffer(glow::Framebuffer);
|
||||
|
||||
impl Default for Framebuffer {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn check_framebuffer_status() {
|
||||
unsafe {
|
||||
let status = glow_context().check_framebuffer_status(gl::FRAMEBUFFER);
|
||||
|
|
Loading…
Reference in New Issue