#include <graphic_context.h>
Inheritance diagram for CL_GraphicContext:

Implementation | |
| class | CL_PrimitivesArray |
| class | CL_Sprite_Impl |
| class | CL_Image |
| class | CL_GlyphCache |
| class | CL_Draw |
Public Member Functions | |
Construction | |
| CL_GraphicContext () | |
| Constructs a graphic context. | |
| CL_GraphicContext (CL_GraphicContextProvider *provider) | |
| Constructs a GraphicContext. | |
| ~CL_GraphicContext () | |
Attributes | |
| CL_Texture | get_texture (int index) |
| Returns the currently selected texture for the specified index. | |
| CL_BlendMode | get_blend_mode () |
| Returns the blending mode description. | |
| CL_BufferControl | get_buffer_control () |
| Returns the buffer control description. | |
| CL_PolygonRasterizer | get_polygon_rasterizer () |
| Returns the polygon rasterizer setup. | |
| CL_Pen | get_pen () |
| Returns the currently selected pen. | |
| int | get_width () const |
| Returns the current width of the context. | |
| int | get_height () const |
| Returns the current height of the context. | |
| CL_Size | get_size () const |
| Returns the current size of the context. | |
| CL_Rect | get_cliprect () const |
| Returns the current clipping rectangle used on the graphic context. | |
| const CL_Mat4f & | get_modelview () const |
| Returns the current effective modelview matrix. | |
| CL_Size | get_max_texture_size () const |
| Returns the maximum size of a texture this graphic context supports. | |
| CL_GraphicContextProvider * | get_provider () |
| Returns the provider for this graphic context. | |
| const CL_GraphicContextProvider *const | get_provider () const |
Operations | |
| CL_GraphicContext | create_worker_gc () |
| Creates a new additional graphic context. | |
| CL_PixelBuffer | get_pixeldata (const CL_Rect &rect=CL_Rect(0, 0, 0, 0)) const |
| Return the content of the draw buffer into a pixel buffer. | |
| void | set_frame_buffer (const CL_FrameBuffer &frame_buffer) |
| Sets the current frame buffer. | |
| void | reset_frame_buffer () |
| Resets the current frame buffer to be the initial frame buffer. | |
| void | set_texture (int unit_index, const CL_Texture &texture) |
| Select texture into index. | |
| void | reset_texture (int unit_index) |
| Remove texture from index. | |
| void | set_program_object (CL_StandardProgram standard_program) |
| Set active program object to the standard program specified. | |
| void | set_program_object (const CL_ProgramObject &program) |
| Set active program object. | |
| void | reset_program_object () |
| Remove active program object. | |
| void | set_blend_mode (const CL_BlendMode &blend_mode) |
| Set blending modes. | |
| void | reset_blend_mode () |
| Reset blending to the default. | |
| void | set_buffer_control (const CL_BufferControl &buffer_control) |
| Set buffer control states. | |
| void | reset_buffer_control () |
| Set default buffer control states. | |
| void | set_pen (const CL_Pen &pen) |
| Select pen. | |
| void | reset_pen () |
| Reset pen settings to defaults. | |
| void | set_polygon_rasterizer (const CL_PolygonRasterizer &raster) |
| Set polygon rasterizer settings. | |
| void | reset_polygon_rasterizer () |
| Reset polygon rasterizer settings to defaults. | |
| void | draw_primitives (CL_PrimitivesType type, int num_vertices, const CL_PrimitivesArray &array) |
| Draw primitives on gc. | |
| void | set_primitives_array (const CL_PrimitivesArray &array) |
| Set the primitives array on the gc. | |
| void | draw_primitives_array (CL_PrimitivesType type, int num_vertices) |
| Draws primitives from the current assigned primitives array. | |
| void | draw_primitives_array (CL_PrimitivesType type, int offset, int num_vertices) |
| Draw primitives array. | |
| void | draw_primitives_elements (CL_PrimitivesType type, int count, unsigned int *indices) |
| Draw primitives elements. | |
| void | draw_primitives_elements (CL_PrimitivesType type, int count, unsigned short *indices) |
| Draw primitives elements. | |
| void | draw_primitives_elements (CL_PrimitivesType type, int count, unsigned char *indices) |
| Draw primitives elements. | |
| void | draw_primitives_elements (CL_PrimitivesType type, int count, CL_ElementArrayBuffer &element_array, CL_VertexAttributeDataType indices_type, void *offset=0) |
| Draw primitives elements. | |
| void | reset_primitives_array () |
| Reset the primitives arrays. | |
| void | draw_pixels (float x, float y, const CL_PixelBufferRef &pixel_buffer, const CL_Colorf &color=CL_Colorf::white) |
| Draw pixel buffer on gc. | |
| void | draw_pixels (float x, float y, float zoom_x, float zoom_y, const CL_PixelBufferRef &pixel_buffer, const CL_Colorf &color=CL_Colorf::white) |
| Draw pixels. | |
| void | clear (const CL_Colorf &color=CL_Colorf::black) |
| Clears the whole context using the specified color. | |
| void | clear_stencil (int value=0) |
| Clear the stencil buffer. | |
| void | clear_depth (float value=0) |
| Clear the depth buffer. | |
| void | set_cliprect (const CL_Rect &rect) |
| Set the current clipping rectangle. | |
| void | push_cliprect (const CL_Rect &rect) |
| Push current clipping rectangle to stack. | |
| void | push_cliprect () |
| Push cliprect. | |
| void | pop_cliprect () |
| Pop current clipping rectangle from the stack. | |
| void | reset_cliprect () |
| Removes the set clipping rectangle and empties the cliprect stack. | |
| void | set_map_mode (CL_MapMode mode) |
| Set the projection mapping mode. | |
| void | set_viewport (const CL_Rectf &viewport) |
| Set the viewport to be used in user projection map mode. | |
| void | set_projection (const CL_Mat4f &matrix) |
| Set the projection matrix to be used in user projection map mode. | |
| void | set_modelview (const CL_Mat4f &matrix) |
| Sets the model view matrix to a new matrix. | |
| void | mult_modelview (const CL_Mat4f &matrix) |
| Multiplies the passed matrix onto the model view matrix. | |
| void | push_modelview () |
| Pushes current model view matrix onto the model view stack. | |
| void | set_translate (float x, float y, float z=0.0) |
| Sets a translate offset matrix, ignoring any earlier model view settings. | |
| void | mult_translate (float x, float y, float z=0.0) |
| Adds the translate offset. | |
| void | push_translate (float x, float y, float z=0.0) |
| Push translation offset onto model view stack. | |
| void | set_rotate (const CL_Angle &angle, float x=0.0, float y=0.0, float z=1.0, bool normalize=true) |
| Sets a rotation matrix, ignoring any earlier model view settings. | |
| void | mult_rotate (const CL_Angle &angle, float x=0.0, float y=0.0, float z=1.0, bool normalize=true) |
| Adds a rotation matrix to existing model view. | |
| void | push_rotate (const CL_Angle &angle, float x=0.0, float y=0.0, float z=1.0) |
| Pushes a rotation matrix onto model view stack. | |
| void | set_scale (float x, float y, float z=1.0) |
| Sets a scale matrix, ignoring any earlier model view settings. | |
| void | mult_scale (float x, float y, float z=1.0) |
| Adds a scale matrix to existing model view. | |
| void | push_scale (float x, float y, float z=1.0) |
| Pushes a scale matrix onto model view stack. | |
| void | pop_modelview () |
| Pops last pushed model view matrix off the stack and makes it the active one. | |
| void | flush_batcher () |
| Flushes the render batcher currently active. | |
| void | set_batcher (CL_RenderBatcher *batcher) |
| Specifies which render batcher is to be currently active. | |
Events | |
| CL_Signal_v0 & | sig_gc_destruction_imminent () |
| Called when the last GC in the thread is about to be destroyed. | |
|
|
Constructs a graphic context.
|
|
|
Constructs a GraphicContext.
|
|
|
|
|
|
Clears the whole context using the specified color.
|
|
|
Clear the depth buffer.
|
|
|
Clear the stencil buffer.
|
|
|
Creates a new additional graphic context. This function creates a new graphic context which shares objects with the current graphic context. Since a GC cannot be safely accessed from multiple threads simultaneously, this function allows the application to create a graphic context for the worker threads. |
|
||||||||||||||||||||||||||||
|
Draw pixels.
|
|
||||||||||||||||||||
|
Draw pixel buffer on gc.
|
|
||||||||||||||||
|
Draw primitives on gc.
|
|
||||||||||||||||
|
Draw primitives array.
|
|
||||||||||||
|
Draws primitives from the current assigned primitives array.
|
|
||||||||||||||||||||||||
|
Draw primitives elements.
|
|
||||||||||||||||
|
Draw primitives elements.
|
|
||||||||||||||||
|
Draw primitives elements.
|
|
||||||||||||||||
|
Draw primitives elements.
|
|
|
Flushes the render batcher currently active.
|
|
|
Returns the blending mode description.
|
|
|
Returns the buffer control description.
|
|
|
Returns the current clipping rectangle used on the graphic context.
|
|
|
Returns the current height of the context.
|
|
|
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. |
|
|
Returns the current effective modelview matrix.
|
|
|
Returns the currently selected pen.
|
|
|
Return the content of the draw buffer into a pixel buffer.
|
|
|
Returns the polygon rasterizer setup.
|
|
|
|
|
|
Returns the provider for this graphic context.
|
|
|
Returns the current size of the context.
|
|
|
Returns the currently selected texture for the specified index.
|
|
|
Returns the current width of the context.
|
|
|
Multiplies the passed matrix onto the model view matrix.
|
|
||||||||||||||||||||||||
|
Adds a rotation matrix to existing model view.
|
|
||||||||||||||||
|
Adds a scale matrix to existing model view.
|
|
||||||||||||||||
|
Adds the translate offset. This offset will affect any subsequent display operations on the current displaycard, by translating the position of the display operation with the offset. The offset will be offset by any previous offsets pushed onto the stack, eg. it inherits the previous offset. |
|
|
Pop current clipping rectangle from the stack.
|
|
|
Pops last pushed model view matrix off the stack and makes it the active one.
|
|
|
Push cliprect.
|
|
|
Push current clipping rectangle to stack. If a rectangle is passed, it afterwards sets clipping rectangle to the union of the current rectangle and the passed rectangle. |
|
|
Pushes current model view matrix onto the model view stack.
|
|
||||||||||||||||||||
|
Pushes a rotation matrix onto model view stack.
|
|
||||||||||||||||
|
Pushes a scale matrix onto model view stack.
|
|
||||||||||||||||
|
Push translation offset onto model view stack. This function is a convenience function for calling push_modelview, then mult_translate. This offset will affect any subsequent display operations on the current displaycard, by translating the position of the display operation with the offset. The offset will be offset by any previous offsets pushed onto the stack, eg. it inherits the previous offset. |
|
|
Reset blending to the default.
|
|
|
Set default buffer control states.
|
|
|
Removes the set clipping rectangle and empties the cliprect stack.
|
|
|
Resets the current frame buffer to be the initial frame buffer.
|
|
|
Reset pen settings to defaults.
|
|
|
Reset polygon rasterizer settings to defaults.
|
|
|
Reset the primitives arrays.
|
|
|
Remove active program object.
|
|
|
Remove texture from index.
|
|
|
Specifies which render batcher is to be currently active. If the render batcher is already active, nothing happens. If a different render batcher is currently active, it is flushed before the new batcher is made active. |
|
|
Set blending modes.
|
|
|
Set buffer control states.
|
|
|
Set the current clipping rectangle.
|
|
|
Sets the current frame buffer.
|
|
|
Set the projection mapping mode.
|
|
|
Sets the model view matrix to a new matrix.
|
|
|
Select pen.
|
|
|
Set polygon rasterizer settings.
|
|
|
Set the primitives array on the gc.
|
|
|
Set active program object.
|
|
|
Set active program object to the standard program specified.
|
|
|
Set the projection matrix to be used in user projection map mode.
|
|
||||||||||||||||||||||||
|
Sets a rotation matrix, ignoring any earlier model view settings.
|
|
||||||||||||||||
|
Sets a scale matrix, ignoring any earlier model view settings.
|
|
||||||||||||
|
Select texture into index.
|
|
||||||||||||||||
|
Sets a translate offset matrix, ignoring any earlier model view settings. This offset will affect any subsequent display operations on the current displaycard, by translating the position of the display operation with the offset. |
|
|
Set the viewport to be used in user projection map mode.
|
|
|
Called when the last GC in the thread is about to be destroyed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6