Multiple vertex color sets in OpenGL

I have a C++ Mesh class which looks like this:

//Vector3F is float[3] class Mesh{ Vector3F* positions; ... Vector3F* colors1; Vector3F* colors2; public: void draw(); }; void Mesh::draw() { ..... glVertexPointer(3, GL_FLOAT, 0, positions); if(colors1) glColorPointer(3, GL_FLOAT, 0, colors1); if(colors2) ? ... }<

Published by CelleSports

CelleSports is a Game development, News outlet, and Social Cell community. Build your cells or teams for any game and start communicating efficiently. Join us in building the number one eSport and gaming community in the World. Join Cell eSports

Leave a comment