1
0
Fork 0
forked from wry/wry

autocommit 2022-03-12 22:58:30 CET

This commit is contained in:
Julian Orth 2022-03-12 22:58:30 +01:00
parent 21527b3e38
commit 133035e0a6
8 changed files with 41 additions and 74 deletions

View file

@ -3,7 +3,6 @@ use crate::render::egl::sys::{
eglDestroyContext, eglMakeCurrent, EGLContext, EGLSurface, EGL_FALSE, EGL_TRUE,
};
use crate::render::ext::GlExt;
use crate::render::gl::sys::{GLint, GLuint};
use crate::render::RenderError;
use std::rc::Rc;
@ -12,11 +11,6 @@ pub struct EglContext {
pub dpy: Rc<EglDisplay>,
pub ext: GlExt,
pub ctx: EGLContext,
pub tex_prog: GLuint,
pub tex_tex: GLint,
pub tex_texcoord: GLint,
pub tex_pos: GLint,
}
impl Drop for EglContext {

View file

@ -48,10 +48,6 @@ impl EglDisplay {
dpy: self.clone(),
ext: GlExt::empty(),
ctx,
tex_prog: 0,
tex_tex: 0,
tex_texcoord: 0,
tex_pos: 0,
};
ctx.ext = ctx.with_current(|| Ok(get_gl_ext()))?;
// if !ctx.ext.contains(GlExt::GL_OES_EGL_IMAGE) {
@ -100,7 +96,7 @@ impl EglDisplay {
},
];
let mut attribs = vec![];
let mut attribs = Vec::with_capacity(19);
attribs.extend_from_slice(&[EGL_WIDTH, buf.width]);
attribs.extend_from_slice(&[EGL_HEIGHT, buf.height]);
attribs.extend_from_slice(&[EGL_LINUX_DRM_FOURCC_EXT, buf.format.drm as _]);