ClanLib  2.3.7
List of all members
CL_GraphicContextProvider Class Referenceabstract

Interface for implementing a CL_GraphicContext target. More...

#include <graphic_context_provider.h>

Public Member Functions

Construction
virtual ~CL_GraphicContextProvider ()
 
Attributes
virtual int get_max_attributes ()=0
 Returns the maximum amount of attributes available. More...
 
virtual CL_Size get_max_texture_size () const =0
 Returns the maximum size of a texture this graphic context supports. More...
 
virtual int get_width () const =0
 Returns the current width of the context. More...
 
virtual int get_height () const =0
 Returns the current height of the context. More...
 
Operations
virtual void destroy ()=0
 Destroys graphic context provider. More...
 
virtual CL_PixelBuffer get_pixeldata (const CL_Rect &rect, CL_TextureFormat pixel_format, bool clamp) const =0
 Return the content of the draw buffer into a pixel buffer. More...
 
virtual CL_TextureProvideralloc_texture (CL_TextureDimensions texture_dimensions)=0
 Allocate texture provider for this gc. More...
 
virtual CL_OcclusionQueryProvideralloc_occlusion_query ()=0
 Allocate occlusion query provider of this gc. More...
 
virtual CL_ProgramObjectProvideralloc_program_object ()=0
 Allocate program object provider of this gc. More...
 
virtual CL_ShaderObjectProvideralloc_shader_object ()=0
 Allocate shader object provider of this gc. More...
 
virtual CL_FrameBufferProvideralloc_frame_buffer ()=0
 Allocate frame buffer provider for this gc. More...
 
virtual CL_RenderBufferProvideralloc_render_buffer ()=0
 Allocate render buffer provider for this gc. More...
 
virtual
CL_VertexArrayBufferProvider
alloc_vertex_array_buffer ()=0
 Allocate vertex array buffer provider for this gc. More...
 
virtual
CL_ElementArrayBufferProvider
alloc_element_array_buffer ()=0
 Allocate element array buffer provider for this gc. More...
 
virtual CL_PixelBufferProvideralloc_pixel_buffer ()=0
 Allocate pixel buffer provider for this gc. More...
 
virtual void set_program_object (CL_StandardProgram standard_program)=0
 Set active program object to the standard program specified. More...
 
virtual void set_program_object (const CL_ProgramObject &program, int program_matrix_flags)=0
 Set active program object. More...
 
virtual void reset_program_object ()=0
 Remove active program object. More...
 
virtual void set_texture (int unit_index, const CL_Texture &texture)=0
 Select texture into unit. More...
 
virtual void reset_texture (int unit_index, const CL_Texture &texture)=0
 Remove texture from unit. More...
 
virtual void set_frame_buffer (const CL_FrameBuffer &write_buffer, const CL_FrameBuffer &read_buffer)=0
 Set a frame buffer for off-screen rendering. More...
 
virtual void reset_frame_buffer ()=0
 Set the rendering buffer back to the screen. More...
 
virtual void set_blend_mode (const CL_BlendMode &blendmode)=0
 Set blending modes. More...
 
virtual void set_buffer_control (const CL_BufferControl &buffer_control)=0
 Set buffer control states. More...
 
virtual void set_pen (const CL_Pen &pen)=0
 Select pen. More...
 
virtual void set_polygon_rasterizer (const CL_PolygonRasterizer &raster)=0
 Set polygon rasterizer settings. More...
 
virtual void draw_primitives (CL_PrimitivesType type, int num_vertices, const CL_PrimitivesArrayData *const prim_array)=0
 Draw primitives on gc. More...
 
virtual void set_primitives_array (const CL_PrimitivesArrayData *const prim_array)=0
 Set the primitives array on the gc. More...
 
virtual void draw_primitives_array (CL_PrimitivesType type, int offset, int num_vertices)=0
 Draws primitives from the current assigned primitives array. More...
 
virtual void draw_primitives_array_instanced (CL_PrimitivesType type, int offset, int num_vertices, int instance_count)=0
 Draws instanced primitives from the current assigned primitives array. More...
 
virtual void draw_primitives_elements (CL_PrimitivesType type, int count, unsigned int *indices)=0
 Draw primitives elements. More...
 
