source: golgotha/src/golg/draw_context.hh

Last change on this file was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.9 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef G1_DRAW_CONTEXT_HH
10#define G1_DRAW_CONTEXT_HH
11
12#include "arch.hh"
13#include "math/vector.hh"
14
15class r1_render_api_class;
16class i4_transform_class;
17class i4_image_class;
18class i4_draw_context_class;
19class i4_graphical_style_class;
20class i4_window_class;
21class i4_window_manager_class;
22class g1_light_set;
23class r1_render_api_class;
24
25
26class g1_draw_context_class
27{
28  enum { TRANS_STACK_SIZE=8 };
29  i4_transform_class *stack[TRANS_STACK_SIZE];
30  int top;
31
32public: 
33  void push(i4_transform_class &t) { stack[top++]=transform; transform=&t; }
34  void pop() { top--; transform=stack[top]; }
35
36  i4_bool draw_editor_stuff;
37
38  i4_transform_class *transform;
39
40
41  i4_image_class *screen;
42  i4_draw_context_class *context;
43  i4_graphical_style_class *style;
44  g1_light_set *light;
45  w32 default_render_bits;       // see polylist.hh, controls wireframe, texture, light rendering
46
47  // this should be how much to scale the camera to fit window (maximum dimension of window)
48  // for a pixel aspect ration of 1-1 window_scale_x==window_scale_y
49  i4_float camera_scale_x; 
50  i4_float camera_scale_y;
51
52  i4_float texture_scale;          // if you scale a model beyond normal size, change this
53
54  g1_draw_context_class();
55 
56  void window_setup(w32 win_x, w32 win_y, w32 win_w, w32 win_h,
57                    float &center_x, float &center_y,
58                    float &scale_x, float &scale_y,
59                    float &ooscale_x, float &ooscale_y);
60} ;
61
62#endif
Note: See TracBrowser for help on using the repository browser.