overte/interface/src/renderer/GeometryCache.h
2013-08-06 18:09:51 -07:00

35 lines
815 B
C++

//
// GeometryCache.h
// interface
//
// Created by Andrzej Kapolka on 6/21/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
//
#ifndef __interface__GeometryCache__
#define __interface__GeometryCache__
#include <QHash>
#include "InterfaceConfig.h"
class GeometryCache {
public:
~GeometryCache();
void renderHemisphere(int slices, int stacks);
void renderSquare(int xDivisions, int yDivisions);
void renderHalfCylinder(int slices, int stacks);
private:
typedef QPair<int, int> IntPair;
typedef QPair<GLuint, GLuint> VerticesIndices;
QHash<IntPair, VerticesIndices> _hemisphereVBOs;
QHash<IntPair, VerticesIndices> _squareVBOs;
QHash<IntPair, VerticesIndices> _halfCylinderVBOs;
};
#endif /* defined(__interface__GeometryCache__) */