This commit is contained in:
Jonatan Nilsson 2024-08-24 00:35:34 +00:00
parent 120447eacf
commit 7f53f0a875
2 changed files with 15 additions and 1 deletions

View File

@ -3,9 +3,17 @@ name = "rust_opengl_helloworld"
version = "1.0.0"
edition = "2021"
[profile.release]
lto = "fat"
panic = "abort"
opt-level = "z"
codegen-units = 1
[dependencies]
gl = "0.14.0"
glfw = { version = "0.57.0", features = ["wayland"] }
#jxl-oxide = { version = "0.8.1" }
rav1d = { version = "1.0.0", default-features = false, features = ["bitdepth_8", "bitdepth_16"] }
#bytemuck = "1"
#ogl33 = { version = "0.2.0", features = ["debug_error_checks"]}
#beryllium = "0.13.3"

View File

@ -1,5 +1,7 @@
use std::convert::TryInto;
// use jxl_oxide::JxlImage;
use rav1d::include::dav1d;
use rav1d;
use glfw;
use glfw::Context;
use gl;
@ -9,6 +11,10 @@ const HEIGHT: u32 = 320;
const TITLE: &str = "Hello From OpenGL World!";
fn main() {
// let image = JxlImage::builder().open("combined.jxl").expect("Failed to read image header");
// println!("{:?}", image.image_header()); // Prints the image header
//let image = dav1d::rav1d_open("combined.avif");
use glfw::fail_on_errors;
let mut glfw = glfw::init(fail_on_errors!()).unwrap();
glfw.window_hint(glfw::WindowHint::ContextVersion(3, 3));