mmsfbbackendinterface.cpp File Reference

#include "mmsgui/fb/mmsfbbackendinterface.h"
#include "mmstools/tools.h"

Include dependency graph for mmsfbbackendinterface.cpp:

Go to the source code of this file.


Defines

#define BEI_SOURCE_WIDTH   ((!req->source->is_sub_surface)?req->source->config.w:req->source->root_parent->config.w)
#define BEI_SOURCE_HEIGHT   ((!req->source->is_sub_surface)?req->source->config.h:req->source->root_parent->config.h)
#define BEI_SURFACE_WIDTH   ((!req->surface->is_sub_surface)?req->surface->config.w:req->surface->root_parent->config.w)
#define BEI_SURFACE_HEIGHT   ((!req->surface->is_sub_surface)?req->surface->config.h:req->surface->root_parent->config.h)
#define BEI_SURFACE_BOTTOM   (BEI_SURFACE_HEIGHT - 1)
#define BEI_SURFACE_BOTTOM_F   (float)BEI_SURFACE_BOTTOM
#define GET_OFFS(surface)
#define GET_OFFS_SRC(surface)
#define OGL_SCISSOR(surface, X, Y, W, H)
#define INIT_OGL_DRAWING(surface, drawingflags)
#define INIT_OGL_BLITTING(surface, blittingflags)
#define ENABLE_OGL_DEPTHTEST(surface, readonly)
#define DISABLE_OGL_DEPTHTEST(surface, mark_as_unchanged)
#define IS_OGL_DEPTH_BUFFER_UNCHANGED(surface)
#define OGL_DRAW_POINT(x, y)   {}
#define OGL_SINGLE_POINT_FALLBACK(x1, y1, x2, y2)   if (x1 == x2 && y1 == y2) OGL_DRAW_POINT(x1, y1) else
#define OGL_SINGLE_POINT_FALLBACK2(x1, y1, x2, y2, x3, y3)   if (x1 == x2 && x1 == x3 && y1 == y2 && y1 == y3) OGL_DRAW_POINT(x1, y1) else
#define OGL_CALC_COORD(v1, v2)   (((v1)<(v2)) ? (float)(v1) : (float)(v1) + 0.99)
#define OGL_CALC_2X_N(v1, v2, width)   (OGL_CALC_COORD(v1, v2) / (width))
#define OGL_CALC_2Y_N(v1, v2, height)   (OGL_CALC_COORD(v1, v2) / (height))
#define OGL_CALC_3X(v1, v2, v3)   (((v1)<=(v2) && (v1)<=(v3)) ? (float)(v1) : ((v1)>(v2) && (v1)>(v3)) ? (float)(v1) + 0.99 : (float)(v1) + 0.5)
#define OGL_CALC_3Y(v1, v2, v3)   (((v1)<=(v2) && (v1)<=(v3)) ? BEI_SURFACE_BOTTOM_F - (float)(v1) + 0.99 : ((v1)>(v2) && (v1)>(v3)) ? BEI_SURFACE_BOTTOM_F - (float)(v1) : BEI_SURFACE_BOTTOM_F - (float)(v1) + 0.5)
#define OGL_FILL_RECTANGLE(x1, y1, x2, y2)
#define OGL_DRAW_RECTANGLE(x1, y1, x2, y2)

Functions

void setLight ()

Define Documentation

#define BEI_SOURCE_HEIGHT   ((!req->source->is_sub_surface)?req->source->config.h:req->source->root_parent->config.h)

Definition at line 38 of file mmsfbbackendinterface.cpp.

#define BEI_SOURCE_WIDTH   ((!req->source->is_sub_surface)?req->source->config.w:req->source->root_parent->config.w)

Definition at line 37 of file mmsfbbackendinterface.cpp.

#define BEI_SURFACE_BOTTOM   (BEI_SURFACE_HEIGHT - 1)

Definition at line 42 of file mmsfbbackendinterface.cpp.

#define BEI_SURFACE_BOTTOM_F   (float)BEI_SURFACE_BOTTOM

Definition at line 43 of file mmsfbbackendinterface.cpp.

#define BEI_SURFACE_HEIGHT   ((!req->surface->is_sub_surface)?req->surface->config.h:req->surface->root_parent->config.h)

Definition at line 41 of file mmsfbbackendinterface.cpp.

#define BEI_SURFACE_WIDTH   ((!req->surface->is_sub_surface)?req->surface->config.w:req->surface->root_parent->config.w)

Definition at line 40 of file mmsfbbackendinterface.cpp.

#define DISABLE_OGL_DEPTHTEST ( surface,
mark_as_unchanged   ) 

Value:

if (mark_as_unchanged && surface->config.surface_buffer) { \
            if (!surface->is_sub_surface) { \
                surface->config.surface_buffer->ogl_unchanged_depth_buffer = true; \
            } else { \
                surface->root_parent->config.surface_buffer->ogl_unchanged_depth_buffer = surface->config.surface_buffer->ogl_unchanged_depth_buffer = true; \
            } \
        } \
        mmsfbgl.disableDepthTest();

Definition at line 140 of file mmsfbbackendinterface.cpp.

#define ENABLE_OGL_DEPTHTEST ( surface,
readonly   ) 

Value:

if (!readonly && surface->config.surface_buffer) { \
            if (!surface->is_sub_surface) { \
                surface->config.surface_buffer->ogl_unchanged_depth_buffer = false; \
            } else { \
                surface->root_parent->config.surface_buffer->ogl_unchanged_depth_buffer = surface->config.surface_buffer->ogl_unchanged_depth_buffer = false; \
            } \
        } \
        mmsfbgl.enableDepthTest(readonly);

