22 #ifndef FIFE_VIDEO_RENDERBACKENSD_OPENGL_RENDERBACKENDOPENGLE_H
23 #define FIFE_VIDEO_RENDERBACKENSD_OPENGL_RENDERBACKENDOPENGLE_H
46 virtual const std::string&
getName()
const;
49 virtual void init(
const std::string& driver);
53 virtual void setLighting(
float red,
float green,
float blue);
void disableScissorTest()
std::vector< RenderZData2T > m_render_trans_datas
Abstract interface for all the renderbackends.
virtual void detachRenderTarget()
Detaches current render surface.
void setAlphaTest(float ref_alpha)
virtual void drawRectangle(const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Draws an axis parallel rectangle.
virtual void addImageToArray(uint32_t id, const Rect &rec, float const *st, uint8_t alpha, uint8_t const *rgba)
Add the Image data to the array.
virtual void attachRenderTarget(ImagePtr &img, bool discard)
Attaches given image as a new render surface.
virtual void init(const std::string &driver)
Initializes the backend.
virtual void drawQuad(const Point &p1, const Point &p2, const Point &p3, const Point &p4, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Draws quad between given points with given RGBA.
virtual void changeBlending(int32_t scr, int32_t dst)
Change the Blendingmodel.
virtual void createMainScreen(const ScreenMode &mode, const std::string &title, const std::string &icon)
Creates the mainscreen (the display window).
RenderBackendOpenGLe(const SDL_Color &colorkey)
std::vector< RenderObject > m_render_objects
std::vector< RenderZObject > m_renderZ_objects_forced
virtual Image * createImage(IResourceLoader *loader=0)
void enableTextures(uint32_t texUnit)
virtual void drawLine(const Point &p1, const Point &p2, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Draws line between given points with given RGBA.
virtual void renderVertexArrays()
Render the Vertex Arrays, only for primitives (points, lines,...)
struct FIFE::RenderBackendOpenGLe::currentState m_state
void setEnvironmentalColor(const uint8_t *rgba)
void setStencilTest(uint8_t stencil_ref, GLenum stencil_op, GLenum stencil_func)
virtual void endFrame()
Called when a frame is finished and ready to be displayed.
virtual void fillRectangle(const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Draws a filled axis parallel rectangle.
std::vector< RenderZObject > m_renderZ_objects
virtual void setLighting(float red, float green, float blue)
Set colors for lighting.
virtual const std::string & getName() const
The name of the renderbackend.
std::vector< RenderObject > m_render_objects2T
std::vector< RenderZData2T > m_render_datas2T
virtual void resetLighting()
Reset lighting with default values.
virtual void startFrame()
Called when a new frame starts.
void setVertexPointer(GLsizei stride, const GLvoid *ptr)
virtual void changeRenderInfos(uint16_t elements, int32_t src, int32_t dst, bool light, bool stentest, uint8_t stenref, GLConstants stenop, GLConstants stenfunc)
Dirty helper function to change the render infos.
void prepareForOverlays()
virtual void setScreenMode(const ScreenMode &mode)
Sets the mainscreen display mode.
virtual bool putPixel(int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Writes pixel to given position.
virtual void drawTriangle(const Point &p1, const Point &p2, const Point &p3, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Draws triangle between given points with given RGBA.
std::vector< RenderZData > m_renderZ_datas
virtual void setLightingModel(uint32_t lighting)
Initializes the light.
virtual void addImageToArrayZ(uint32_t id, const Rect &rec, float vertexZ, float const *st, uint8_t alpha, bool forceNewBatch, uint8_t const *rgba)
virtual void drawLightPrimitive(const Point &p, uint8_t intensity, float radius, int32_t subdivisions, float xstretch, float ystretch, uint8_t red, uint8_t green, uint8_t blue)
Draws a light primitive that based on a triangle fan.
void setColorPointer(GLsizei stride, const GLvoid *ptr)
virtual void captureScreen(const std::string &filename)
Creates a Screenshot and saves it to a file.
virtual void drawVertex(const Point &p, const uint8_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Draws a quad that represents a vertex with given RGBA.
virtual void clearBackBuffer()
Forces a clear of the backbuffer.
uint32_t active_client_tex
virtual ~RenderBackendOpenGLe()
The main class of the OpenGL-based experimental renderer.
std::vector< RenderData > m_render_datas
void setTexCoordPointer(uint32_t texUnit, GLsizei stride, const GLvoid *ptr)
virtual uint32_t getLightingModel() const
Gets the current light model.
void bindTexture(uint32_t texUnit, GLuint texId)
virtual void resetStencilBuffer(uint8_t buffer)
Reset stencil buffer with given value.
void disableTextures(uint32_t texUnit)
virtual void setClipArea(const Rect &cliparea, bool clear)
Sets given clip area into image.
RenderZObject * getRenderBufferObject(GLuint texture_id, bool unlit=false)
std::vector< RenderObject > m_render_trans_objects
void disableStencilTest()