# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# OpenGL vs VL Feature Mapping

The table below shows how the most important OpenGL features and functions map to Visualization Library classes and functions.

OpenGL functions | Visualization Library classes and functions
--- | ---
Texturing

- glActiveTexture()
- glClientActiveTexture()
- glBindTexture()
- glTexImage1D()
- glTexImage2D()
- glTexImage3D()
- glCompressedTexImage1D()
- glCompressedTexImage2D()
- glCompressedTexImage3D()
- glTexParameter()
- glGenTextures()
- glDeleteTextures()

- vl::Texture
- vl::Texture::createTexture()
- vl::Texture::setMipLevel()
- vl::Texture::prepareTexture1D()
- vl::Texture::prepareTexture2D()
- vl::Texture::prepareTexture3D()
- vl::Texture::prepareTextureCubemap()
- vl::Texture::prepareTextureRectangle()
- vl::Texture::prepareTexture1DArray()
- vl::Texture::prepareTexture2DArray()
- vl::TexParameter and vl::Texture::getTexParameter()
- vl::TextureSampler
- vl::Shader::gocTextureSampler()

- gluBuild1DMipmaps()
- gluBuild2DMipmaps()
- gluBuild3DMipmaps()

Mipmaps are automatically generated when requested by the texture constructor or by one of the vl::Texture::prepareTexture*() methods. The texture generation uses the hardware acceleration where available otherwise glu is used.

- glTexSubImage1D()
- glTexSubImage2D()
- glTexSubImage3D()
- glCompressedTexSubImage1D()
- glCompressedTexSubImage2D()
- glCompressedTexSubImage3D()

You can use them as usual:

    vl::Texture* texture = ... init texture ...
    glBindTexture(GL_TEXTURE_2D, texture->handle());
    glTexSubImage2D(GL_TEXTURE_2D, ...);
    glBindTexture(GL_TEXTURE_2D, 0);

- glTexParameter()

- vl::TexParameter
- vl::Texture::getTexParameter()

- glTexGen()

- vl::TexGen
- vl::Shader::gocTexGen(), vl::Shader::getTexGen()

- glTexEnv()

- vl::TexEnv
- vl::Shader::gocTexEnv(), vl::Shader::getTexEnv()

- glClientActiveTexture()
- glTexCoord()
- glMultiTexCoord()
- glTexCoordPointer()

- vl::Geometry::setTexCoordArray()

- glCopyTexImage1D()
- glCopyTexImage2D()
- glCopyTexSubImage1D()
- glCopyTexSubImage2D()
- glCopyTexSubImage3D()

- vl::CopyTexSubImage1D
- vl::CopyTexSubImage2D
- vl::CopyTexSubImage3D

Matrices

- glMatrixMode()
- glLoadMatrix()
- glLoadIdentity()
- glMultMatrix()
- glPushMatrix()
- glPopMatrix()
- glTranslate()
- glScale()
- glRotate()

- vl::dmat4
- vl::fmat4
- vl::TextureMatrix
- vl::Transform
- vl::Billboard
- vl::Camera
- vl::Camera::setViewMatrix()
- vl::Camera::setProjectionMatrix()

Camera viewing and projection matrices

- gluPerspective()
- glFrustum()
- glOrtho()
- gluOrtho2D()
- gluLookAt()
- gluProject()
- gluUnProject()

- vl::dmat4::getPerspective()
- vl::dmat4::getFrustum()
- vl::dmat4::getOrtho()
- vl::dmat4::getLookAt()
- vl::dmat4::getLookAtModeling()
- vl::Camera::setProjectionPerspective()
- vl::Camera::setProjectionFrustum()
- vl::Camera::setProjectionOrtho()
- vl::Camera::setProjectionOrtho()
- vl::Camera::setViewMatrixLookAt()
- vl::Camera::project()
- vl::Camera::unproject()

Vertex attributes

- glVertex()
- glVertexPointer()

- vl::Geometry::setVertexArray()

- glVertexAttrib()
- glVertexAttribPointer()

- vl::Geometry::setVertexAttribArray()

- glNormal()
- glNormalPointer()

- vl::Geometry::setNormal()
- vl::Geometry::setNormalArray()

- glColor()
- glColorPointer()

- vl::Geometry::setColor()
- vl::Geometry::setColorArray()

- glSecondaryColor()
- glSecondaryColorPointer()

- vl::Geometry::setSecondaryColor()
- vl::Geometry::setSecondaryColorArray()

- glFogCoord()
- glFogCoordPointer()

