fix build break

This commit is contained in:
David Rose 2002-03-29 00:40:17 +00:00
parent b5a50285bd
commit 29afc8d547
4 changed files with 36 additions and 37 deletions

View File

@ -759,6 +759,7 @@ dx_init( void) {
_available_clip_plane_ids = PTA(PlaneNode*)::empty_array(_max_clip_planes);
_clip_plane_enabled = new bool[_max_clip_planes];
_cur_clip_plane_enabled = new bool[_max_clip_planes];
int i;
for (i = 0; i < _max_clip_planes; i++) {
_available_clip_plane_ids[i] = NULL;
_clip_plane_enabled[i] = false;

View File

@ -39,20 +39,6 @@ enable_line_smooth(bool val) {
}
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::enable_lighting
// Access:
// Description:
////////////////////////////////////////////////////////////////////
INLINE void DXGraphicsStateGuardian::
enable_lighting(bool val) {
if (_lighting_enabled != val) {
scrn.pD3DDevice->SetRenderState(D3DRS_LIGHTING, (DWORD)val);
if(_lighting_enabled = val)
_lighting_enabled_this_frame = true;
}
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::enable_dither
// Access:

View File

@ -467,7 +467,7 @@ DXGraphicsStateGuardian(GraphicsWindow *win) : GraphicsStateGuardian(win) {
_pFPSFont=NULL;
_bShowFPSMeter = false;
_max_light_range = __D3DLIGHT_RANGE_MAX;
// _max_light_range = __D3DLIGHT_RANGE_MAX;
// non-dx obj values inited here should not change if resize is
// called and dx objects need to be recreated (otherwise they
@ -1045,25 +1045,6 @@ clear(const RenderBuffer &buffer, const DisplayRegion *region) {
pop_display_region(old_dr);
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::enable_light
// Access:
// Description:
////////////////////////////////////////////////////////////////////
bool DXGraphicsStateGuardian::
enable_light(int light_id, bool val) {
HRESULT hr = scrn.pD3DDevice->LightEnable( light_id, val );
#ifdef GSG_VERBOSE
dxgsg_cat.debug() << "LightEnable(" << light_id << "=" << val << ")" << endl;
#endif
if (FAILED(hr)) {
dxgsg_cat.error() << "LightEnable(" << light_id << "=" << val << ") failed, " <<D3DERRORSTRING(hr);
return false;
}
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::prepare_display_region
// Access: Public, Virtual
@ -4335,7 +4316,7 @@ void DXGraphicsStateGuardian::apply_light( Spotlight *light ) {
// Description:
////////////////////////////////////////////////////////////////////
void DXGraphicsStateGuardian::apply_light( AmbientLight* light ) {
_cur_ambient_light = _cur_ambient_light + light->get_color();
// _cur_ambient_light = _cur_ambient_light + light->get_color();
}
////////////////////////////////////////////////////////////////////
@ -5399,6 +5380,36 @@ get_fog_mode_type(Fog::Mode m) const {
return D3DFOG_EXP;
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::enable_lighting
// Access: Protected, Virtual
// Description: Intended to be overridden by a derived class to
// enable or disable the use of lighting overall. This
// is called by issue_light() according to whether any
// lights are in use or not.
////////////////////////////////////////////////////////////////////
void DXGraphicsStateGuardian::
enable_lighting(bool enable) {
scrn.pD3DDevice->SetRenderState(D3DRS_LIGHTING, (DWORD)enable);
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::enable_light
// Access: Protected, Virtual
// Description: Intended to be overridden by a derived class to
// enable the indicated light id. A specific Light will
// already have been bound to this id via bind_light().
////////////////////////////////////////////////////////////////////
void DXGraphicsStateGuardian::
enable_light(int light_id, bool enable) {
HRESULT res = scrn.pD3DDevice->LightEnable(light_id, enable);
#ifdef GSG_VERBOSE
dxgsg_cat.debug()
<< "LightEnable(" << light << "=" << val << ")" << endl;
#endif
}
////////////////////////////////////////////////////////////////////
// Function: DXGraphicsStateGuardian::free_pointers
// Access: Public

View File

@ -179,6 +179,9 @@ public:
DXScreenData scrn;
protected:
virtual void enable_lighting(bool enable);
virtual void enable_light(int light_id, bool enable);
void free_pointers(); // free local internal buffers
void free_dxgsg_objects(void); // free the DirectX objects we create
virtual PT(SavedFrameBuffer) save_frame_buffer(const RenderBuffer &buffer,
@ -241,10 +244,8 @@ protected:
INLINE void call_dxLightModelAmbient(const Colorf& color);
INLINE void call_dxAlphaFunc(D3DCMPFUNC func, DWORD ref);
INLINE void call_dxBlendFunc(D3DBLEND sfunc, D3DBLEND dfunc);
INLINE void enable_lighting(bool val);
INLINE void enable_dither(bool val);
INLINE void enable_stencil_test(bool val);
bool enable_light(int light, bool val);
void report_texmgr_stats();
void draw_multitri(Geom *geom, D3DPRIMITIVETYPE tri_id);