Gamedev Framework (gf)  0.7.0
A C++14 framework for 2D games
Classes | Public Member Functions | Static Public Member Functions | List of all members
gf::GraphicsInfo Class Reference

A class for graphics info. More...

#include <gf/GraphicsInfo.h>

Classes

struct  Format
 An OpenGL format. More...
 

Public Member Functions

 GraphicsInfo ()=delete
 Deleted default constructor. More...
 

Static Public Member Functions

static std::string getVendor ()
 Get OpenGL vendor string. More...
 
static std::string getRenderer ()
 Get OpenGL renderer string. More...
 
static std::string getVersion ()
 Get OpenGL version string. More...
 
static std::string getShadingLanguageVersion ()
 Get OpenGL GLSL version string. More...
 
static std::vector< std::string > getExtensions ()
 Get available OpenGL extensions. More...
 
static std::vector< FormatgetCompressedTextureFormats ()
 Get a list of supported compressed texture formats. More...
 
static std::vector< FormatgetShaderBinaryFormats ()
 Get a list of supported shader binary formats. More...
 
static int getMaxCombinedTextureImageUnits ()
 Get the maximum supported texture image units. More...
 
static int getMaxCubeMapTextureSize ()
 Get a rough estimate of the largest cube-map texture. More...
 
static int getMaxFragmentUniformVectors ()
 Get the maximum number of four-element vectors that can be held in uniform variable storage for a fragment shader. More...
 
static int getMaxRenderbufferSize ()
 Get the largest renderbuffer width and height. More...
 
static int getMaxTextureImageUnits ()
 Get the maximum supported texture image units in a fragment shader. More...
 
static int getMaxTextureSize ()
 Get a rough estimate of the largest texture. More...
 
static int getMaxVaryingVectors ()
 Get the maximum number four-element vectors available for varying variables used by vertex and fragment shaders. More...
 
static int getMaxVertexAttribs ()
 Get the maximum number of 4-component generic vertex attributes accessible to a vertex shader. More...
 
static int getMaxVertexTextureImageUnits ()
 Get the maximum supported texture image units in a vertex shader. More...
 
static int getMaxVertexUniformVectors ()
 Get the maximum number of four-element vectors that can be held in uniform variable storage for a vertex shader. More...
 
static Vector2i getMaxViewportDims ()
 Get the maximum supported width and height of the viewport. More...
 
static int getSubpixelBits ()
 Get an estimate of the number of bits of subpixel resolution. More...
 

Detailed Description

A class for graphics info.

This class only contains static methods. It provides convenient functions for OpenGL configuration variables. The name of the variables are given in the documentation of the functions.

See also
glGetString() - docs.gl
glGetIntegerv() - docs.gl

Constructor & Destructor Documentation

◆ GraphicsInfo()

gf::GraphicsInfo::GraphicsInfo ( )
delete

Deleted default constructor.

Member Function Documentation

◆ getCompressedTextureFormats()

static std::vector<Format> gf::GraphicsInfo::getCompressedTextureFormats ( )
static

Get a list of supported compressed texture formats.

OpenGL name: GL_NUM_COMPRESSED_TEXTURE_FORMATS and GL_COMPRESSED_TEXTURE_FORMATS

◆ getExtensions()

static std::vector<std::string> gf::GraphicsInfo::getExtensions ( )
static

Get available OpenGL extensions.

OpenGL name: GL_EXTENSIONS

◆ getMaxCombinedTextureImageUnits()

static int gf::GraphicsInfo::getMaxCombinedTextureImageUnits ( )
static

Get the maximum supported texture image units.

OpenGL name: GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS

◆ getMaxCubeMapTextureSize()

static int gf::GraphicsInfo::getMaxCubeMapTextureSize ( )
static

Get a rough estimate of the largest cube-map texture.

OpenGL name: GL_MAX_CUBE_MAP_TEXTURE_SIZE

◆ getMaxFragmentUniformVectors()

static int gf::GraphicsInfo::getMaxFragmentUniformVectors ( )
static

Get the maximum number of four-element vectors that can be held in uniform variable storage for a fragment shader.

OpenGL name: GL_MAX_FRAGMENT_UNIFORM_VECTORS

◆ getMaxRenderbufferSize()

static int gf::GraphicsInfo::getMaxRenderbufferSize ( )
static

Get the largest renderbuffer width and height.

OpenGL name: GL_MAX_RENDERBUFFER_SIZE

◆ getMaxTextureImageUnits()

static int gf::GraphicsInfo::getMaxTextureImageUnits ( )
static

Get the maximum supported texture image units in a fragment shader.

OpenGL name: GL_MAX_TEXTURE_IMAGE_UNITS

◆ getMaxTextureSize()

static int gf::GraphicsInfo::getMaxTextureSize ( )
static

Get a rough estimate of the largest texture.

OpenGL name: GL_MAX_TEXTURE_SIZE

◆ getMaxVaryingVectors()

static int gf::GraphicsInfo::getMaxVaryingVectors ( )
static

Get the maximum number four-element vectors available for varying variables used by vertex and fragment shaders.

OpenGL name: GL_MAX_VARYING_VECTORS

◆ getMaxVertexAttribs()

static int gf::GraphicsInfo::getMaxVertexAttribs ( )
static

Get the maximum number of 4-component generic vertex attributes accessible to a vertex shader.

OpenGL name: GL_MAX_VERTEX_ATTRIBS

◆ getMaxVertexTextureImageUnits()

static int gf::GraphicsInfo::getMaxVertexTextureImageUnits ( )
static

Get the maximum supported texture image units in a vertex shader.

OpenGL name: GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS

◆ getMaxVertexUniformVectors()

static int gf::GraphicsInfo::getMaxVertexUniformVectors ( )
static

Get the maximum number of four-element vectors that can be held in uniform variable storage for a vertex shader.

OpenGL name: GL_MAX_VERTEX_UNIFORM_VECTORS

◆ getMaxViewportDims()

static Vector2i gf::GraphicsInfo::getMaxViewportDims ( )
static

Get the maximum supported width and height of the viewport.

OpenGL name: GL_MAX_VIEWPORT_DIMS

◆ getRenderer()

static std::string gf::GraphicsInfo::getRenderer ( )
static

Get OpenGL renderer string.

OpenGL name: GL_RENDERER

◆ getShaderBinaryFormats()

static std::vector<Format> gf::GraphicsInfo::getShaderBinaryFormats ( )
static

Get a list of supported shader binary formats.

OpenGL name: GL_NUM_SHADER_BINARY_FORMATS and GL_SHADER_BINARY_FORMATS

◆ getShadingLanguageVersion()

static std::string gf::GraphicsInfo::getShadingLanguageVersion ( )
static

Get OpenGL GLSL version string.

OpenGL name: GL_SHADING_LANGUAGE_VERSION

◆ getSubpixelBits()

static int gf::GraphicsInfo::getSubpixelBits ( )
static

Get an estimate of the number of bits of subpixel resolution.

OpenGL name: GL_SUBPIXEL_BITS

◆ getVendor()

static std::string gf::GraphicsInfo::getVendor ( )
static

Get OpenGL vendor string.

OpenGL name: GL_VENDOR

◆ getVersion()

static std::string gf::GraphicsInfo::getVersion ( )
static

Get OpenGL version string.

OpenGL name: GL_VERSION