mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Improve glow error reporting (#1403)
* Improve glow error reporting * Add more check_for_gl_error calls * Remove clippy lint list from egui_glow lib.rs - Forgotten in https://github.com/emilk/egui/pull/1394 * egui_glow: move vao code to own file * Cleanup: `use glow::HasContext as _;` Co-authored-by: Zachary Kohnen <me@dusterthefirst.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use glow::HasContext;
|
||||
use std::convert::TryInto;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
@@ -14,6 +13,7 @@ pub(crate) enum ShaderVersion {
|
||||
|
||||
impl ShaderVersion {
|
||||
pub(crate) fn get(gl: &glow::Context) -> Self {
|
||||
use glow::HasContext as _;
|
||||
let shading_lang_string =
|
||||
unsafe { gl.get_parameter_string(glow::SHADING_LANGUAGE_VERSION) };
|
||||
let shader_version = Self::parse(&shading_lang_string);
|
||||
|
||||
Reference in New Issue
Block a user