Cortex  10.0.0-a4
Classes | Typedefs | Enumerations | Functions | Variables
IECoreGL Namespace Reference

The namespace within which all CoreGL functionality is defined. More...

Classes

class  Bindable
 
class  Buffer
 
class  ColorTexture
 
class  DepthTexture
 
class  Exception
 
class  FontLoader
 
class  FrameBuffer
 
class  HitRecord
 
class  LuminanceTexture
 
class  MeshPrimitive
 
class  NameStateComponent
 
struct  NumericTraits
 
class  Primitive
 
class  Renderable
 
class  Renderer
 
class  Selector
 
class  Shader
 A class to represent GLSL shaders. More...
 
class  ShaderLoader
 
class  ShaderStateComponent
 
class  SplineToGLTextureConverter
 
class  StateComponent
 
class  Texture
 
class  TextureLoader
 
class  ToGLBufferConverter
 
class  ToGLCameraConverter
 
class  ToGLConverter
 
class  ToGLCurvesConverter
 
class  ToGLMeshConverter
 
class  ToGLPointsConverter
 
class  ToGLSphereConverter
 
class  ToGLStateConverter
 
class  ToGLTextureConverter
 

Typedefs

typedef TypedStateComponent< Imath::Color4f, ColorTypeId > Color
 
typedef TypedStateComponent< bool, TransparentShadingStateComponentTypeId > TransparentShadingStateComponent
 
typedef TypedStateComponent< Imath::Color4f, BoundColorStateComponentTypeId > BoundColorStateComponent
 Specifies the color to draw bounding boxes in.
 
typedef TypedStateComponent< Imath::Color4f, WireframeColorStateComponentTypeId > WireframeColorStateComponent
 Specifies the color to draw wireframes in.
 
typedef TypedStateComponent< Imath::Color4f, OutlineColorStateComponentTypeId > OutlineColorStateComponent
 Specifies the color to draw outlines in.
 
typedef TypedStateComponent< Imath::Color4f, PointColorStateComponentTypeId > PointColorStateComponent
 Specifies the color to draw points in.
 
typedef TypedStateComponent< BlendFactors, BlendFuncStateComponentTypeId > BlendFuncStateComponent
 
typedef TypedStateComponent< Imath::Color4f, BlendColorStateComponentTypeId > BlendColorStateComponent
 
typedef TypedStateComponent< GLenum, BlendEquationStateComponentTypeId > BlendEquationStateComponent
 
typedef TypedStateComponent< bool, AlphaTestStateComponentTypeId > AlphaTestStateComponent
 
typedef TypedStateComponent< AlphaFunc, AlphaFuncStateComponentTypeId > AlphaFuncStateComponent
 
typedef TypedStateComponent< bool, DoubleSidedStateComponentTypeId > DoubleSidedStateComponent
 Used to specify enable state of GL_CULL_FACE.
 
typedef TypedStateComponent< bool, RightHandedOrientationStateComponentTypeId > RightHandedOrientationStateComponent
 
typedef TypedStateComponent< bool, LineSmoothingStateComponentTypeId > LineSmoothingStateComponent
 Used to specify enable state of GL_LINE_SMOOTH.
 
typedef TypedStateComponent< bool, PointSmoothingStateComponentTypeId > PointSmoothingStateComponent
 Used to specify enable state of GL_POINT_SMOOTH.
 
typedef TypedStateComponent< bool, PolygonSmoothingStateComponentTypeId > PolygonSmoothingStateComponent
 Used to specify enable state of GL_POLYGON_SMOOTH.
 
typedef TypedStateComponent< bool, DepthTestStateComponentTypeId > DepthTestStateComponent
 Used to specify enable state of GL_DEPTH_TEST.
 
typedef TypedStateComponent< bool, DepthMaskStateComponentTypeId > DepthMaskStateComponent
 Used to set glDepthMask to GL_TRUE or GL_FALSE.
 
typedef TypedStateComponent< RendererSpace, CullingSpaceStateComponentTypeId > CullingSpaceStateComponent
 
typedef TypedStateComponent< Imath::Box3f, CullingBoxStateComponentTypeId > CullingBoxStateComponent
 
typedef TypedStateComponent< bool, ProceduralThreadingStateComponentTypeId > ProceduralThreadingStateComponent
 Defines whether or not procedurals will be executed in parallel threads.
 
typedef TypedStateComponent< bool, CameraVisibilityStateComponentTypeId > CameraVisibilityStateComponent
 Defines camera visibility.
 
