glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(Vertex) * mVertsPerSection, NULL, GL_DYNAMIC_DRAW); // allocate memory on gfx card
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(Vertex) * mVertsPerSection, &s.Vertices.location); // Actually upload the data
After I recreate window this doesn't work...
If I don't recreate window then it's rendered correctly...
Everything else except the genbuffered tilemap is rendered okay.
So glDrawArrays(GL_QUADS, iIndex*4, 4); works well
// Resetup our pointers. This doesn't reinitialize any data, only how we walk through it
glVertexPointer(3, GL_FLOAT, sizeof(Vertex), 0);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), BUFFER_OFFSET(12));
glColorPointer(4, GL_FLOAT, sizeof(Vertex), BUFFER_OFFSET(32));
glNormalPointer(GL_FLOAT, sizeof(Vertex), BUFFER_OFFSET(20));
// Draw everything! GJ!
glDrawArrays(GL_QUADS, 0, mVertsPerSection); // CountPrevIndices(iZ), _depthIndices[iZ]*4);/
is not rendered after recreated window.
Or atleast nothing is rendered o_O
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.