2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // Helper library for generating certain sets of geometry.
10 #ifndef UTIL_GEOMETRY_UTILS_H
11 #define UTIL_GEOMETRY_UTILS_H
17 #include <GLES2/gl2.h>
19 #include "common/vector_utils.h"
21 struct ANGLE_EXPORT SphereGeometry
26 std::vector<angle::Vector3> positions;
27 std::vector<angle::Vector3> normals;
28 std::vector<GLushort> indices;
31 ANGLE_EXPORT void CreateSphereGeometry(size_t sliceCount, float radius, SphereGeometry *result);
33 struct ANGLE_EXPORT CubeGeometry
38 std::vector<angle::Vector3> positions;
39 std::vector<angle::Vector3> normals;
40 std::vector<angle::Vector2> texcoords;
41 std::vector<GLushort> indices;
44 ANGLE_EXPORT void GenerateCubeGeometry(float radius, CubeGeometry *result);
46 #endif // UTIL_GEOMETRY_UTILS_H