diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-01-06 11:29:46 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-01-06 11:29:46 +0100 |
commit | 9f6018ec1472d7e4f2f26b300d8c00b09fda1fe8 (patch) | |
tree | 8c57b9732b9e5d74d00ebb61827704d6c6e31d3b /drawinglayer/inc | |
parent | 33bfbf7debee613fa83d8a450226aecb5f9c672f (diff) |
aw079: #i107500# changed 3D renderer to be able to render overlapping transparent parts from back to front (Z-sorted)
Diffstat (limited to 'drawinglayer/inc')
-rw-r--r-- | drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx | 13 | ||||
-rw-r--r-- | drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx | 20 |
2 files changed, 14 insertions, 19 deletions
diff --git a/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx index e965d22ab880..d0f886cca703 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx @@ -41,6 +41,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/color/bcolormodifier.hxx> #include <svtools/optionsdrawinglayer.hxx> +#include <boost/shared_ptr.hpp> ////////////////////////////////////////////////////////////////////////////// // predefines @@ -90,14 +91,17 @@ namespace drawinglayer basegfx::BColorModifierStack maBColorModifierStack; // the current active texture - texture::GeoTexSvx* mpGeoTexSvx; + boost::shared_ptr< texture::GeoTexSvx > mpGeoTexSvx; // the current active transparence texture - texture::GeoTexSvx* mpTransparenceGeoTexSvx; + boost::shared_ptr< texture::GeoTexSvx > mpTransparenceGeoTexSvx; // SvtOptionsDrawinglayer incarnation to react on diverse settings const SvtOptionsDrawinglayer maDrawinglayerOpt; + // counter for entered transparence textures + sal_uInt32 mnTransparenceCounter; + // bitfield unsigned mbModulate : 1; unsigned mbFilter : 1; @@ -135,8 +139,9 @@ namespace drawinglayer // data read access renderer stuff const basegfx::BColorModifierStack& getBColorModifierStack() const { return maBColorModifierStack; } - const texture::GeoTexSvx* getGeoTexSvx() const { return mpGeoTexSvx; } - const texture::GeoTexSvx* getTransparenceGeoTexSvx() const { return mpTransparenceGeoTexSvx; } + const boost::shared_ptr< texture::GeoTexSvx >& getGeoTexSvx() const { return mpGeoTexSvx; } + const boost::shared_ptr< texture::GeoTexSvx >& getTransparenceGeoTexSvx() const { return mpTransparenceGeoTexSvx; } + sal_uInt32 getTransparenceCounter() const { return mnTransparenceCounter; } bool getModulate() const { return mbModulate; } bool getFilter() const { return mbFilter; } bool getSimpleTextureActive() const { return mbSimpleTextureActive; } diff --git a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx index d2ef8bd7f249..b2e09205dba9 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx @@ -58,6 +58,7 @@ namespace drawinglayer { } class ZBufferRasterConverter3D; +class RasterPrimitive3D; ////////////////////////////////////////////////////////////////////////////// @@ -81,21 +82,15 @@ namespace drawinglayer // will switch it off while e.g. 2 will use 2x2 pixels for each pixel to create sal_uInt16 mnAntiAlialize; - // bitfield - // a combination of bools to allow two-pass rendering to render - // the transparent parts in the 2nd run (if any) as needed for Z-Buffer - unsigned mbProcessTransparent : 1; - unsigned mbContainsTransparent : 1; - + // remembered RasterPrimitive3D's which need to be painted back to front + // for transparent 3D parts + std::vector< RasterPrimitive3D >* mpRasterPrimitive3Ds; ////////////////////////////////////////////////////////////////////////////// // rasterconversions for filled and non-filled polygons virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const; virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolyPolygon& rFill) const; - // the processing method for a single, known primitive - virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive); - public: ZBufferProcessor3D( const geometry::ViewInformation3D& rViewInformation3D, @@ -108,12 +103,7 @@ namespace drawinglayer sal_uInt16 nAntiAlialize); virtual ~ZBufferProcessor3D(); - // helpers for drawing transparent parts in 2nd run. To use this - // processor, call processNonTransparent and then processTransparent - // with the same primitives. The 2nd call will only do something, - // when transparent parts are contained - void processNonTransparent(const primitive3d::Primitive3DSequence& rSource); - void processTransparent(const primitive3d::Primitive3DSequence& rSource); + void finish(); // get the result as bitmapEx BitmapEx getBitmapEx() const; |