18 #ifndef ZENI_TRIANGLE_HXX
19 #define ZENI_TRIANGLE_HXX
30 #if defined(REQUIRE_GL_ES)
42 template <
typename VERTEX>
50 template <
typename VERTEX>
58 template <
typename VERTEX>
67 template <
typename VERTEX>
78 template <
typename VERTEX>
83 #if !defined(DISABLE_GL) && !defined(REQUIRE_GL_ES)
84 template <
typename VERTEX>
87 a.subrender_to(screen);
88 b.subrender_to(screen);
89 c.subrender_to(screen);
95 template <
typename VERTEX>
101 template <
typename VERTEX>
106 template <
typename VERTEX>
108 std::auto_ptr<VERTEX> b2(
b.interpolate_to(0.5f,
a));
109 std::auto_ptr<VERTEX> c2(
c.interpolate_to(0.5f,
a));
111 triangle->fax_Material(get_Material());
115 template <
typename VERTEX>
117 std::auto_ptr<VERTEX> a2(
a.interpolate_to(0.5f,
b));
118 std::auto_ptr<VERTEX> c2(
c.interpolate_to(0.5f,
b));
120 triangle->fax_Material(get_Material());
124 template <
typename VERTEX>
126 std::auto_ptr<VERTEX> a2(
a.interpolate_to(0.5f,
c));
127 std::auto_ptr<VERTEX> b2(
b.interpolate_to(0.5f,
c));
129 triangle->fax_Material(get_Material());
133 template <
typename VERTEX>
135 std::auto_ptr<VERTEX> a2(
a.interpolate_to(0.5f,
b));
136 std::auto_ptr<VERTEX> b2(
b.interpolate_to(0.5f,
c));
137 std::auto_ptr<VERTEX> c2(
c.interpolate_to(0.5f,
a));
139 triangle->fax_Material(get_Material());
143 template <
typename VERTEX>
145 assert(-1 < index && index < 3);
146 const VERTEX *
const ptr = &
a;
150 template <
typename VERTEX>
152 assert(-1 < index && index < 3);
153 VERTEX *
const ptr = &
a;
The Direct3D9 Rendering System.
LPDIRECT3DDEVICE9 & get_d3d_device()
See DirectX Documentation for details.
Triangle< VERTEX > * get_duplicate_subt1() const
Get quarter 1 of the Triangle; Can be used for software LOD increase.
Triangle< VERTEX > & operator=(const Triangle< VERTEX > &rhs)
GLboolean GLboolean GLboolean GLboolean a
Triangle< VERTEX > * get_duplicate() const
Get a duplicate of the Triangle.
Triangle< VERTEX > * get_duplicate_subt2() const
Get quarter 2 of the Triangle; Can be used for software LOD increase.
Triangle< VERTEX > * get_duplicate_subt3() const
Get quarter 3 of the Triangle; Can be used for software LOD increase.
Triangle< VERTEX > * get_duplicate_subt0() const
Get quarter 0 of the Triangle; Can be used for software LOD increase.
The OpenGL Rendering System.
virtual void render_to(Video_GL_Fixed &screen) const
Overridden for OpenGL rendering.
virtual bool is_3d() const
Tell the rendering system if we're using 3D coordinates.
GLdouble GLdouble GLdouble b
An Abstraction of a Triangle.
const VERTEX & operator[](const int &index) const
Get 'index'.