- vl::Geometry::setFogCoordArray()

Draw commands

- glDrawArrays()
- glMultiDrawArrays()
- glDrawArraysInstanced()

- vl::DrawArrays
- vl::Geometry::drawCalls()

- glDrawElements()
- glDrawElementsBaseVertex
- glDrawElementsInstanced
- glDrawElementsInstancedBaseVertex
- glMultiDrawElements()
- glDrawRangeElements
- glDrawRangeElementsBaseVertex

- vl::DrawCall
- vl::DrawElements
- vl::DrawRangeElements
- vl::MultiDrawElements
- vl::Geometry::drawCalls()

Enables

- glEnable()
- glDisable()
- glIsEnabled()

- vl::Shader::enable()
- vl::Shader::disable()
- vl::Shader::isEnabled()

glReadPixels

- glReadPixels()

- vl::readPixels()
- vl::ReadPixels

OpenGL Shading Language

- glCreateShader(), glDeleteShader()
- glCreateProgram(), glDeleteProgram()
- glLinkProgram()
- glAttachShader()
- glDetachShader()
- glCompileShader()
- glUseProgram()
- glValidateProgram()
- glBindAttribLocation()
- glUniform()
- glGetActiveAttrib()
- glGetActiveUniform()
- glPatchParameter()

- vl::GLSLVertexShader, vl::GLSLFragmentShader, vl::GLSLGeometryShader
- vl::GLSLProgram
- vl::GLSLProgram::linkProgram()
- vl::GLSLProgram::attachShader()
- vl::GLSLProgram::detachShader()
- vl::GLSLShader::compile()
- vl::GLSLProgram::useProgram()
- vl::GLSLProgram::validateProgram()
- vl::GLSLProgram::bindAttribLocation()
- vl::Uniform, vl::GLSLProgram::setUniform(), vl::Actor::setUniform(), vl::Shader::setUniform()
- vl::GLSLProgram::activeAttribs()
- vl::GLSLProgram::activeUniforms()
- vl::PatchParameter, vl::DrawCall::setPatchParameter()

Vertex and pixel buffer objects (BufferObject, PBO)

- glGenBuffers()
- glDeleteBuffers()
- glBufferData()
- glBufferSubData()
- glMapBuffer()
- glUnmapBuffer()

- vl::BufferObject
- vl::BufferObject::createBufferObject()
- vl::BufferObject::deleteBufferObject()
- vl::BufferObject::setBufferData()
- vl::BufferObject::setBufferSubData()
- vl::BufferObject::mapBufferObject()
- vl::BufferObject::unmapBufferObject()
- vl::Geometry::setBufferObjectEnabled()
- vl::Image::readPixels()
- vl::DrawPixels

Framebuffer object extension (see http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt)

- glFramebufferTexture1D()
- glFramebufferTexture2D()
- glFramebufferTexture()
- glFramebufferTexture3D()
- glFramebufferTextureLayer()
- glCheckFramebufferStatus()
- glGenRenderbuffers()
- glDeleteRenderbuffers()
- glRenderbufferStorage()
- glFramebufferRenderbuffer()
- glGenFramebuffers()
- glDeleteFramebuffers()
- glBindFramebuffer()

- vl::FBOTexture1DAttachment
- vl::FBOTexture2DAttachment
- vl::FBOTextureAttachment
- vl::FBOTexture3DAttachment
- vl::FBOTextureLayerAttachment
- vl::FramebufferObject::checkFramebufferStatus()
- vl::FBORenderbufferAttachment::create()
- vl::FBORenderbufferAttachment::destroy()
- automatically called inside vl::FBOAttachmentAbstract::bindAttachment()
- automatically called inside vl::FBOAttachmentAbstract::bindAttachment()
- vl::FramebufferObject::create()
- vl::FramebufferObject::destroy()
- vl::FramebufferObject::bindFrameBuffer() (initializes also the attachment points)

Display lists

- glGenLists()
- glDeleteLists()
- glNewList()
- glCallLists()
- glCallList()

- vl::Renderable::setDisplayListEnabled()
- vl::Renderable::setDisplayListDirty()
- vl::Renderable::displayList()
- vl::Renderable::deleteDisplayList()

Render states

- glAlphaFunc
- glBlendColor
- glBlendEquation
- glBlendFunc
- glClipPlane
- glColorMask
- glCullFace
- glDepthFunc
- glDepthMask
- glDepthRange
- glFog
- glFrontFace
- glHint
- glLight
- glLightModel
- glLineStipple
- glLineWidth
- glLogicOp
- glMaterial
- glPixelTransfer
- glPointParameter
- glPointSize
- glPolygonMode
- glPolygonOffset
- glPolygonStipple
- glSampleCoverage
- glShadeModel
- glStencilFunc
- glStencilMask
- glStencilOp
- glTexEnv
- glTexGen

