diff --git a/src/gfx_apis/gl.rs b/src/gfx_apis/gl.rs index 0fd8ed71..68d1f1c6 100644 --- a/src/gfx_apis/gl.rs +++ b/src/gfx_apis/gl.rs @@ -266,6 +266,7 @@ fn run_ops(fb: &Framebuffer, ops: &[GfxApiOpt]) -> Option { i += 1; } if let Some(color) = color { + log::info!("fill with color {:?}", color); fill_boxes3(&fb.ctx, triangles, &color); } } diff --git a/src/gfx_apis/gl/gl/sys.rs b/src/gfx_apis/gl/gl/sys.rs index afbaec72..8688b292 100644 --- a/src/gfx_apis/gl/gl/sys.rs +++ b/src/gfx_apis/gl/gl/sys.rs @@ -21,6 +21,7 @@ pub const GL_COLOR_ATTACHMENT0: GLenum = 0x8CE0; pub const GL_COLOR_BUFFER_BIT: GLbitfield = 0x00004000; pub const GL_COMPILE_STATUS: GLenum = 0x8B81; pub const GL_EXTENSIONS: GLenum = 0x1F03; +pub const GL_RENDERER: GLenum = 0x1F01; pub const GL_FALSE: GLboolean = 0; pub const GL_FLOAT: GLenum = 0x1406; pub const GL_FRAGMENT_SHADER: GLenum = 0x8B30; diff --git a/src/gfx_apis/gl/renderer/context.rs b/src/gfx_apis/gl/renderer/context.rs index 4b31edba..fb672a8a 100644 --- a/src/gfx_apis/gl/renderer/context.rs +++ b/src/gfx_apis/gl/renderer/context.rs @@ -12,6 +12,7 @@ use { program::GlProgram, render_buffer::GlRenderBuffer, sys::GLint, texture::GlTexture, }, renderer::{framebuffer::Framebuffer, image::Image}, + sys::GL_RENDERER, GfxGlState, RenderError, Texture, }, video::{ @@ -21,11 +22,12 @@ use { }, }, ahash::AHashMap, + bstr::ByteSlice, enum_map::{enum_map, Enum, EnumMap}, jay_config::video::GfxApi, std::{ cell::{Cell, RefCell}, - ffi::CString, + ffi::{CStr, CString}, fmt::{Debug, Formatter}, rc::Rc, }, @@ -148,6 +150,11 @@ impl GlRenderContext { } else { None }; + { + let name = (ctx.dpy.gles.glGetString)(GL_RENDERER); + let name = CStr::from_ptr(name as _).to_bytes(); + log::info!("gl renderer: {}", name.as_bstr()); + } let fill_prog = GlProgram::from_shaders( ctx, include_str!("../shaders/fill.vert.glsl"),