typedef TypedStateComponent< bool, AutomaticInstancingStateComponentTypeId > AutomaticInstancingStateComponent
 
typedef void(* UniformFloatFunction) (GLint, GLsizei, const GLfloat *)
 The type of the glUniformNfv functions.
 
typedef void(* UniformIntFunction) (GLint, GLsizei, const GLint *)
 The type of the glUniformNiv functions.
 
typedef void(* UniformMatrixFunction) (GLint, GLsizei, GLboolean, const GLfloat *)
 The type of the glUniformMatrix*fv functions.
 

Enumerations

enum  GLPointsUsage { ForPointsOnly, ForPointsAndDisks, ForAll }
 
enum  RendererSpace { ObjectSpace, WorldSpace }
 
enum  TypeId {
  StateTypeId = 105000, StateComponentTypeId = 105001, PrimitiveBoundTypeId = 105002, PrimitiveWireframeTypeId = 105003,
  PrimitiveSolidTypeId = 105004, PrimitiveOutlineTypeId = 105005, RenderableTypeId = 105006, BindableTypeId = 105007,
  TextureTypeId = 105008, RendererTypeId = 105009, ShaderTypeId = 105010, PrimitiveTypeId = 105011,
  PointsPrimitiveTypeId = 105012, DiskPrimitiveTypeId = 105013, MeshPrimitiveTypeId = 105014, QuadPrimitiveTypeId = 105015,
  SpherePrimitiveTypeId = 105016, BoxPrimitiveTypeId = 105017, RendererImplementationTypeId = 105018, DeferredRendererImplementationTypeId = 105019,
  PrimitiveWireframeWidthTypeId = 105020, PrimitiveOutlineWidthTypeId = 105021, PrimitivePointsTypeId = 105022, PrimitivePointWidthTypeId = 105023,
  ColorTypeId = 105024, ShaderStateComponentTypeId = 105025, FrameBufferTypeId = 105026, DepthTextureTypeId = 105027,
  ColorTextureTypeId = 105028, ImmediateRendererImplementationTypeId = 105029, BlendFuncStateComponentTypeId = 105030, BlendColorStateComponentTypeId = 105031,
  BlendEquationStateComponentTypeId = 105032, TransparentShadingStateComponentTypeId = 105033, PrimitiveTransparencySortStateComponentTypeId = 105034, BoundColorStateComponentTypeId = 105035,
  WireframeColorStateComponentTypeId = 105036, OutlineColorStateComponentTypeId = 105037, PointColorStateComponentTypeId = 105038, CameraTypeId = 105039,
  OrthographicCameraTypeId = 105040, PerspectiveCameraTypeId = 105041, PointsPrimitiveUseGLPointsTypeId = 105042, PointsPrimitiveGLPointWidthTypeId = 105043,
  NameStateComponentTypeId = 105044, ToGLConverterTypeId = 105045, ToGLCameraConverterTypeId = 105046, DoubleSidedStateComponentTypeId = 105047,
  RightHandedOrientationStateComponentTypeId = 105048, CurvesPrimitiveTypeId = 105049, CurvesPrimitiveGLLineWidthTypeId = 105050, CurvesPrimitiveUseGLLinesTypeId = 105051,
  CurvesPrimitiveIgnoreBasisTypeId = 105052, ToGLMeshConverterTypeId = 105053, FontTypeId = 105054, TextPrimitiveTypeId = 105055,
  PointSmoothingStateComponentTypeId = 105056, LineSmoothingStateComponentTypeId = 105057, PolygonSmoothingStateComponentTypeId = 105058, LuminanceTextureTypeId = 105059,
  AlphaTextureTypeId = 105060, GroupTypeId = 105061, SceneTypeId = 105062, TextPrimitiveTypeTypeId = 105063,
  ToGLCurvesConverterTypeId = 105064, ToGLTextureConverterTypeId = 105065, SplineToGLTextureConverterTypeId = 105066, CullingSpaceStateComponentTypeId = 105067,
  CullingBoxStateComponentTypeId = 105068, ToGLPointsConverterTypeId = 105069, ProceduralThreadingStateComponentTypeId = 105070, DepthTestStateComponentTypeId = 105071,
  CameraVisibilityStateComponentTypeId = 105072, DepthMaskStateComponentTypeId = 105073, AlphaTestStateComponentTypeId = 105074, AlphaFuncStateComponentTypeId = 105075,
  AutomaticInstancingStateComponentTypeId = 105076, BufferTypeId = 105077, ToGLBufferConverterTypeId = 105078, UIntTextureTypeId = 105079,
  PrimitiveSelectableTypeId = 105080, ToGLStateConverterTypeId = 105081, ToGLSphereConverterTypeId = 105082, LastCoreGLTypeId = 105999
}
 

