Oxygine  1
2g game engine
VideoDriverGLES20.h
1 #pragma once
2 #include "oxygine-include.h"
3 #include "VideoDriverGL.h"
4 #include "core/Restorable.h"
5 #include "../ShaderProgram.h"
6 #include "../file.h"
7 
8 namespace oxygine
9 {
11  {
12  public:
15 
16  void reset() override;
17  void restore() override;
18 
19  spNativeTexture createTexture() override;
20 
21  bool isReady() const override;
22 
23  void begin(const Rect& viewport, const Color* clearColor) override;
24  void clear(const Color& color) override;
25 
26  ShaderProgram* getShaderProgram() const override { return _p; }
27 
28  void draw(PRIMITIVE_TYPE pt, const VertexDeclaration* decl, const void* verticesData, unsigned int verticesDataSize) override;
29  void draw(PRIMITIVE_TYPE pt, const VertexDeclaration* decl, const void* verticesData, unsigned int verticesDataSize, const unsigned short* indicesData, unsigned int numIndices) override;
30  void setDefaultSettings() override;
31 
32  void setViewport(const Rect& viewport) override;
33  void setShaderProgram(ShaderProgram*) override;
34  void setTexture(int sampler, spNativeTexture) override;
35  void setUniformInt(const char* id, int v) override;
36  void setUniform(const char* id, const Vector4* v, int num) override;
37  void setUniform(const char* id, const Vector3* v, int num) override;
38  void setUniform(const char* id, const Vector2* v, int num) override;
39  void setUniform(const char* id, const Matrix* mat) override;
40  void setUniform(const char* id, float val) override;
41 
42  protected:
43  GLuint _vbo;
44  GLuint _ibo;
45 
46  int _programID;
47  ShaderProgram* _p;
48  };
49 }
Definition: VertexDeclaration.h:6
Definition: ShaderProgram.h:7
Definition: VideoDriverGLES20.h:10
–oxgl-end–!
Definition: Actor.h:14
Definition: Vector4.h:7
Definition: Color.h:8
Definition: VideoDriverGL.h:13
Definition: Vector3.h:7