ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/entity.h
(Generate patch)

Comparing libgender/entity.h (file contents):
Revision 1.5 by root, Sun Oct 3 02:38:33 2004 UTC vs.
Revision 1.6 by root, Sun Oct 3 03:17:09 2004 UTC

74 colour c; // colour 74 colour c; // colour
75 point p; // vertex 75 point p; // vertex
76}; 76};
77 77
78struct vertex2d { 78struct vertex2d {
79 colour c; // colour
80 point p; // vertex 79 point p; // vertex
81 vec3 n; // normal 80 vec3 n; // normal
82 texc t; // texture 81 texc t; // texture
83 82
84 vertex2d () { }; 83 vertex2d () { };
85 vertex2d (colour c, point p, vec3 n, texc t = texc()) : c(c), p(p), n(n), t(t) { }; 84 vertex2d (point p, vec3 n, texc t = texc()) : p(p), n(n), t(t) { };
85};
86
87struct entity_opengl : entity_base {
86}; 88};
87 89
88template<GLenum type> 90template<GLenum type>
89struct entity_opengl1d : entity_base, vector<vertex1d> { 91struct entity_opengl1d : entity_opengl, vector<vertex1d> {
90 void update_bbox (); 92 void update_bbox ();
91 void show (const sector &sec); 93 void show (const sector &sec);
92 void draw (const draw_context &ctx); 94 void draw (const draw_context &ctx);
93}; 95};
94 96
95template<GLenum type> 97template<GLenum type>
96struct entity_opengl2d : entity_base, vector<vertex2d> { 98struct entity_opengl2d : entity_opengl, vector<vertex2d> {
99 material m;
100
97 void update_bbox (); 101 void update_bbox ();
98 void show (const sector &sec); 102 void show (const sector &sec);
99 void draw (const draw_context &ctx); 103 void draw (const draw_context &ctx);
100}; 104};
101 105

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines