triangle.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "tango-gl/triangle.h"
18 
19 namespace tango_gl {
20 
21 static const GLfloat const_vertices[]
22  = {-0.15f, 0.0f, 0.0f, 0.15f, 0.0f, 0.0f, 0.0f, 0.0f, -0.2f};
23 
24 static const GLushort const_indices[] = {0, 1, 2};
25 
27  SetShader();
28  std::vector<GLfloat> vertices(
30  const_vertices + sizeof(const_vertices) / sizeof(GLfloat));
31  std::vector<GLushort> indices(
32  const_indices, const_indices + sizeof(const_indices) / sizeof(GLushort));
33  SetVertices(vertices, indices);
34 }
35 } // namespace tango_gl
static const GLushort const_indices[]
Definition: goal_marker.cpp:36
static const float vertices[]
Definition: quad.cpp:39
static const GLfloat const_vertices[]
Definition: cube.cpp:21
void SetShader()
Definition: mesh.cpp:28
void SetVertices(const std::vector< GLfloat > &vertices)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:06