#include <mmsfbbackendinterface.h>
Public Member Functions | |
MMSFBBackEndInterface (int queue_size=1000) | |
void | init (Display *x_display, int x_screen, Window x_window, MMSFBRectangle x11_win_rect) |
void | init () |
void | swap () |
void | alloc (MMSFBSurface *surface) |
void | free (MMSFBSurface *surface) |
void | clear (MMSFBSurface *surface, MMSFBColor &color) |
void | fillRectangle (MMSFBSurface *surface, MMSFBRectangle &rect, MMSFBDrawingFlags drawingflags) |
void | fillTriangle (MMSFBSurface *surface, MMSFBTriangle &triangle) |
void | drawLine (MMSFBSurface *surface, int x1, int y1, int x2, int y2) |
void | drawRectangle (MMSFBSurface *surface, MMSFBRectangle &rect) |
void | drawTriangle (MMSFBSurface *surface, MMSFBTriangle &triangle) |
void | blit (MMSFBSurface *surface, MMSFBSurface *source, MMSFBRectangle &src_rect, int x, int y, MMSFBBlittingFlags blittingflags) |
void | stretchBlit (MMSFBSurface *surface, MMSFBSurface *source, MMSFBRectangle &src_rect, MMSFBRectangle &dst_rect, MMSFBBlittingFlags blittingflags) |
void | blitBuffer (MMSFBSurface *surface, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height, MMSFBRectangle &src_rect, int x, int y, MMSFBBlittingFlags blittingflags) |
void | stretchBlitBuffer (MMSFBSurface *surface, MMSFBSurfacePlanes *src_planes, MMSFBSurfacePixelFormat src_pixelformat, int src_width, int src_height, MMSFBRectangle &src_rect, MMSFBRectangle &dst_rect, MMSFBBlittingFlags blittingflags) |
void | createAlphaTexture (unsigned int *texture, unsigned char *buffer, int width, int height) |
void | deleteTexture (unsigned int texture) |
void | drawString (MMSFBSurface *surface, string &text, int len, int x, int y) |
void | renderScene (MMSFBSurface *surface, MMS_VERTEX_ARRAY **varrays, MMS_INDEX_ARRAY **iarrays, MMS3D_MATERIAL *materials, MMSFBSurface **texsurfaces, MMS3D_OBJECT **objects) |
void | merge (MMSFBSurface *surface, MMSFBSurface *source1, MMSFBSurface *source2, MMSFBMergingMode mergingmode) |
void | initVertexBuffer (unsigned int *buffer, unsigned int size, void *data=NULL) |
void | initVertexSubBuffer (unsigned int buffer, unsigned int offset, unsigned int size, void *data) |
void | initIndexBuffer (unsigned int *buffer, unsigned int size, void *data=NULL) |
void | initIndexSubBuffer (unsigned int buffer, unsigned int offset, unsigned int size, void *data) |
void | deleteBuffer (unsigned int buffer) |
Private Types | |
enum | BEI_REQUEST_TYPE { BEI_REQUEST_TYPE_INIT = 0, BEI_REQUEST_TYPE_SWAP, BEI_REQUEST_TYPE_ALLOC, BEI_REQUEST_TYPE_FREE, BEI_REQUEST_TYPE_CLEAR, BEI_REQUEST_TYPE_FILLRECTANGLE, BEI_REQUEST_TYPE_FILLTRIANGLE, BEI_REQUEST_TYPE_DRAWLINE, BEI_REQUEST_TYPE_DRAWRECTANGLE, BEI_REQUEST_TYPE_DRAWTRIANGLE, BEI_REQUEST_TYPE_BLIT, BEI_REQUEST_TYPE_STRETCHBLIT, BEI_REQUEST_TYPE_STRETCHBLITBUFFER, BEI_REQUEST_TYPE_CREATEALPHATEXTURE, BEI_REQUEST_TYPE_DELETETEXTURE, BEI_REQUEST_TYPE_DRAWSTRING, BEI_REQUEST_TYPE_RENDERSCENE, BEI_REQUEST_TYPE_MERGE, BEI_REQUEST_TYPE_INITVERTEXBUFFER, BEI_REQUEST_TYPE_INITVERTEXSUBBUFFER, BEI_REQUEST_TYPE_INITINDEXBUFFER, BEI_REQUEST_TYPE_INITINDEXSUBBUFFER, BEI_REQUEST_TYPE_DELETEBUFFER } |
Private Member Functions | |
void | oglMatrix (bool central_projection, int left, int right, int bottom, int top, int nearZ=0, int farZ=1) |
internal: init or update the current matrix | |
void | oglAlloc (MMSFBSurface *surface, bool rbo_required=false) |
internal: allocate a new MMSFBSurface which uses OpenGL memory | |
void | oglBindSurface (MMSFBSurface *surface) |
internal: bind a MMSFBSurface and it's OpenGL handle(s) to the OpenGL context | |
void | oglBindSurface (MMSFBSurface *surface, int nearZ, int farZ, bool central_projection=false) |
internal: see oglBindSurface(MMSFBSurface *surface), additionally using nearer and farther depth in conjunction with central_projection flag | |
bool | oglDrawBuffer (MMSFBBuffer::BUFFER *buffer, MMSFBBuffer::INDEX_BUFFER *index_buffer=NULL, MMSFBBuffer::VERTEX_BUFFER *vertex_buffer=NULL) |
internal: draw arrays of OpenGL primitives | |
void | processData (void *in_data, int in_data_len, void **out_data, int *out_data_len) |
Process a new event from the client. | |
void | processInit (BEI_INIT *req) |
void | processSwap (BEI_SWAP *req) |
void | processAlloc (BEI_ALLOC *req) |
void | processFree (BEI_FREE *req) |
void | processClear (BEI_CLEAR *req) |
void | processFillRectangle (BEI_FILLRECTANGLE *req) |
void | processFillTriangle (BEI_FILLTRIANGLE *req) |
void | processDrawLine (BEI_DRAWLINE *req) |
void | processDrawRectangle (BEI_DRAWRECTANGLE *req) |
void | processDrawTriangle (BEI_DRAWTRIANGLE *req) |
void | processBlit (BEI_BLIT *req) |
void | processStretchBlit (BEI_STRETCHBLIT *req) |
void | processStretchBlitBuffer (BEI_STRETCHBLITBUFFER *req) |
void | processCreateAlphaTexture (BEI_CREATEALPHATEXTURE *req) |
void | processDeleteTexture (BEI_DELETETEXTURE *req) |
void | processDrawString (BEI_DRAWSTRING *req) |
void | processRenderScene (BEI_RENDERSCENE *req) |
void | processMerge (BEI_MERGE *req) |
void | processInitVertexBuffer (BEI_INITVERTEXBUFFER *req) |
void | processInitVertexSubBuffer (BEI_INITVERTEXSUBBUFFER *req) |
void | processInitIndexBuffer (BEI_INITINDEXBUFFER *req) |
void | processInitIndexSubBuffer (BEI_INITINDEXSUBBUFFER *req) |
void | processDeleteBuffer (BEI_DELETEBUFFER *req) |
Private Attributes | |
MMSFBGL | mmsfbgl |
access to the OpenGL wrapper class | |
bool | reset_matrix |
indicate that the matrix should be reset next time used | |
bool | matrix_central_projection |
if true the central projection will be used, else parallel projection is used | |
int | matrix_left |
specify the coordinate for the left vertical clipping plane | |
int | matrix_right |
specify the coordinate for the right vertical clipping plane | |
int | matrix_bottom |
specify the coordinate for the bottom horizontal clipping plane | |
int | matrix_top |
specify the coordinate for the top horizontal clipping plane | |
int | matrix_nearZ |
specify the distance to the nearer depth clipping plane | |
int | matrix_farZ |
specify the distance to the farther depth clipping plane | |
Classes | |
struct | BEI_ALLOC |
struct | BEI_BLIT |
struct | BEI_CLEAR |
struct | BEI_CREATEALPHATEXTURE |
struct | BEI_DELETEBUFFER |
struct | BEI_DELETETEXTURE |
struct | BEI_DRAWLINE |
struct | BEI_DRAWRECTANGLE |
struct | BEI_DRAWSTRING |
struct | BEI_DRAWTRIANGLE |
struct | BEI_FILLRECTANGLE |
struct | BEI_FILLTRIANGLE |
struct | BEI_FREE |
struct | BEI_INIT |
struct | BEI_INITINDEXBUFFER |
struct | BEI_INITINDEXSUBBUFFER |
struct | BEI_INITVERTEXBUFFER |
struct | BEI_INITVERTEXSUBBUFFER |
struct | BEI_MERGE |
struct | BEI_RENDERSCENE |
struct | BEI_STRETCHBLIT |
struct | BEI_STRETCHBLITBUFFER |
struct | BEI_SWAP |
Definition at line 46 of file mmsfbbackendinterface.h.
enum MMSFBBackEndInterface::BEI_REQUEST_TYPE [private] |
Definition at line 48 of file mmsfbbackendinterface.h.
MMSFBBackEndInterface::MMSFBBackEndInterface | ( | int | queue_size = 1000 |
) |
Definition at line 254 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::oglMatrix | ( | bool | central_projection, | |
int | left, | |||
int | right, | |||
int | bottom, | |||
int | top, | |||
int | nearZ = 0 , |
|||
int | farZ = 1 | |||
) | [private] |
internal: init or update the current matrix
Definition at line 390 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::oglAlloc | ( | MMSFBSurface * | surface, | |
bool | rbo_required = false | |||
) | [private] |
internal: allocate a new MMSFBSurface which uses OpenGL memory
Definition at line 417 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::oglBindSurface | ( | MMSFBSurface * | surface | ) | [private] |
internal: bind a MMSFBSurface and it's OpenGL handle(s) to the OpenGL context
Definition at line 494 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::oglBindSurface | ( | MMSFBSurface * | surface, | |
int | nearZ, | |||
int | farZ, | |||
bool | central_projection = false | |||
) | [private] |
internal: see oglBindSurface(MMSFBSurface *surface), additionally using nearer and farther depth in conjunction with central_projection flag
Definition at line 520 of file mmsfbbackendinterface.cpp.
bool MMSFBBackEndInterface::oglDrawBuffer | ( | MMSFBBuffer::BUFFER * | buffer, | |
MMSFBBuffer::INDEX_BUFFER * | index_buffer = NULL , |
|||
MMSFBBuffer::VERTEX_BUFFER * | vertex_buffer = NULL | |||
) | [private] |
internal: draw arrays of OpenGL primitives
Definition at line 560 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processData | ( | void * | in_data, | |
int | in_data_len, | |||
void ** | out_data, | |||
int * | out_data_len | |||
) | [private, virtual] |
Process a new event from the client.
Reimplemented from MMSThreadServer.
Definition at line 258 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processInit | ( | BEI_INIT * | req | ) | [private] |
Definition at line 366 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processSwap | ( | BEI_SWAP * | req | ) | [private] |
Definition at line 605 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processAlloc | ( | BEI_ALLOC * | req | ) | [private] |
Definition at line 620 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processFree | ( | BEI_FREE * | req | ) | [private] |
Definition at line 645 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processClear | ( | BEI_CLEAR * | req | ) | [private] |
Definition at line 662 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processFillRectangle | ( | BEI_FILLRECTANGLE * | req | ) | [private] |
Definition at line 690 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processFillTriangle | ( | BEI_FILLTRIANGLE * | req | ) | [private] |
Definition at line 717 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processDrawLine | ( | BEI_DRAWLINE * | req | ) | [private] |
Definition at line 778 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processDrawRectangle | ( | BEI_DRAWRECTANGLE * | req | ) | [private] |
Definition at line 828 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processDrawTriangle | ( | BEI_DRAWTRIANGLE * | req | ) | [private] |
Definition at line 862 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processBlit | ( | BEI_BLIT * | req | ) | [private] |
Definition at line 925 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processStretchBlit | ( | BEI_STRETCHBLIT * | req | ) | [private] |
Definition at line 1006 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processStretchBlitBuffer | ( | BEI_STRETCHBLITBUFFER * | req | ) | [private] |
Definition at line 1084 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processCreateAlphaTexture | ( | BEI_CREATEALPHATEXTURE * | req | ) | [private] |
Definition at line 1164 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processDeleteTexture | ( | BEI_DELETETEXTURE * | req | ) | [private] |
Definition at line 1184 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processDrawString | ( | BEI_DRAWSTRING * | req | ) | [private] |
Definition at line 1205 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processRenderScene | ( | BEI_RENDERSCENE * | req | ) | [private] |
Definition at line 1395 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processMerge | ( | BEI_MERGE * | req | ) | [private] |
Definition at line 1527 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processInitVertexBuffer | ( | BEI_INITVERTEXBUFFER * | req | ) | [private] |
Definition at line 1637 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processInitVertexSubBuffer | ( | BEI_INITVERTEXSUBBUFFER * | req | ) | [private] |
Definition at line 1673 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processInitIndexBuffer | ( | BEI_INITINDEXBUFFER * | req | ) | [private] |
Definition at line 1695 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processInitIndexSubBuffer | ( | BEI_INITINDEXSUBBUFFER * | req | ) | [private] |
Definition at line 1731 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::processDeleteBuffer | ( | BEI_DELETEBUFFER * | req | ) | [private] |
Definition at line 1751 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::init | ( | Display * | x_display, | |
int | x_screen, | |||
Window | x_window, | |||
MMSFBRectangle | x11_win_rect | |||
) |
Definition at line 340 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::init | ( | ) |
Definition at line 356 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::swap | ( | ) |
Definition at line 599 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::alloc | ( | MMSFBSurface * | surface | ) |
Definition at line 612 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::free | ( | MMSFBSurface * | surface | ) |
Definition at line 637 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::clear | ( | MMSFBSurface * | surface, | |
MMSFBColor & | color | |||
) |
Definition at line 653 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::fillRectangle | ( | MMSFBSurface * | surface, | |
MMSFBRectangle & | rect, | |||
MMSFBDrawingFlags | drawingflags | |||
) |
Definition at line 681 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::fillTriangle | ( | MMSFBSurface * | surface, | |
MMSFBTriangle & | triangle | |||
) |
Definition at line 709 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::drawLine | ( | MMSFBSurface * | surface, | |
int | x1, | |||
int | y1, | |||
int | x2, | |||
int | y2 | |||
) |
Definition at line 767 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::drawRectangle | ( | MMSFBSurface * | surface, | |
MMSFBRectangle & | rect | |||
) |
Definition at line 820 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::drawTriangle | ( | MMSFBSurface * | surface, | |
MMSFBTriangle & | triangle | |||
) |
Definition at line 854 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::blit | ( | MMSFBSurface * | surface, | |
MMSFBSurface * | source, | |||
MMSFBRectangle & | src_rect, | |||
int | x, | |||
int | y, | |||
MMSFBBlittingFlags | blittingflags | |||
) |
Definition at line 912 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::stretchBlit | ( | MMSFBSurface * | surface, | |
MMSFBSurface * | source, | |||
MMSFBRectangle & | src_rect, | |||
MMSFBRectangle & | dst_rect, | |||
MMSFBBlittingFlags | blittingflags | |||
) |
Definition at line 994 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::blitBuffer | ( | MMSFBSurface * | surface, | |
MMSFBSurfacePlanes * | src_planes, | |||
MMSFBSurfacePixelFormat | src_pixelformat, | |||
int | src_width, | |||
int | src_height, | |||
MMSFBRectangle & | src_rect, | |||
int | x, | |||
int | y, | |||
MMSFBBlittingFlags | blittingflags | |||
) |
Definition at line 1049 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::stretchBlitBuffer | ( | MMSFBSurface * | surface, | |
MMSFBSurfacePlanes * | src_planes, | |||
MMSFBSurfacePixelFormat | src_pixelformat, | |||
int | src_width, | |||
int | src_height, | |||
MMSFBRectangle & | src_rect, | |||
MMSFBRectangle & | dst_rect, | |||
MMSFBBlittingFlags | blittingflags | |||
) |
Definition at line 1068 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::createAlphaTexture | ( | unsigned int * | texture, | |
unsigned char * | buffer, | |||
int | width, | |||
int | height | |||
) |
Definition at line 1154 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::deleteTexture | ( | unsigned int | texture | ) |
Definition at line 1177 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::drawString | ( | MMSFBSurface * | surface, | |
string & | text, | |||
int | len, | |||
int | x, | |||
int | y | |||
) |
Definition at line 1194 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::renderScene | ( | MMSFBSurface * | surface, | |
MMS_VERTEX_ARRAY ** | varrays, | |||
MMS_INDEX_ARRAY ** | iarrays, | |||
MMS3D_MATERIAL * | materials, | |||
MMSFBSurface ** | texsurfaces, | |||
MMS3D_OBJECT ** | objects | |||
) |
Definition at line 1346 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::merge | ( | MMSFBSurface * | surface, | |
MMSFBSurface * | source1, | |||
MMSFBSurface * | source2, | |||
MMSFBMergingMode | mergingmode | |||
) |
Definition at line 1515 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::initVertexBuffer | ( | unsigned int * | buffer, | |
unsigned int | size, | |||
void * | data = NULL | |||
) |
Definition at line 1628 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::initVertexSubBuffer | ( | unsigned int | buffer, | |
unsigned int | offset, | |||
unsigned int | size, | |||
void * | data | |||
) |
Definition at line 1662 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::initIndexBuffer | ( | unsigned int * | buffer, | |
unsigned int | size, | |||
void * | data = NULL | |||
) |
Definition at line 1686 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::initIndexSubBuffer | ( | unsigned int | buffer, | |
unsigned int | offset, | |||
unsigned int | size, | |||
void * | data | |||
) |
Definition at line 1720 of file mmsfbbackendinterface.cpp.
void MMSFBBackEndInterface::deleteBuffer | ( | unsigned int | buffer | ) |
Definition at line 1744 of file mmsfbbackendinterface.cpp.
MMSFBGL MMSFBBackEndInterface::mmsfbgl [private] |
bool MMSFBBackEndInterface::reset_matrix [private] |
indicate that the matrix should be reset next time used
Definition at line 250 of file mmsfbbackendinterface.h.
bool MMSFBBackEndInterface::matrix_central_projection [private] |
if true the central projection will be used, else parallel projection is used
Definition at line 253 of file mmsfbbackendinterface.h.
int MMSFBBackEndInterface::matrix_left [private] |
specify the coordinate for the left vertical clipping plane
Definition at line 256 of file mmsfbbackendinterface.h.
int MMSFBBackEndInterface::matrix_right [private] |
specify the coordinate for the right vertical clipping plane
Definition at line 259 of file mmsfbbackendinterface.h.
int MMSFBBackEndInterface::matrix_bottom [private] |
specify the coordinate for the bottom horizontal clipping plane
Definition at line 262 of file mmsfbbackendinterface.h.
int MMSFBBackEndInterface::matrix_top [private] |
specify the coordinate for the top horizontal clipping plane
Definition at line 265 of file mmsfbbackendinterface.h.
int MMSFBBackEndInterface::matrix_nearZ [private] |
specify the distance to the nearer depth clipping plane
Definition at line 268 of file mmsfbbackendinterface.h.
int MMSFBBackEndInterface::matrix_farZ [private] |
specify the distance to the farther depth clipping plane
Definition at line 271 of file mmsfbbackendinterface.h.