1
0
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:
Emil Ernerfeldt
2022-03-22 16:04:06 +01:00
committed by GitHub
parent 41b178b6ec
commit 6f10e2e725
7 changed files with 288 additions and 278 deletions

View File

@@ -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);