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

Comparing libgender/view.h (file contents):
Revision 1.7 by root, Tue Oct 5 02:48:17 2004 UTC vs.
Revision 1.8 by root, Tue Oct 5 03:39:47 2004 UTC

26}; 26};
27 27
28struct draw_context { 28struct draw_context {
29 view &v; 29 view &v;
30 30
31 gl_matrix projection; 31 matrix projection;
32 matrix modelview;
33
32 struct { 34 struct {
33 plane l, r, t, b, n, f; 35 plane l, r, t, b, n, f;
34 } frustum; 36 } frustum;
35 enum { DEPTH, LIGHTED } mode; 37 enum { DEPTH, LIGHTED } mode;
36 light *l; 38 light *l;
45 47
46 draw_context (view &v); 48 draw_context (view &v);
47 ~draw_context (); 49 ~draw_context ();
48}; 50};
49 51
50inline void update_matrix (const draw_context &ctx)
51{
52 gl_matrix m1 = ctx.projection;
53 gl_matrix m2;
54
55 glGetFloatv (GL_MODELVIEW_MATRIX, (GLfloat *)&m2);
56
57 m1 = m1 * m2;
58
59 for (int i = 0; i < 4; i++)
60 for (int j = 0; j < 4 ; j++)
61 mvp[i][j] = m1(i,j);
62}
63
64#endif 52#endif
65 53

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines