13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#ifndef _RRPRIMITIVETYPES_HPP
23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#define _RRPRIMITIVETYPES_HPP
33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*-------------------------------------------------------------------------
43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program Reference Renderer
53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * -----------------------------------------------
63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project
83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License");
103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License.
113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at
123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *      http://www.apache.org/licenses/LICENSE-2.0
143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software
163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS,
173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and
193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License.
203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*!
223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file
233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Primitive types
243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/
253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "rrDefs.hpp"
273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "rrPrimitiveAssembler.hpp"
283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
293c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace rr
303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
323c827367444ee418f129b2c238299f49d3264554Jarkko Poyryenum PrimitiveType
333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_TRIANGLES = 0,			//!< Separate triangles
353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_TRIANGLE_STRIP,			//!< Triangle strip
363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_TRIANGLE_FAN,				//!< Triangle fan
373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_LINES,					//!< Separate lines
393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_LINE_STRIP,				//!< Line strip
403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_LINE_LOOP,				//!< Line loop
413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_POINTS,					//!< Points
433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_LINES_ADJACENCY,			//!< Separate lines (adjacency)
453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_LINE_STRIP_ADJACENCY,		//!< Line strip (adjacency)
463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_TRIANGLES_ADJACENCY,		//!< Separate triangles (adjacency)
473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_TRIANGLE_STRIP_ADJACENCY,	//!< Triangle strip (adjacency)
483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	PRIMITIVETYPE_LAST
503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
523c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <PrimitiveType DrawPrimitiveType>	struct PrimitiveTypeTraits											{};
533c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_TRIANGLES>					{ typedef pa::Triangle			Type;	typedef pa::Triangle	BaseType;	typedef pa::Triangles				Assembler; };
543c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_TRIANGLE_STRIP>			{ typedef pa::Triangle			Type;	typedef pa::Triangle	BaseType;	typedef pa::TriangleStrip			Assembler; };
553c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_TRIANGLE_FAN>				{ typedef pa::Triangle			Type;	typedef pa::Triangle	BaseType;	typedef pa::TriangleFan				Assembler; };
563c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_LINES>						{ typedef pa::Line				Type;	typedef pa::Line		BaseType;	typedef pa::Lines					Assembler; };
573c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_LINE_STRIP>				{ typedef pa::Line				Type;	typedef pa::Line		BaseType;	typedef pa::LineStrip				Assembler; };
583c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_LINE_LOOP>					{ typedef pa::Line				Type;	typedef pa::Line		BaseType;	typedef pa::LineLoop				Assembler; };
593c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_POINTS>					{ typedef pa::Point				Type;	typedef pa::Point		BaseType;	typedef pa::Points					Assembler; };
603c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_LINES_ADJACENCY>			{ typedef pa::LineAdjacency		Type;	typedef pa::Line		BaseType;	typedef pa::LinesAdjacency			Assembler; };
613c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_LINE_STRIP_ADJACENCY>		{ typedef pa::LineAdjacency		Type;	typedef pa::Line		BaseType;	typedef pa::LineStripAdjacency		Assembler; };
623c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_TRIANGLES_ADJACENCY>		{ typedef pa::TriangleAdjacency	Type;	typedef pa::Triangle	BaseType;	typedef pa::TrianglesAdjacency		Assembler; };
633c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate <>									struct PrimitiveTypeTraits<PRIMITIVETYPE_TRIANGLE_STRIP_ADJACENCY>	{ typedef pa::TriangleAdjacency	Type;	typedef pa::Triangle	BaseType;	typedef pa::TriangleStripAdjacency	Assembler; };
643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // rr
663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#endif // _RRPRIMITIVETYPES_HPP
68