Cromon

Main.cpp

Oct 21st, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1.     GL::VertexElement positionElem(GL::Semantic::Position, 3), colorElem(GL::Semantic::Color, 1);
  2.  
  3.     float positionData[] = {
  4.         200, 30, 0,
  5.         500, 30, 0,
  6.         350, 100, 0
  7.     };
  8.  
  9.     uint32 colorData[] = {
  10.         0xFFFF0000,
  11.         0xFF00FF00,
  12.         0xFF0000FF
  13.     };
  14.  
  15.     colorElem.getStream().write(colorData);
  16.  
  17.     positionElem.getStream().write(positionData);
  18.     buffer.addElement(positionElem);
  19.     buffer.addElement(colorElem);
  20.     buffer.reloadBuffer();
  21.  
  22.     dev.OnFrame += [&dev, &buffer, &ibuffer]() {
  23.         dev.drawGeometry(buffer, ibuffer);
  24.     };
Advertisement
Add Comment
Please, Sign In to add comment