Fix back-to-front sorting with gl-coordinate-system set to a custom value

This commit is contained in:
rdb 2016-12-07 19:32:44 +01:00
parent ceee5e9df9
commit b1d61b7b10
4 changed files with 5 additions and 13 deletions

View File

@ -147,6 +147,10 @@ GraphicsStateGuardian(CoordinateSystem internal_coordinate_system,
_coordinate_system = CS_invalid;
_internal_transform = TransformState::make_identity();
if (_internal_coordinate_system == CS_default) {
_internal_coordinate_system = get_default_coordinate_system();
}
set_coordinate_system(get_default_coordinate_system());
_data_reader = (GeomVertexDataPipelineReader *)NULL;

View File

@ -322,7 +322,7 @@ public:
virtual void set_state_and_transform(const RenderState *state,
const TransformState *transform);
virtual PN_stdfloat compute_distance_to(const LPoint3 &point) const;
PN_stdfloat compute_distance_to(const LPoint3 &point) const;
virtual void clear(DrawableRegion *clearable);

View File

@ -6024,16 +6024,6 @@ make_geom_munger(const RenderState *state, Thread *current_thread) {
return GeomMunger::register_munger(munger, current_thread);
}
/**
* This function will compute the distance to the indicated point, assumed to
* be in eye coordinates, from the camera plane. The point is assumed to be
* in the GSG's internal coordinate system.
*/
PN_stdfloat CLP(GraphicsStateGuardian)::
compute_distance_to(const LPoint3 &point) const {
return -point[2];
}
/**
* Copy the pixels within the indicated display region from the framebuffer
* into texture memory.

View File

@ -358,8 +358,6 @@ public:
virtual PT(GeomMunger) make_geom_munger(const RenderState *state,
Thread *current_thread);
virtual PN_stdfloat compute_distance_to(const LPoint3 &point) const;
virtual void clear(DrawableRegion *region);
virtual bool framebuffer_copy_to_texture