Edit

kc3-lang/angle/samples/sample_util/geometry_utils.h

Branch :

  • Show log

    Commit

  • Author : Corentin Wallez
    Date : 2015-05-04 13:55:41
    Hash : cf9dfa49
    Message : Add missing includes in samples/sample_util/ BUG=angleproject:892 Change-Id: Ia718306226ce6cfcf91f74947a7775b1439e4fab Reviewed-on: https://chromium-review.googlesource.com/268995 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>

  • samples/sample_util/geometry_utils.h
  • //
    // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    #ifndef SAMPLE_UTIL_GEOMETRY_UTILS_H
    #define SAMPLE_UTIL_GEOMETRY_UTILS_H
    
    #include <cstddef>
    #include <vector>
    #include <GLES2/gl2.h>
    
    #include "Vector.h"
    
    struct SphereGeometry
    {
        std::vector<Vector3> positions;
        std::vector<Vector3> normals;
        std::vector<GLushort> indices;
    };
    
    void CreateSphereGeometry(size_t sliceCount, float radius, SphereGeometry *result);
    
    struct CubeGeometry
    {
        std::vector<Vector3> positions;
        std::vector<Vector3> normals;
        std::vector<Vector2> texcoords;
        std::vector<GLushort> indices;
    };
    
    void GenerateCubeGeometry(float radius, CubeGeometry *result);
    
    #endif // SAMPLE_UTIL_GEOMETRY_UTILS_H