2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 // window system independent camera view code
33 #define DRAW_GL_FILL 0x0001
34 #define DRAW_GL_LIGHTING 0x0010
35 #define DRAW_GL_TEXTURE_2D 0x0100
36 #define DRAW_GL_BLEND 0x1000
38 #define DRAW_GL_WIRE 0x0000
39 #define DRAW_GL_FLAT 0x0001
40 #define DRAW_GL_SOLID 0x0011
41 #define DRAW_GL_TEXTURED 0x0111
45 #define DRAW_TEXTURED 2
47 // TTimo: camera code is a huge mess
48 // someone courageous should clean it up
49 // this will probably happen when we have new rendering code
51 #define MOVE_FORWARD 0x001
52 #define MOVE_BACK 0x002
53 #define MOVE_ROTRIGHT 0x004
54 #define MOVE_ROTLEFT 0x008
55 #define MOVE_STRAFERIGHT 0x010
56 #define MOVE_STRAFELEFT 0x020
66 // indexes: PITCH = 0 YAW = 1 ROLL = 3
67 // AFAIK in Radiant we always have ROLL=0
70 camera_draw_mode draw_mode;
73 vec3_t color; // background
75 vec3_t forward, right; // move matrix (TTimo: used to have up but it was not updated)
76 vec3_t vup, vpn, vright; // view matrix (taken from the GL_PROJECTION matrix)
78 float projection[4][4];
79 float modelview[4][4];
81 unsigned int movementflags; // movement flags