Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GL::VertexElement positionElem(GL::Semantic::Position, 3), colorElem(GL::Semantic::Color, 1);
- float positionData[] = {
- 200, 30, 0,
- 500, 30, 0,
- 350, 100, 0
- };
- uint32 colorData[] = {
- 0xFFFF0000,
- 0xFF00FF00,
- 0xFF0000FF
- };
- colorElem.getStream().write(colorData);
- positionElem.getStream().write(positionData);
- buffer.addElement(positionElem);
- buffer.addElement(colorElem);
- buffer.reloadBuffer();
- dev.OnFrame += [&dev, &buffer, &ibuffer]() {
- dev.drawGeometry(buffer, ibuffer);
- };
Advertisement
Add Comment
Please, Sign In to add comment