22 #ifndef FIFE_VIDEO_RENDERBACKENSD_OPENGL_RENDERBACKENDOPENGL_H
23 #define FIFE_VIDEO_RENDERBACKENSD_OPENGL_RENDERBACKENDOPENGL_H
33 #include "video/renderbackend.h"
46 const std::string&
getName()
const;
49 void init(
const std::string& driver);
55 void setLighting(
float red,
float green,
float blue,
float alpha);
59 void setStencilTest(uint8_t stencil_ref,
unsigned int stencil_op,
unsigned int stencil_func);
60 void resetStencilBuffer(uint8_t buffer);
69 Image*
createImage(
const uint8_t* data,
unsigned int width,
unsigned int height);
71 bool putPixel(
int x,
int y,
int r,
int g,
int b,
int a = 255);
72 void drawLine(
const Point& p1,
const Point& p2,
int r,
int g,
int b,
int a = 255);
73 void drawTriangle(
const Point& p1,
const Point& p2,
const Point& p3,
int r,
int g,
int b,
int a = 255);
74 void drawRectangle(
const Point& p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255);
75 void fillRectangle(
const Point& p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255);
76 void drawQuad(
const Point& p1,
const Point& p2,
const Point& p3,
const Point& p4,
int r,
int g,
int b,
int a = 255);
77 void drawVertex(
const Point& p,
const uint8_t size,
int r,
int g,
int b,
int a = 255);
78 void drawLightPrimitive(
const Point& p, uint8_t intensity,
float radius,
int subdivisions,
float xstretch,
float ystretch, uint8_t red, uint8_t green, uint8_t blue);
81 SDL_PixelFormat m_rgba_format;
83 unsigned int m_lightmodel;
89 bool m_stencil_enabled;
93 unsigned int m_sten_op;
94 unsigned int m_sten_func;