Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Jan 8, 2025
1 parent 19380b3 commit e4fcc26
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ gc.properties
/android-example/**/.settings
SDL2
*.code-workspace
.vscode/settings.json
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

3 changes: 1 addition & 2 deletions examples/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
// OpenGL convenience wrappers used in the examples.

use gl;
use gl::types::{GLchar, GLenum, GLint, GLuint};
use gl::types::{GLenum, GLint, GLuint};
use std::fs::File;
use std::io::Read;
use std::os::raw::c_void;
use std::ptr;
use surfman::GLApi;

Expand Down
4 changes: 2 additions & 2 deletions src/platform/generic/egl/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ impl EGLBackedSurface {
// Create our texture.
let texture_object = gl.create_texture().unwrap();
// Save the current texture binding
let mut old_texture_object = gl.get_parameter_texture(gl::TEXTURE_BINDING_2D);
let old_texture_object = gl.get_parameter_texture(gl::TEXTURE_BINDING_2D);
gl.bind_texture(gl::TEXTURE_2D, Some(texture_object));
// Unbind PIXEL_UNPACK_BUFFER, because if it is bound,
// it can cause errors in glTexImage2D.
// TODO: should this be inside a check for GL 2.0?
let mut unpack_buffer = gl.get_parameter_buffer(gl::PIXEL_UNPACK_BUFFER_BINDING);
let unpack_buffer = gl.get_parameter_buffer(gl::PIXEL_UNPACK_BUFFER_BINDING);
if unpack_buffer.is_some() {
gl.bind_buffer(gl::PIXEL_UNPACK_BUFFER, None);
}
Expand Down
2 changes: 0 additions & 2 deletions src/platform/unix/wayland/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//
//! OpenGL rendering contexts on Wayland.
use glow::HasContext;

use super::device::Device;
use super::surface::Surface;
use crate::context::ContextID;
Expand Down
2 changes: 0 additions & 2 deletions src/platform/unix/x11/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//
//! OpenGL rendering contexts on X11 via EGL.
use glow::HasContext;

use super::device::Device;
use super::surface::Surface;
use crate::context::ContextID;
Expand Down
1 change: 0 additions & 1 deletion src/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use crate::context::ContextID;

use euclid::default::Size2D;
use glow::NativeFramebuffer;
use std::fmt::{self, Display, Formatter};

/// Various data about the surface.
Expand Down

0 comments on commit e4fcc26

Please sign in to comment.