Definition at line 129 of file mmsfbbackendinterface.cpp.

#define GET_OFFS ( surface   ) 

Value:

int xoff = 0; int yoff = 0; \
        if (surface->is_sub_surface) { \
            xoff = surface->sub_surface_xoff; \
            yoff = surface->sub_surface_yoff; }

Definition at line 46 of file mmsfbbackendinterface.cpp.

#define GET_OFFS_SRC ( surface   ) 

Value:

int src_xoff = 0; \
        int src_yoff = 0; \
        int src_rootw = surface->config.w; \
        int src_rooth = surface->config.h; \
        if (surface->is_sub_surface) { \
            src_xoff = surface->sub_surface_xoff; \
            src_yoff = surface->sub_surface_yoff; \
            src_rootw = surface->root_parent->config.w; \
            src_rooth = surface->root_parent->config.h; }

Definition at line 52 of file mmsfbbackendinterface.cpp.

#define INIT_OGL_BLITTING ( surface,
blittingflags   ) 

Definition at line 87 of file mmsfbbackendinterface.cpp.

#define INIT_OGL_DRAWING ( surface,
drawingflags   ) 

Value:

{ \
        switch (drawingflags) { \
        case MMSFB_DRAW_BLEND: \
            mmsfbgl.enableBlend(); \
            mmsfbgl.setDrawingMode(); \
            break; \
        default: \
            mmsfbgl.disableBlend(); \
            mmsfbgl.setDrawingMode(); \
            break; } \
        mmsfbgl.setColor(surface->config.color.r, surface->config.color.g, surface->config.color.b, surface->config.color.a); }

Definition at line 73 of file mmsfbbackendinterface.cpp.

#define IS_OGL_DEPTH_BUFFER_UNCHANGED ( surface   ) 

Value:

((!surface->is_sub_surface && surface->config.surface_buffer && surface->config.surface_buffer->ogl_unchanged_depth_buffer) \
        ||(surface->is_sub_surface && surface->root_parent->config.surface_buffer && surface->root_parent->config.surface_buffer->ogl_unchanged_depth_buffer))

Definition at line 151 of file mmsfbbackendinterface.cpp.

#define OGL_CALC_2X_N ( v1,
v2,
width   )     (OGL_CALC_COORD(v1, v2) / (width))

Definition at line 174 of file mmsfbbackendinterface.cpp.

#define OGL_CALC_2Y_N ( v1,
v2,
height   )     (OGL_CALC_COORD(v1, v2) / (height))

Definition at line 175 of file mmsfbbackendinterface.cpp.

#define OGL_CALC_3X ( v1,
v2,
v3   )     (((v1)<=(v2) && (v1)<=(v3)) ? (float)(v1) : ((v1)>(v2) && (v1)>(v3)) ? (float)(v1) + 0.99 : (float)(v1) + 0.5)

Definition at line 178 of file mmsfbbackendinterface.cpp.

#define OGL_CALC_3Y ( v1,
v2,
v3   )     (((v1)<=(v2) && (v1)<=(v3)) ? BEI_SURFACE_BOTTOM_F - (float)(v1) + 0.99 : ((v1)>(v2) && (v1)>(v3)) ? BEI_SURFACE_BOTTOM_F - (float)(v1) : BEI_SURFACE_BOTTOM_F - (float)(v1) + 0.5)

Definition at line 179 of file mmsfbbackendinterface.cpp.

#define OGL_CALC_COORD ( v1,
v2   )     (((v1)<(v2)) ? (float)(v1) : (float)(v1) + 0.99)

Definition at line 172 of file mmsfbbackendinterface.cpp.

#define OGL_DRAW_POINT ( x,
 )     {}

Definition at line 161 of file mmsfbbackendinterface.cpp.

#define OGL_DRAW_RECTANGLE ( x1,
y1,
x2,
y2   ) 

Value:

OGL_SINGLE_POINT_FALLBACK(x1, y1, x2, y2) \
        mmsfbgl.drawRectangle2Di(x1, y1, x2, y2);

Definition at line 188 of file mmsfbbackendinterface.cpp.

#define OGL_FILL_RECTANGLE ( x1,
y1,
x2,
y2   ) 

Value:

OGL_SINGLE_POINT_FALLBACK(x1, y1, x2, y2) \
        mmsfbgl.fillRectangle2Di(x1, y1, x2, y2);

Definition at line 183 of file mmsfbbackendinterface.cpp.

#define OGL_SCISSOR ( surface,
X,
Y,
W,
 ) 

Value:

if (surface->config.surface_buffer->ogl_fbo) mmsfbgl.setScissor(X, Y, W, H); \
    else mmsfbgl.setScissor(X, BEI_SURFACE_HEIGHT - (H) - (Y), W, H);

Definition at line 68 of file mmsfbbackendinterface.cpp.

#define OGL_SINGLE_POINT_FALLBACK ( x1,
y1,
x2,
y2   )     if (x1 == x2 && y1 == y2) OGL_DRAW_POINT(x1, y1) else

Definition at line 164 of file mmsfbbackendinterface.cpp.

#define OGL_SINGLE_POINT_FALLBACK2 ( x1,
y1,
x2,
y2,
x3,
y3   )     if (x1 == x2 && x1 == x3 && y1 == y2 && y1 == y3) OGL_DRAW_POINT(x1, y1) else

Definition at line 168 of file mmsfbbackendinterface.cpp.


Function Documentation

void setLight (  ) 

Definition at line 1366 of file mmsfbbackendinterface.cpp.