- vl::AlphaFunc
- vl::BlendColor
- vl::BlendEquation
- vl::BlendFunc
- vl::ClipPlane
- vl::ColorMask
- vl::CullFace
- vl::DepthFunc
- vl::DepthMask
- vl::DepthRange
- vl::Fog
- vl::FrontFace
- vl::Hint
- vl::Light
- vl::LightModel
- vl::LineStipple
- vl::LineWidth
- vl::LogicOp
- vl::Material
- vl::PixelTransfer
- vl::PointParameter
- vl::PointSize
- vl::PolygonMode
- vl::PolygonOffset
- vl::PolygonStipple
- vl::SampleCoverage
- vl::ShadeModel
- vl::StencilFunc
- vl::StencilMask
- vl::StencilOp
- vl::TexEnv
- vl::TexGen

OpenGL Enables

- GL_ALPHA_TEST
- GL_BLEND
- GL_COLOR_LOGIC_OP
- GL_LIGHTING
- GL_COLOR_SUM
- GL_CULL_FACE
- GL_DEPTH_TEST
- GL_FOG
- GL_LINE_SMOOTH
- GL_LINE_STIPPLE
- GL_POLYGON_STIPPLE
- GL_NORMALIZE
- GL_POINT_SMOOTH
- GL_POINT_SPRITE
- GL_POLYGON_SMOOTH
- GL_POLYGON_OFFSET_FILL
- GL_POLYGON_OFFSET_LINE
- GL_POLYGON_OFFSET_POINT
- GL_RESCALE_NORMAL
- GL_STENCIL_TEST
- GL_VERTEX_PROGRAM_POINT_SIZE
- GL_VERTEX_PROGRAM_TWO_SIDE
- GL_SAMPLE_ALPHA_TO_COVERAGE
- GL_SAMPLE_ALPHA_TO_ONE
- GL_SAMPLE_COVERAGE
- GL_LIGHTi
- GL_CLIP_PLANEi
- GL_SCISSOR_TEST
- GL_COLOR_MATERIAL
- GL_TEXTURE_1D
- GL_TEXTURE_2D
- GL_TEXTURE_3D
- GL_TEXTURE_CUBE_MAP
- GL_TEXTURE_GEN_Q/R/S/T
- GL_INDEX_LOGIC_OP

- vl::EN_ALPHA_TEST
- vl::EN_BLEND
- vl::EN_COLOR_LOGIC_OP
- vl::EN_LIGHTING
- vl::EN_COLOR_SUM
- vl::EN_CULL_FACE
- vl::EN_DEPTH_TEST
- vl::EN_FOG
- vl::EN_LINE_SMOOTH
- vl::EN_LINE_STIPPLE
- vl::EN_POLYGON_STIPPLE
- vl::EN_NORMALIZE
- vl::EN_POINT_SMOOTH
- vl::EN_POINT_SPRITE
- vl::EN_POLYGON_SMOOTH
- vl::EN_POLYGON_OFFSET_FILL
- vl::EN_POLYGON_OFFSET_LINE
- vl::EN_POLYGON_OFFSET_POINT
- vl::EN_RESCALE_NORMAL
- vl::EN_STENCIL_TEST
- vl::EN_PROGRAM_POINT_SIZE
- vl::EN_VERTEX_PROGRAM_TWO_SIDE
- vl::EN_SAMPLE_ALPHA_TO_COVERAGE
- vl::EN_SAMPLE_ALPHA_TO_ONE
- vl::EN_SAMPLE_COVERAGE
- automatically managed by vl::Light
- automatically managed by vl::ClipPlane
- automatically manaded by vl::Scissor
- see vl::Material::setColorMaterial(), vl::Material::setColorMaterialEnabled()
- automatically managed, see vl::Texture, vl::TextureSampler, vl::TexParameter
- automatically managed, see vl::Texture, vl::TextureSampler, vl::TexParameter
- automatically managed, see vl::Texture, vl::TextureSampler, vl::TexParameter
- automatically managed, see vl::Texture, vl::TextureSampler, vl::TexParameter
- automatically managed by vl::TexGen
- deprecated functionality

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:43:59.
Permission is granted to use this page to write and publish articles regarding Visualization Library.