add function to CommonRenderInterface to update/activate a texture

add example how to render a texture 2d quad in SimpleOpenGL3
This commit is contained in:
Erwin Coumans
2016-04-20 12:55:21 -07:00
parent da948a0729
commit 4e61f0cab9
5 changed files with 93 additions and 26 deletions

View File

@@ -63,6 +63,9 @@ public:
virtual int registerShape(const float* vertices, int numvertices, const int* indices, int numIndices, int primitiveType=B3_GL_TRIANGLES, int textureIndex=-1);
virtual int registerTexture(const unsigned char* texels, int width, int height);
virtual void updateTexture(int textureIndex, const unsigned char* texels);
virtual void activateTexture(int textureIndex);
///position x,y,z, quaternion x,y,z,w, color r,g,b,a, scaling x,y,z
virtual int registerGraphicsInstance(int shapeIndex, const float* position, const float* quaternion, const float* color, const float* scaling);