Skip to content

Commit

Permalink
moved gl_wrapper to its own crate
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNumerus committed Dec 5, 2022
1 parent ac0af2f commit 90d4cb7
Show file tree
Hide file tree
Showing 37 changed files with 67 additions and 47 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 3 additions & 38 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,6 @@
[package]
name = "blackhole"
version = "0.1.0"
edition = "2021"
[workspace]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "blackhole"
path = "src/bin/blackhole/main.rs"

[[bin]]
name = "blackhole-cli"
path = "src/bin/blackhole/main-cli.rs"

[dependencies]
png = "0.17"
cgmath = { version = "0.18", features = ["swizzle"] }
rand = { version = "0.8", features = ["small_rng"] }
rayon = "1.5"
clap = { version = "4.0.10", features = ["derive"] }
once_cell = "1.16.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
json5 = "0.4.1"
winit = "0.27.5"
glutin = "0.30.2"
glutin-winit = "0.2.1"
raw-window-handle = "0.5.0"
gl = "0.14.0"
thiserror = "1.0.37"

[dev-dependencies]
criterion = "0.4.0"
members = ["blackhole", "gl_wrapper"]

[profile.release]
debug = true

[[bench]]
name = "dist_fn"
harness = false
debug = true
39 changes: 39 additions & 0 deletions blackhole/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[package]
name = "blackhole"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "blackhole"
path = "src/bin/blackhole/main.rs"

[[bin]]
name = "blackhole-cli"
path = "src/bin/blackhole/main-cli.rs"

[dependencies]
png = "0.17"
cgmath = { version = "0.18", features = ["swizzle"] }
rand = { version = "0.8", features = ["small_rng"] }
rayon = "1.5"
clap = { version = "4.0.10", features = ["derive"] }
once_cell = "1.16.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
json5 = "0.4.1"
winit = "0.27.5"
glutin = "0.30.2"
glutin-winit = "0.2.1"
raw-window-handle = "0.5.0"
gl = "0.14.0"
gl_wrapper = {path = "../gl_wrapper"}
thiserror = "1.0.37"

[dev-dependencies]
criterion = "0.4.0"

[[bench]]
name = "dist_fn"
harness = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use blackhole::filter::BlackmanHarrisFilter;
use blackhole::framebuffer::{FrameBuffer, Pixel};

mod args;
mod gl_wrapper;
mod renderer;
mod scene_loader;
mod shaders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ use winit::window::{Window, WindowBuilder};
use blackhole::filter::BlackmanHarrisFilter;
use blackhole::framebuffer::FrameBuffer;

use gl_wrapper::geometry::{GeometryBuilder, VertexAttribute};
use gl_wrapper::program::ProgramBuilder;
use gl_wrapper::renderer::GlRenderer;
use gl_wrapper::texture::{Texture2D, TextureFormats};
use gl_wrapper::QUAD;

mod args;
mod gl_wrapper;
mod renderer;
mod scene_loader;
mod shaders;

use crate::gl_wrapper::geometry::{GeometryBuilder, VertexAttribute};
use crate::gl_wrapper::program::ProgramBuilder;
use crate::gl_wrapper::renderer::GlRenderer;
use crate::gl_wrapper::texture::{Texture2D, TextureFormats};
use crate::gl_wrapper::QUAD;
use crate::renderer::{RenderInMsg, RenderOutMsg};
use args::Args;
use blackhole::frame::{Frame, Region};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions gl_wrapper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "gl_wrapper"
version = "0.0.0"
edition = "2021"

[dependencies]
gl = "0.14.0"
thiserror = "1.0.37"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::gl_wrapper::geometry::Geometry;
use crate::gl_wrapper::program::Program;
use crate::geometry::Geometry;
use crate::program::Program;

pub struct GlRenderer {
current_program: u32,
Expand Down
File renamed without changes.

0 comments on commit 90d4cb7

Please sign in to comment.