use glow::HasContext;
type GlTexture = <glow::Context as HasContext>::Texture;
type GlProgram = <glow::Context as HasContext>::Program;
type GlShader = <glow::Context as HasContext>::Shader;
type GlFramebuffer = <glow::Context as HasContext>::Framebuffer;
type GlBuffer = <glow::Context as HasContext>::Buffer;
mod attribute;
mod buffer;
mod context;
mod shader;
mod surface;
mod texture;
mod uniform;
pub use self::attribute::{Attribute, AttributeType};
pub use self::buffer::{Buffer, ElementBuffer, VertexBuffer};
pub use self::context::Context;
pub use self::shader::{ShaderDescription, ShaderProgram};
pub use self::surface::Surface;
pub use self::texture::{Texture, TextureFilter, TextureWrap};
pub use self::uniform::{Uniform, UniformType, UniformValue};
pub(crate) enum Position {
Input,
Output,
}
pub enum NumberType {
Int,
Float,
}
pub enum ColorFormat {
RGB,
RGBA,
}
#[derive(Copy, Clone)]
pub enum Dimension {
D2 = 2,
D3 = 3,
D4 = 4,
}
pub enum GeometryMode {
Points,
Lines,
LineStrip,
LineLoop,
TriangleStrip,
TriangleFan,
Triangles,
}
#[derive(Debug)]
pub enum GolemError {
ShaderCompilationError(String),
ContextError(String),
NoSuchUniform(&'static str),
NotCurrentProgram,
}
impl From<String> for GolemError {
fn from(other: String) -> Self {
GolemError::ContextError(other)
}
}