mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
display: Move GraphicsPipe::_detected_display_zoom to class member
This commit is contained in:
parent
b38e9d552a
commit
e9c7d345df
@ -81,3 +81,11 @@ INLINE GraphicsDevice *GraphicsPipe::
|
||||
get_device() const {
|
||||
return _device;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by derived class to set the display zoom factor.
|
||||
*/
|
||||
INLINE void GraphicsPipe::
|
||||
set_detected_display_zoom(PN_stdfloat zoom) {
|
||||
_detected_display_zoom = zoom;
|
||||
}
|
||||
|
@ -97,9 +97,6 @@ static void update_memory_info(DisplayInformation *info) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Temporarily declared as global float.
|
||||
static PN_stdfloat detected_display_zoom = 1.0;
|
||||
|
||||
TypeHandle GraphicsPipe::_type_handle;
|
||||
|
||||
/**
|
||||
@ -119,6 +116,7 @@ GraphicsPipe() :
|
||||
|
||||
_display_width = 0;
|
||||
_display_height = 0;
|
||||
_detected_display_zoom = 1.0;
|
||||
|
||||
_display_information = new DisplayInformation();
|
||||
|
||||
@ -287,15 +285,7 @@ get_display_zoom() const {
|
||||
return override;
|
||||
}
|
||||
}
|
||||
return detected_display_zoom;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by derived class to set the display zoom factor.
|
||||
*/
|
||||
void GraphicsPipe::
|
||||
set_detected_display_zoom(PN_stdfloat zoom) {
|
||||
detected_display_zoom = zoom;
|
||||
return _detected_display_zoom;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
virtual PT(GraphicsStateGuardian) make_callback_gsg(GraphicsEngine *engine);
|
||||
|
||||
protected:
|
||||
void set_detected_display_zoom(PN_stdfloat zoom);
|
||||
INLINE void set_detected_display_zoom(PN_stdfloat zoom);
|
||||
|
||||
virtual void close_gsg(GraphicsStateGuardian *gsg);
|
||||
|
||||
@ -137,6 +137,7 @@ protected:
|
||||
int _supported_types;
|
||||
int _display_width;
|
||||
int _display_height;
|
||||
PN_stdfloat _detected_display_zoom;
|
||||
PT(GraphicsDevice) _device;
|
||||
|
||||
DisplayInformation *_display_information;
|
||||
|
Loading…
x
Reference in New Issue
Block a user