Functions

 IE_CORE_DECLAREPTR (AlphaTexture)
 
 IE_CORE_DECLAREPTR (Bindable)
 
 IE_CORE_DECLAREPTR (BoxPrimitive)
 
 IE_CORE_DECLAREPTR (Buffer)
 
 IE_CORE_DECLAREPTR (Camera)
 
 IE_CORE_DECLAREPTR (ColorTexture)
 
 IE_CORE_DECLAREPTR (CurvesPrimitive)
 
IECOREGL_API void debugPrintErrors (const char *file, int line)
 
 IE_CORE_DECLAREPTR (DepthTexture)
 
 IE_CORE_DECLAREPTR (DiskPrimitive)
 
 IE_CORE_FORWARDDECLARE (MeshPrimitive)
 
 IE_CORE_FORWARDDECLARE (State)
 
 IE_CORE_DECLAREPTR (Font)
 
 IE_CORE_FORWARDDECLARE (Font)
 
 IE_CORE_FORWARDDECLARE (FontLoader)
 
 IE_CORE_FORWARDDECLARE (Texture)
 
 IE_CORE_FORWARDDECLARE (DepthTexture)
 
 IE_CORE_DECLAREPTR (FrameBuffer)
 
IECOREGL_API void glColor (const Imath::V3f &c)
 
IECOREGL_API void glColor (const Imath::Color4f &c)
 
IECOREGL_API void glVertex (const Imath::V3f &v)
 
IECOREGL_API void glNormal (const Imath::V3f &n)
 
IECOREGL_API void glTranslate (const Imath::V2f &t)
 
IECOREGL_API void glTranslate (const Imath::V3f &t)
 
 IE_CORE_DECLAREPTR (Group)
 
IECOREGL_API void init (bool glAlreadyInitialised=false)
 
IECOREGL_API int glslVersion ()
 Returns the current GLSL version.
 
 IE_CORE_DECLAREPTR (LuminanceTexture)
 
 IE_CORE_DECLAREPTR (MeshPrimitive)
 
 IE_CORE_DECLAREPTR (NameStateComponent)
 
GLenum glType (const IECore::Data *data)
 
 IE_CORE_DECLAREPTR (OrthographicCamera)
 
 IE_CORE_DECLAREPTR (PerspectiveCamera)
 
 IE_CORE_DECLAREPTR (PointsPrimitive)
 
 IE_CORE_DECLAREPTR (Primitive)
 
 IE_CORE_DECLAREPTR (QuadPrimitive)
 
 IE_CORE_DECLAREPTR (Renderable)
 
 IE_CORE_FORWARDDECLARE (Scene)
 
 IE_CORE_FORWARDDECLARE (TextureLoader)
 
 IE_CORE_FORWARDDECLARE (ShaderLoader)
 
 IE_CORE_DECLAREPTR (Renderer)
 
 IE_CORE_FORWARDDECLARE (Group)
 
 IE_CORE_FORWARDDECLARE (Camera)
 
 IE_CORE_DECLAREPTR (Scene)
 
 IE_CORE_FORWARDDECLARE (Shader)
 
 IE_CORE_DECLAREPTR (ShaderStateComponent)
 
 IE_CORE_DECLAREPTR (SpherePrimitive)
 
 IE_CORE_DECLAREPTR (SplineToGLTextureConverter)
 
 IE_CORE_FORWARDDECLARE (StateComponent)
 
 IE_CORE_DECLAREPTR (StateComponent)
 
 IE_CORE_DECLAREPTR (TextPrimitive)
 
 IE_CORE_FORWARDDECLARE (FrameBuffer)
 
 IE_CORE_DECLAREPTR (Texture)
 
 IE_CORE_DECLAREPTR (ToGLBufferConverter)
 
 IE_CORE_DECLAREPTR (ToGLCameraConverter)
 
 IE_CORE_FORWARDDECLARE (CurvesPrimitive)
 
 IE_CORE_DECLAREPTR (ToGLMeshConverter)
 
 IE_CORE_FORWARDDECLARE (PointsPrimitive)
 
 IE_CORE_FORWARDDECLARE (SpherePrimitive)
 
 IE_CORE_DECLAREPTR (ToGLSphereConverter)
 
 IE_CORE_DECLAREPTR (ToGLStateConverter)
 
 IE_CORE_DECLAREPTR (ToGLTextureConverter)
 
 IE_CORE_DECLAREPTR (Color)
 
 IE_CORE_DECLAREPTR (BlendFuncStateComponent)
 
 IE_CORE_DECLAREPTR (BlendEquationStateComponent)
 
 IE_CORE_DECLAREPTR (DoubleSidedStateComponent)
 
 IE_CORE_DECLAREPTR (LineSmoothingStateComponent)
 
 IE_CORE_DECLAREPTR (PointSmoothingStateComponent)
 
 IE_CORE_DECLAREPTR (DepthTestStateComponent)
 
 IE_CORE_DECLAREPTR (DepthMaskStateComponent)
 
 IE_CORE_DECLAREPTR (CullingSpaceStateComponent)
 
 IE_CORE_DECLAREPTR (ProceduralThreadingStateComponent)
 
 IE_CORE_DECLAREPTR (CameraVisibilityStateComponent)
 
 IE_CORE_DECLAREPTR (AutomaticInstancingStateComponent)
 
 IE_CORE_DECLAREPTR (UIntTexture)
 