virtual void draw_primitives_elements (CL_PrimitivesType type, int count, unsigned short *indices)=0
 Draw primitives elements. More...
 
virtual void draw_primitives_elements (CL_PrimitivesType type, int count, unsigned char *indices)=0
 Draw primitives elements. More...
 
virtual void draw_primitives_elements_instanced (CL_PrimitivesType type, int count, unsigned int *indices, int instance_count)=0
 Draw primitives elements instanced. More...
 
virtual void draw_primitives_elements_instanced (CL_PrimitivesType type, int count, unsigned short *indices, int instance_count)=0
 Draw primitives elements. More...
 
virtual void draw_primitives_elements_instanced (CL_PrimitivesType type, int count, unsigned char *indices, int instance_count)=0
 Draw primitives elements. More...
 
virtual void draw_primitives_elements (CL_PrimitivesType type, int count, CL_ElementArrayBufferProvider *array_provider, CL_VertexAttributeDataType indices_type, void *offset)=0
 Draw primitives elements. More...
 
virtual void draw_primitives_elements_instanced (CL_PrimitivesType type, int count, CL_ElementArrayBufferProvider *array_provider, CL_VertexAttributeDataType indices_type, void *offset, int instance_count)=0
 Draw primitives elements instanced. More...
 
virtual void primitives_array_freed (const CL_PrimitivesArrayData *const prim_array)=0
 Called when a primitives array is being recycled. More...
 
virtual void reset_primitives_array ()=0
 Reset the primitives arrays. More...
 
virtual void draw_pixels (CL_GraphicContext &gc, float x, float y, float zoom_x, float zoom_y, const CL_PixelBuffer &pixel_buffer, const CL_Rect &src_rect, const CL_Colorf &color)=0
 Draw pixel buffer on gc. More...
 
virtual void set_clip_rect (const CL_Rect &rect)=0
 Set clip rect. More...
 
virtual void reset_clip_rect ()=0
 Reset clip rect. More...
 
virtual void clear (const CL_Colorf &color)=0
 Clears the whole context using the specified color. More...
 
virtual void clear_depth (float value)=0
 Clear the depth buffer. More...
 
virtual void clear_stencil (int value)=0
 Clear the stencil buffer. More...
 
virtual void set_map_mode (CL_MapMode mode)=0
 Set the projection mapping mode. More...
 
virtual void set_viewport (const CL_Rectf &viewport)=0
 Set the viewport to be used in user projection map mode. More...
 
virtual void set_projection (const CL_Mat4f &matrix)=0
 Set the projection matrix to be used in user projection map mode. More...
 
virtual void set_modelview (const CL_Mat4f &matrix)=0
 Sets the model view matrix to a new matrix. More...
 

Detailed Description

Interface for implementing a CL_GraphicContext target.

Constructor & Destructor Documentation

virtual CL_GraphicContextProvider::~CL_GraphicContextProvider ( )
inlinevirtual

Member Function Documentation

virtual CL_ElementArrayBufferProvider* CL_GraphicContextProvider::alloc_element_array_buffer ( )
pure virtual

Allocate element array buffer provider for this gc.

virtual CL_FrameBufferProvider* CL_GraphicContextProvider::alloc_frame_buffer ( )
pure virtual

Allocate frame buffer provider for this gc.

virtual CL_OcclusionQueryProvider* CL_GraphicContextProvider::alloc_occlusion_query ( )
pure virtual

Allocate occlusion query provider of this gc.

virtual CL_PixelBufferProvider* CL_GraphicContextProvider::alloc_pixel_buffer ( )
pure virtual

Allocate pixel buffer provider for this gc.

virtual CL_ProgramObjectProvider* CL_GraphicContextProvider::alloc_program_object ( )
pure virtual

Allocate program object provider of this gc.

virtual CL_RenderBufferProvider* CL_GraphicContextProvider::alloc_render_buffer ( )
pure virtual

Allocate render buffer provider for this gc.

virtual CL_ShaderObjectProvider* CL_GraphicContextProvider::alloc_shader_object ( )
pure virtual

Allocate shader object provider of this gc.

virtual CL_TextureProvider* CL_GraphicContextProvider::alloc_texture ( CL_TextureDimensions  texture_dimensions)
pure virtual

