Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
libRocketKGERenderer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Rocket/Core/RenderInterface.h>
4 #include "../kgedef.h"
5 #include "../gfx/Shader.h"
6 
7 namespace kge
8 {
9  namespace gfx
10  {
11  class Material;
12  class VertexDec;
13  class Texture;
14  }
15  class KGELIB_API libRocketKGERenderer: public Rocket::Core::RenderInterface
16  {
17  public:
18 
21 
24 
26  virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f& translation);
27 
29  virtual Rocket::Core::CompiledGeometryHandle CompileGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture);
30 
32  virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Rocket::Core::Vector2f& translation);
33 
35  virtual void ReleaseCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry);
36 
38  virtual void EnableScissorRegion(bool enable);
39 
41  virtual void SetScissorRegion(int x, int y, int width, int height);
42 
44  virtual bool LoadTexture(Rocket::Core::TextureHandle& texture_handle, Rocket::Core::Vector2i& texture_dimensions, const Rocket::Core::String& source);
45 
47  virtual bool GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const u8* source, const Rocket::Core::Vector2i& source_dimensions);
48 
50  virtual void ReleaseTexture(Rocket::Core::TextureHandle texture_handle);
51 
53  float GetHorizontalTexelOffset();
54 
56  float GetVerticalTexelOffset();
57 
58  protected:
59 
64 
65  }; // libRocketKGERenderer
66 
67 } // kge