IECOREGL_API const std::vector< UniformFloatFunction > & uniformFloatFunctions ()
 
IECOREGL_API const std::vector< UniformIntFunction > & uniformIntFunctions ()
 
IECOREGL_API const std::vector< std::vector< UniformMatrixFunction > > & uniformMatrixFunctions ()
 
 IE_CORE_FORWARDDECLARE (BoxPrimitive)
 
 IE_CORE_FORWARDDECLARE (Primitive)
 
 IE_CORE_FORWARDDECLARE (NameStateComponent)
 
 IE_CORE_FORWARDDECLARE (Renderer)
 

Variables

 State = IECoreGL.State
 

Detailed Description

The namespace within which all CoreGL functionality is defined.

Typedef Documentation

typedef TypedStateComponent<bool, AutomaticInstancingStateComponentTypeId> IECoreGL::AutomaticInstancingStateComponent

Defines whether or not the renderer will create instances automatically when identical primitives are encountered.

typedef TypedStateComponent<bool, RightHandedOrientationStateComponentTypeId> IECoreGL::RightHandedOrientationStateComponent

Used to implement the "rightHandedOrientation" Renderer attribute. Implemented by calling glFrontFace( GL_CCW ) when true and glFrontFace( GL_CW ) when false.

typedef TypedStateComponent<bool, TransparentShadingStateComponentTypeId> IECoreGL::TransparentShadingStateComponent
Todo:
Consider also moving the following state components to Primitive header since the renderer maps then to "gl:primitive:*" Used to signify that the shading for a primitive may produce transparent values. The Renderer maps the "gl:shade:transparent" attribute directly to this state. Note that this information is provided as a separate state item rather than as a query on the Shader class as the values of variables on Primitives may change the transparency of a shader.

Function Documentation

IECOREGL_API void IECoreGL::init ( bool  glAlreadyInitialised = false)

This function must be called at least once before using any functionality in the IECoreGL library. Set glAlreadyInitialised to true if you have setup an OpenGL context already, and false if you wish one to be created for you. There is no harm in calling it multiple times.

IECOREGL_API const std::vector<UniformFloatFunction>& IECoreGL::uniformFloatFunctions ( )

Returns a vector containing function pointers to glUniform1fv, glUniform2fv ... glUniform4fv. This can be useful to avoid switching on your datasize when setting shader parameters - you can instead index straight into this vector to retrieve the appropriate function to call.

IECOREGL_API const std::vector<UniformIntFunction>& IECoreGL::uniformIntFunctions ( )

Returns a vector containing function pointers to glUniform1iv, glUniform2iv ... glUniform4iv. This can be useful to avoid switching on your datasize when setting shader parameters - you can instead index straight into this vector to retrieve the appropriate function to call.

IECOREGL_API const std::vector<std::vector<UniformMatrixFunction> >& IECoreGL::uniformMatrixFunctions ( )

Returns a vector of vectors containing function pointers to the glUniformMatrix*fv functions. This can be useful to avoid switching on your matrix dimensions when setting shader parameters - you can instead index straight into the vectors using the matrix dimensions to retrieve the appropriate function to call.