2 #include "oxygine-include.h" 3 #include "core/Renderer.h" 27 static spNativeTexture invisible;
30 static std::vector<unsigned char> uberShaderBody;
31 static std::vector<unsigned short> indices16;
32 static size_t maxVertices;
39 const Matrix& getViewProjection()
const {
return _vp; }
41 unsigned int getShaderFlags()
const {
return _shaderFlags; }
44 void setDriver(IVideoDriver*);
46 void setViewProjTransform(
const Matrix& viewProj);
47 void setVertexDeclaration(
const VertexDeclaration* decl);
48 void setUberShaderProgram(UberShaderProgram* pr);
52 void setTexture(
const spNativeTexture& base,
const spNativeTexture& alpha,
bool basePremultiplied =
true);
53 void setTexture(
const spNativeTexture& base,
bool basePremultiplied =
true);
57 void beginElementRendering(
bool basePremultiplied);
58 void beginSDFont(
float contrast,
float offset,
const Color& outlineColor,
float outlineOffset);
60 void drawElement(
const spNativeTexture& texture,
unsigned int color,
const RectF& src,
const RectF& dest)
override;
67 void begin(spNativeTexture nt,
const Rect* viewport = 0);
76 virtual void addVertices(
const void* data,
unsigned int size);
80 #ifdef OXYGINE_DEBUG_T2P 81 static void showTexel2PixelErrors(
bool show);
93 void _addVertices(
const void* data,
unsigned int size);
94 void _checkDrawBatch();
96 std::vector<unsigned char> _vertices;
104 virtual void preDrawBatch();
105 virtual void _cleanup();
106 virtual void _begin();
107 virtual void _resetSettings();
109 spNativeTexture _base;
110 spNativeTexture _alpha;
115 unsigned int _shaderFlags;
119 spNativeTexture _prevRT;
123 typedef void(*render_texture_hook)(
const spNativeTexture& nt);
124 void set_render_texture_hook(render_texture_hook);
125 render_texture_hook get_render_texture_hook();
void setTransform(const Transform &tr)
Definition: STDRenderer.h:55
Definition: VertexDeclaration.h:6
Definition: ShaderProgram.h:7
void begin(STDRenderer *prev=0)
Definition: STDRenderer.h:7
static void setDefaultSettings()
void setBlendMode(blend_mode blend)
Definition: UberShaderProgram.h:44
–oxgl-end–!
Definition: Actor.h:14
void initCoordinateSystem(int width, int height, bool flipU=false)
static spNativeTexture white
Definition: STDRenderer.h:26
Definition: Renderer.h:217
Definition: VideoDriver.h:12
void setTexture(const spNativeTexture &base, const spNativeTexture &alpha, bool basePremultiplied=true)