MCPcopy Create free account
hub / github.com/cinder/Cinder / createGrid

Method createGrid

samples/Geometry/src/GeometryApp.cpp:426–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426void GeometryApp::createGrid()
427{
428 mGrid = gl::VertBatch::create( GL_LINES );
429 mGrid->begin( GL_LINES );
430 for( int i = -10; i <= 10; ++i ) {
431 mGrid->color( Color( 0.25f, 0.25f, 0.25f ) );
432 mGrid->color( Color( 0.25f, 0.25f, 0.25f ) );
433 mGrid->color( Color( 0.25f, 0.25f, 0.25f ) );
434 mGrid->color( Color( 0.25f, 0.25f, 0.25f ) );
435
436 mGrid->vertex( float( i ), 0.0f, -10.0f );
437 mGrid->vertex( float( i ), 0.0f, +10.0f );
438 mGrid->vertex( -10.0f, 0.0f, float( i ) );
439 mGrid->vertex( +10.0f, 0.0f, float( i ) );
440 }
441 mGrid->end();
442}
443
444void GeometryApp::createGeometry()
445{

Callers

nothing calls this directly

Calls 6

colorMethod · 0.80
vertexMethod · 0.80
createFunction · 0.50
ColorFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected