scg3  0.6
scg_internals.h File Reference

Internal definitions required by most classes. More...

#include <memory>
#include <string>
#include <utility>
#include "scg_glew.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  scg::OGLAttrib
 Attribute name and location. More...
 
struct  scg::OGLFragData
 Fragment data name and location. More...
 
struct  scg::OGLUniformBlock
 Uniform block name and index. More...
 
struct  scg::OGLSampler
 Sampler name and texture unit. More...
 
class  scg::OGLConstants
 OpenGL attribute names and locations, uniform names, etc., to be used by ShaderCore, ShaderCoreFactory, and GeometryCore. More...
 

Namespaces

 scg
 

Macros

#define SCG_DECLARE_CLASS(TypeName)
 
#define CameraTransformation   Error_scg3_CameraTransformation_is_obsolete_Use_Camera_instead
 
#define SCG_DISALLOW_COPY_AND_ASSIGN(TypeName)
 
#define SCG_SAVE_AND_SWITCH_PROGRAM(_program, _programOld)
 
#define SCG_RESTORE_PROGRAM(_program, _programOld)
 

Functions

 scg::SCG_DECLARE_CLASS (Animation)
 
 scg::SCG_DECLARE_CLASS (BumpMapCore)
 
 scg::SCG_DECLARE_CLASS (Camera)
 
 scg::SCG_DECLARE_CLASS (CameraController)
 
 scg::SCG_DECLARE_CLASS (Composite)
 
 scg::SCG_DECLARE_CLASS (Controller)
 
 scg::SCG_DECLARE_CLASS (ColorCore)
 
 scg::SCG_DECLARE_CLASS (Core)
 
 scg::SCG_DECLARE_CLASS (CubeMapCore)
 
 scg::SCG_DECLARE_CLASS (GeometryCore)
 
 scg::SCG_DECLARE_CLASS (GeometryCoreFactory)
 
 scg::SCG_DECLARE_CLASS (Group)
 
 scg::SCG_DECLARE_CLASS (InfoTraverser)
 
 scg::SCG_DECLARE_CLASS (KeyboardController)
 
 scg::SCG_DECLARE_CLASS (Leaf)
 
 scg::SCG_DECLARE_CLASS (Light)
 
 scg::SCG_DECLARE_CLASS (LightPosition)
 
 scg::SCG_DECLARE_CLASS (MaterialCore)
 
 scg::SCG_DECLARE_CLASS (MouseController)
 
 scg::SCG_DECLARE_CLASS (Node)
 
 scg::SCG_DECLARE_CLASS (OrthographicCamera)
 
 scg::SCG_DECLARE_CLASS (PerspectiveCamera)
 
 scg::SCG_DECLARE_CLASS (PreTraverser)
 
 scg::SCG_DECLARE_CLASS (Renderer)
 
 scg::SCG_DECLARE_CLASS (RenderState)
 
 scg::SCG_DECLARE_CLASS (RenderTraverser)
 
 scg::SCG_DECLARE_CLASS (ShaderCore)
 
 scg::SCG_DECLARE_CLASS (ShaderCoreFactory)
 
 scg::SCG_DECLARE_CLASS (Shape)
 
 scg::SCG_DECLARE_CLASS (StandardRenderer)
 
 scg::SCG_DECLARE_CLASS (TextureCore)
 
 scg::SCG_DECLARE_CLASS (Texture2DCore)
 
 scg::SCG_DECLARE_CLASS (TransformAnimation)
 
 scg::SCG_DECLARE_CLASS (Transformation)
 
 scg::SCG_DECLARE_CLASS (Traverser)
 
 scg::SCG_DECLARE_CLASS (Viewer)
 
 scg::SCG_DECLARE_CLASS (ViewState)
 

Detailed Description

Internal definitions required by most classes.

Author
Volker Ahlers
volke.nosp@m.r.ah.nosp@m.lers@.nosp@m.hs-h.nosp@m.annov.nosp@m.er.d.nosp@m.e

Definition in file scg_internals.h.

Macro Definition Documentation

◆ CameraTransformation

#define CameraTransformation   Error_scg3_CameraTransformation_is_obsolete_Use_Camera_instead

Macros causing compiler errors for obsolete classes and functions.

Definition at line 187 of file scg_internals.h.

◆ SCG_DECLARE_CLASS

#define SCG_DECLARE_CLASS (   TypeName)
Value:
class TypeName; \
typedef std::shared_ptr<TypeName> TypeName##SP; \
typedef std::unique_ptr<TypeName> TypeName##UP;

Forward declaration of classes with shared and unique pointers.
Class
ClassSP - shared_pointer<Class>
classUP - unique_pointer<Class>

Definition at line 140 of file scg_internals.h.

◆ SCG_DISALLOW_COPY_AND_ASSIGN

#define SCG_DISALLOW_COPY_AND_ASSIGN (   TypeName)
Value:
TypeName(const TypeName&); \
void operator=(const TypeName&);

A macro to disallow the copy constructor and operator= functions. This should be used in the private: declarations for a class. Source: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

Definition at line 195 of file scg_internals.h.

◆ SCG_RESTORE_PROGRAM

#define SCG_RESTORE_PROGRAM (   _program,
  _programOld 
)
Value:
if (_program != _programOld) { \
glUseProgram(_programOld); \
}

A macro to restore a shader program saved in _programOld; to be used in combination with macro SCG_SAVE_AND_SWITCH_PROGRAM().

Definition at line 217 of file scg_internals.h.

◆ SCG_SAVE_AND_SWITCH_PROGRAM

#define SCG_SAVE_AND_SWITCH_PROGRAM (   _program,
  _programOld 
)
Value:
GLuint _programOld; \
glGetIntegerv(GL_CURRENT_PROGRAM, reinterpret_cast<GLint*>(&_programOld)); \
if (_program != _programOld) { \
glUseProgram(_program); \
}

A macro to save the current shader program in _programOld and switch to a new shader program _program, e.g., to set values of uniform variables; to be used in combination with macro SCG_RESTORE_PROGRAM().

Definition at line 205 of file scg_internals.h.