Allocate texture provider for this gc.

virtual CL_VertexArrayBufferProvider* CL_GraphicContextProvider::alloc_vertex_array_buffer ( )
pure virtual

Allocate vertex array buffer provider for this gc.

virtual void CL_GraphicContextProvider::clear ( const CL_Colorf color)
pure virtual

Clears the whole context using the specified color.

virtual void CL_GraphicContextProvider::clear_depth ( float  value)
pure virtual

Clear the depth buffer.

Parameters
value,:value to clear to. Range 0.0 - 1.0.
virtual void CL_GraphicContextProvider::clear_stencil ( int  value)
pure virtual

Clear the stencil buffer.

Parameters
valuevalue to clear to.
virtual void CL_GraphicContextProvider::destroy ( )
pure virtual

Destroys graphic context provider.

virtual void CL_GraphicContextProvider::draw_pixels ( CL_GraphicContext gc,
float  x,
float  y,
float  zoom_x,
float  zoom_y,
const CL_PixelBuffer pixel_buffer,
const CL_Rect src_rect,
const CL_Colorf color 
)
pure virtual

Draw pixel buffer on gc.

virtual void CL_GraphicContextProvider::draw_primitives ( CL_PrimitivesType  type,
int  num_vertices,
const CL_PrimitivesArrayData *const  prim_array 
)
pure virtual

Draw primitives on gc.

virtual void CL_GraphicContextProvider::draw_primitives_array ( CL_PrimitivesType  type,
int  offset,
int  num_vertices 
)
pure virtual

Draws primitives from the current assigned primitives array.

virtual void CL_GraphicContextProvider::draw_primitives_array_instanced ( CL_PrimitivesType  type,
int  offset,
int  num_vertices,
int  instance_count 
)
pure virtual

Draws instanced primitives from the current assigned primitives array.

virtual void CL_GraphicContextProvider::draw_primitives_elements ( CL_PrimitivesType  type,
int  count,
unsigned int *  indices 
)
pure virtual

Draw primitives elements.

Parameters
type= Primitives Type
count= value
indices= value
virtual void CL_GraphicContextProvider::draw_primitives_elements ( CL_PrimitivesType  type,
int  count,
unsigned short *  indices 
)
pure virtual

Draw primitives elements.

Parameters
type= Primitives Type
count= value
indices= short
virtual void CL_GraphicContextProvider::draw_primitives_elements ( CL_PrimitivesType  type,
int  count,
unsigned char *  indices 
)
pure virtual

Draw primitives elements.

Parameters
type= Primitives Type
count= value
indices= char
virtual void CL_GraphicContextProvider::draw_primitives_elements ( CL_PrimitivesType  type,
int  count,
CL_ElementArrayBufferProvider array_provider,
CL_VertexAttributeDataType  indices_type,
void *  offset 
)
pure virtual

Draw primitives elements.

Parameters
type= Primitives Type
count= value
array_provider= Element Array Buffer Provider
indices_type= Vertex Attribute Data Type
offset= void
virtual void CL_GraphicContextProvider::draw_primitives_elements_instanced ( CL_PrimitivesType  type,
int  count,
unsigned int *  indices,
int  instance_count 
)
pure virtual

Draw primitives elements instanced.

Parameters
type= Primitives Type
count= value
indices= value
instance_count= number of instances drawn
virtual void CL_GraphicContextProvider::draw_primitives_elements_instanced ( CL_PrimitivesType  type,
int  count,
unsigned short *  indices,
int  instance_count 
)
pure virtual

Draw primitives elements.

Parameters
type= Primitives Type
count= value
indices= short
instance_count= number of instances drawn
virtual void CL_GraphicContextProvider::draw_primitives_elements_instanced ( CL_PrimitivesType  type,
int  count,
unsigned char *  indices,
int  instance_count 
)
pure virtual

Draw primitives elements.

Parameters
type= Primitives Type
count= value
indices= char
instance_count= number of instances drawn
virtual void CL_GraphicContextProvider::draw_primitives_elements_instanced ( CL_PrimitivesType  type,
int  count,
CL_ElementArrayBufferProvider array_provider,
CL_VertexAttributeDataType  indices_type,
void *  offset,
int  instance_count 
)
pure virtual

