22#ifndef WINTERMUTE_BASE_SURFACE_OPENGL3D_H
23#define WINTERMUTE_BASE_SURFACE_OPENGL3D_H
25#include "engines/wintermute/base/gfx/base_surface.h"
27#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
29#include "graphics/opengl/system_headers.h"
36class BaseSurfaceOpenGL3D :
public BaseSurface {
38 BaseSurfaceOpenGL3D(BaseGame *game, BaseRenderer3D *renderer);
39 ~BaseSurfaceOpenGL3D();
41 bool invalidate()
override;
42 bool prepareToDraw()
override;
44 bool displayTransRotate(
int x,
int y,
float rotate, int32 hotspotX, int32 hotspotY,
Common::Rect32 rect,
float zoomX,
float zoomY, uint32 alpha = 0xFFFFFFFF, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL,
bool mirrorX =
false,
bool mirrorY =
false)
override;
45 bool displayTransZoom(
int x,
int y,
Common::Rect32 rect,
float zoomX,
float zoomY, uint32 alpha = 0xFFFFFFFF, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL,
bool mirrorX =
false,
bool mirrorY =
false)
override;
46 bool displayTrans(
int x,
int y,
Common::Rect32 rect, uint32 alpha = 0xFFFFFFFF, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL,
bool mirrorX =
false,
bool mirrorY =
false,
int offsetX = 0,
int offsetY = 0)
override;
47 bool display(
int x,
int y,
Common::Rect32 rect, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL,
bool mirrorX =
false,
bool mirrorY =
false)
override;
48 bool displayTiled(
int x,
int y,
Common::Rect32 rect,
int numTimesX,
int numTimesY)
override;
49 bool create(
const char *filename,
bool texture2D,
bool defaultCK,
byte ckRed,
byte ckGreen,
byte ckBlue,
int lifeTime = -1,
bool keepLoaded =
false)
override;
50 bool create(
int width,
int height)
override;
51 bool setAlphaImage(
const char *filename)
override;
52 bool putSurface(
const Graphics::Surface &surface,
bool hasAlpha =
false)
override;
53 bool putPixel(
int x,
int y,
byte r,
byte g,
byte b,
byte a)
override;
54 bool getPixel(
int x,
int y,
byte *r,
byte *g,
byte *b,
byte *a =
nullptr)
const override;
55 bool startPixelOp()
override;
56 bool endPixelOp()
override;
57 bool isTransparentAtLite(
int x,
int y)
const override;
61 int getWidth()
override {
65 int getHeight()
override {
69 GLuint getTextureName() {
73 uint getGLTextureWidth()
const {
77 uint getGLTextureHeight()
const {
83 BaseRenderer3D *_renderer;