![]() |
GLW
Computer Graphics Structures library
|
OpenGL wrapper library namespace. Provides simplified interface for using OpenGL features. More...
Data Structures | |
| class | ArrayObject |
| Class to store data arrays. Arrays can be later accessed by shaders when draw is requested. More... | |
| struct | Attrib |
| Array attribute. Defines how specific data are stored in combined buffer. For example how are vertex colors stored in array of vertex data. More... | |
| class | FrameBuffer |
| Class used to store buffers for internal rendering. More... | |
| class | Program |
| Holds several compiled shaders which are used as a whole. More... | |
| class | Shader |
| Maintains the source code strings that defines a shader. More... | |
| class | Texture |
| Basic texture type. More... | |
| class | Texture2D |
| Two dimensional texture. Used mostly to store color images or results of internal rendering. More... | |
| class | Texture2dMultisample |
| Similar to Texture2D, uses multi-sampling for anti-aliasing effects. More... | |
| class | UniformBuffer |
| Object to store global variables, arrays or structures and manipulate them. Type of elements inside the buffer must be defined as template type. More... | |
| class | Window |
| Implements GLFW functions in object style programming. More... | |
| class | WindowEventObserver |
| Any class derived from WindowEventObserver can receive Window events. More... | |
Typedefs | |
| using | Attrib1f = TAttrib< gl::GLenum::GL_FLOAT, 1 > |
| using | Attrib2f = TAttrib< gl::GLenum::GL_FLOAT, 2 > |
| using | Attrib3f = TAttrib< gl::GLenum::GL_FLOAT, 3 > |
| using | Attrib4f = TAttrib< gl::GLenum::GL_FLOAT, 4 > |
| using | Attrib1i = TAttrib< gl::GLenum::GL_INT, 1 > |
| using | Attrib2i = TAttrib< gl::GLenum::GL_INT, 2 > |
| using | Attrib3i = TAttrib< gl::GLenum::GL_INT, 3 > |
| using | Attrib4i = TAttrib< gl::GLenum::GL_INT, 4 > |
| using | PArrayObject = std::shared_ptr< class ArrayObject > |
| using | PFrameBuffer = std::shared_ptr< class FrameBuffer > |
| using | PShader = std::shared_ptr< class Shader > |
| using | PProgram = std::shared_ptr< class Program > |
| using | PProgramList = std::shared_ptr< class ProgramList > |
| using | PTexture = std::shared_ptr< class Texture > |
| using | PTexture2D = std::shared_ptr< class Texture2D > |
| using | PTexture2dMultisample = std::shared_ptr< class Texture2dMultisample > |
| template<typename T > | |
| using | PUniformBuffer = std::shared_ptr< UniformBuffer< T > > |
Enumerations | |
| enum | DataUsage : uint32_t { stream_draw = uint32_t(gl::GLenum::GL_STREAM_DRAW), stream_read = uint32_t(gl::GLenum::GL_STREAM_READ), stream_copy = uint32_t(gl::GLenum::GL_STREAM_COPY), static_draw = uint32_t(gl::GLenum::GL_STATIC_DRAW), static_read = uint32_t(gl::GLenum::GL_STATIC_READ), static_copy = uint32_t(gl::GLenum::GL_STATIC_COPY), dynamic_draw = uint32_t(gl::GLenum::GL_DYNAMIC_DRAW), dynamic_read = uint32_t(gl::GLenum::GL_DYNAMIC_READ), dynamic_copy = uint32_t(gl::GLenum::GL_DYNAMIC_COPY) } |
| Hint to the GL implementation as to how a buffer object's data store will be accessed. More... | |
| enum | DrawMode : uint32_t { points = uint32_t(gl::GLenum::GL_POINTS), lines = uint32_t(gl::GLenum::GL_LINES), line_strip = uint32_t(gl::GLenum::GL_LINE_STRIP), line_loop = uint32_t(gl::GLenum::GL_LINE_LOOP), triangles = uint32_t(gl::GLenum::GL_TRIANGLES), triangle_strip = uint32_t(gl::GLenum::GL_TRIANGLE_STRIP), triangle_fan = uint32_t(gl::GLenum::GL_TRIANGLE_FAN), patches = uint32_t(gl::GLenum::GL_PATCHES) } |
| Specifies what kind of primitives are rendered. | |
| enum | ShaderType { vertex = (unsigned int)gl::GLenum::GL_VERTEX_SHADER, tess_ctrl = (unsigned int)gl::GLenum::GL_TESS_CONTROL_SHADER, tess_eval = (unsigned int)gl::GLenum::GL_TESS_EVALUATION_SHADER, geometry = (unsigned int)gl::GLenum::GL_GEOMETRY_SHADER, fragment = (unsigned int)gl::GLenum::GL_FRAGMENT_SHADER, compute = (unsigned int)gl::GLenum::GL_COMPUTE_SHADER, none = (unsigned int)gl::GLenum::GL_NONE } |
| Indicates the type of shader. | |
| enum | Wrapping { Wrapping::repeat = uint32_t(gl::GLenum::GL_REPEAT), Wrapping::mirror_repeat = uint32_t(gl::GLenum::GL_MIRRORED_REPEAT), Wrapping::clamp = uint32_t(gl::GLenum::GL_CLAMP_TO_EDGE), Wrapping::border_color = uint32_t(gl::GLenum::GL_CLAMP_TO_BORDER) } |
| enum | Filtering { Filtering::nearest = uint32_t(gl::GLenum::GL_NEAREST), Filtering::linear = uint32_t(gl::GLenum::GL_LINEAR), Filtering::closest_mip_nearest = uint32_t(gl::GLenum::GL_NEAREST_MIPMAP_NEAREST), Filtering::closest_mip_linear = uint32_t(gl::GLenum::GL_LINEAR_MIPMAP_NEAREST), Filtering::inter_mip_nearest = uint32_t(gl::GLenum::GL_NEAREST_MIPMAP_LINEAR), Filtering::inter_mip_linear = uint32_t(gl::GLenum::GL_LINEAR_MIPMAP_LINEAR) } |
| Texture filtering types. Define how colors are pulled from texture image when picking from between multiple texel points. More... | |
| enum | ColorType { ColorType::uint8_norm, ColorType::int8_norm, ColorType::uint16_norm, ColorType::int16_norm, ColorType::uint8, ColorType::int8, ColorType::uint16, ColorType::int16, ColorType::uint32, ColorType::int32, ColorType::float16, ColorType::float32 } |
| enum | DepthDataFormat { DepthDataFormat::uint16_norm = uint32_t(gl::GLenum::GL_DEPTH_COMPONENT16), DepthDataFormat::uint24_norm = uint32_t(gl::GLenum::GL_DEPTH_COMPONENT24), DepthDataFormat::float32 = uint32_t(gl::GLenum::GL_DEPTH_COMPONENT32F) } |
Functions | |
| GLW_API std::string | GetShaderBuildDirectory () |
| Returns directory path where function BuildShader looks for shader files. Can be changed by calling SetShaderBuildDirectory. | |
| GLW_API void | SetShaderBuildDirectory (const std::string &directory) |
| Changes directory path where function BuildShader looks for shader files. | |
| GLW_API glw::PShader | BuildShader (std::string filename, const glw::Shader::ReplaceMap replace_map) |
| Builds shader file using extended build system, which supports file including, error checks, etc. More... | |
| GLW_API glw::ShaderType | GetShaderTypeFromFileName (const std::string &filename) |
| Creates ShaderType from extension of specified shader file name. | |
| GLW_API gl::GLenum | ColorFormat (const ColorType color_data_type, const uint8_t channels) |
| Creates OpenGL color format from desired data type per channel, and desired number of channels. | |
| GLW_API bool | IsOpenGLInitialized () |
| Returns true when OpenGL was initialized. | |
| GLW_API std::string | GetError () |
| Returns all errors generated by OpenGL since last time this function was called. | |
| GLW_API std::string | GetOpenGlVendor () |
| GLW_API std::string | GetOpenGlRenderer () |
| GLW_API std::string | GetOpenGlVersion () |
| GLW_API utils::Version | GetCurrentOpenGlVersion () |
| Get OpenGL version actually active on system. | |
OpenGL wrapper library namespace. Provides simplified interface for using OpenGL features.
|
strong |
|
strong |
Hint to the GL implementation as to how a buffer object's data store will be accessed.
The frequency of access may be one of these: STREAM - The data store contents will be modified once and used at most a few times. STATIC - The data store contents will be modified once and used many times. DYNAMIC - The data store contents will be modified repeatedly and used many times.
The nature of access may be one of these: DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands. READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application. COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
|
strong |
|
strong |
Texture filtering types. Define how colors are pulled from texture image when picking from between multiple texel points.
|
strong |
| GLW_API glw::PShader glw::BuildShader | ( | std::string | filename, |
| const glw::Shader::ReplaceMap | replace_map | ||
| ) |
Builds shader file using extended build system, which supports file including, error checks, etc.
| filename | Name of shader file, which is looked for in directory set by SetShaderBuildDirectory. |
| replace_map | Searches for all occurrences of specified replacement pairs and replaces them. |