mod3d_gl/
lib.rs

1//a Documentation
2// #![warn(missing_docs)]
3// Document code examples cannot be executed
4// so don't require them right now
5//
6// #![warn(rustdoc::missing_doc_code_examples)]
7
8/*!
9# OpenGL/WeblGL Model / Shader Program abstraction library
10
11This library provides structures for OpenGL shaders ...
12!*/
13
14//a Imports and exports
15pub use mod3d_base::{Mat3, Mat4, Quat, Transformation, Vec3, Vec4};
16
17mod types;
18pub use types::{TextureId, UniformId};
19
20mod traits;
21pub use traits::{Gl, GlBuffer, GlProgram, GlShader, GlShaderType, GlVao};
22
23//a Submodules
24mod material;
25mod texture;
26pub use material::Material;
27pub use texture::Texture;
28
29mod buffer;
30pub use buffer::{BufferView, IndexBuffer, UniformBuffer, VertexBuffer};
31
32mod pipeline;
33pub use pipeline::PipelineDesc;
34
35mod vertices;
36pub use vertices::Vertices;
37
38mod shader_instantiable;
39pub use shader_instantiable::{ShaderInstantiable, ShaderMaterialBaseData};
40
41#[derive(Debug, Default, Clone)]
42pub struct Descriptor(());
43impl std::fmt::Display for Descriptor {
44    fn fmt(&self, fmt: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
45        std::fmt::Debug::fmt(self, fmt)
46    }
47}
48impl mod3d_base::DescriptorClient for Descriptor {}
49
50//a Model3DWebGL
51#[cfg(feature = "webgl")]
52mod webgl;
53#[cfg(feature = "webgl")]
54mod webgl_log;
55#[cfg(feature = "webgl")]
56pub use webgl::Model3DWebGL;
57
58//a Model3DOpenGL
59#[cfg(feature = "opengl")]
60mod opengl;
61#[cfg(feature = "opengl")]
62pub use opengl::utils as opengl_utils;
63#[cfg(feature = "opengl")]
64pub use opengl::Model3DOpenGL;