Draw primitives elements instanced.

Parameters
type= Primitives Type
count= value
array_provider= Element Array Buffer Provider
indices_type= Vertex Attribute Data Type
offset= void
virtual int CL_GraphicContextProvider::get_height ( ) const
pure virtual

Returns the current height of the context.

virtual int CL_GraphicContextProvider::get_max_attributes ( )
pure virtual

Returns the maximum amount of attributes available.

virtual CL_Size CL_GraphicContextProvider::get_max_texture_size ( ) const
pure virtual

Returns the maximum size of a texture this graphic context supports.

It returns CL_Size(0,0) if there is no known limitation to the max texture size.

virtual CL_PixelBuffer CL_GraphicContextProvider::get_pixeldata ( const CL_Rect rect,
CL_TextureFormat  pixel_format,
bool  clamp 
) const
pure virtual

Return the content of the draw buffer into a pixel buffer.

virtual int CL_GraphicContextProvider::get_width ( ) const
pure virtual

Returns the current width of the context.

virtual void CL_GraphicContextProvider::primitives_array_freed ( const CL_PrimitivesArrayData *const  prim_array)
pure virtual

Called when a primitives array is being recycled.

virtual void CL_GraphicContextProvider::reset_clip_rect ( )
pure virtual

Reset clip rect.

virtual void CL_GraphicContextProvider::reset_frame_buffer ( )
pure virtual

Set the rendering buffer back to the screen.

virtual void CL_GraphicContextProvider::reset_primitives_array ( )
pure virtual

Reset the primitives arrays.

virtual void CL_GraphicContextProvider::reset_program_object ( )
pure virtual

Remove active program object.

virtual void CL_GraphicContextProvider::reset_texture ( int  unit_index,
const CL_Texture texture 
)
pure virtual

Remove texture from unit.

virtual void CL_GraphicContextProvider::set_blend_mode ( const CL_BlendMode blendmode)
pure virtual

Set blending modes.

virtual void CL_GraphicContextProvider::set_buffer_control ( const CL_BufferControl buffer_control)
pure virtual

Set buffer control states.

virtual void CL_GraphicContextProvider::set_clip_rect ( const CL_Rect rect)
pure virtual

Set clip rect.

virtual void CL_GraphicContextProvider::set_frame_buffer ( const CL_FrameBuffer write_buffer,
const CL_FrameBuffer read_buffer 
)
pure virtual

Set a frame buffer for off-screen rendering.

virtual void CL_GraphicContextProvider::set_map_mode ( CL_MapMode  mode)
pure virtual

Set the projection mapping mode.

virtual void CL_GraphicContextProvider::set_modelview ( const CL_Mat4f matrix)
pure virtual

Sets the model view matrix to a new matrix.

virtual void CL_GraphicContextProvider::set_pen ( const CL_Pen pen)
pure virtual

Select pen.

virtual void CL_GraphicContextProvider::set_polygon_rasterizer ( const CL_PolygonRasterizer raster)
pure virtual

Set polygon rasterizer settings.

virtual void CL_GraphicContextProvider::set_primitives_array ( const CL_PrimitivesArrayData *const  prim_array)
pure virtual

Set the primitives array on the gc.

virtual void CL_GraphicContextProvider::set_program_object ( CL_StandardProgram  standard_program)
pure virtual

Set active program object to the standard program specified.

virtual void CL_GraphicContextProvider::set_program_object ( const CL_ProgramObject program,
int  program_matrix_flags 
)
pure virtual

Set active program object.

Parameters
program= Program to set
program_matrix_flags= Which matricies will be set in the program object ( CL_ProgramMatrixFlags bitmask flags )
virtual void CL_GraphicContextProvider::set_projection ( const CL_Mat4f matrix)
pure virtual

Set the projection matrix to be used in user projection map mode.

virtual void CL_GraphicContextProvider::set_texture ( int  unit_index,
const CL_Texture texture 
)
pure virtual

Select texture into unit.

virtual void CL_GraphicContextProvider::set_viewport ( const CL_Rectf viewport)
pure virtual

Set the viewport to be used in user projection map mode.


The documentation for this class was generated from the following file: