mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Improved rendering of transparent volumes
This commit is contained in:
parent
3182611ac2
commit
5006633221
4 changed files with 135 additions and 1 deletions
|
@ -500,6 +500,17 @@ typedef std::vector<GLVolume*> GLVolumePtrs;
|
|||
|
||||
class GLVolumeCollection
|
||||
{
|
||||
#if ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING
|
||||
public:
|
||||
enum ERenderType : unsigned char
|
||||
{
|
||||
Opaque,
|
||||
Transparent,
|
||||
All
|
||||
};
|
||||
|
||||
private:
|
||||
#endif // ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING
|
||||
// min and max vertex of the print box volume
|
||||
float print_box_min[3];
|
||||
float print_box_max[3];
|
||||
|
@ -544,8 +555,13 @@ public:
|
|||
int obj_idx, float pos_x, float pos_y, float width, float depth, float height, float rotation_angle, bool use_VBOs, bool size_unknown, float brim_width);
|
||||
|
||||
// Render the volumes by OpenGL.
|
||||
#if ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING
|
||||
void render_VBOs(ERenderType type, bool disable_cullface) const;
|
||||
void render_legacy(ERenderType type, bool disable_cullface) const;
|
||||
#else
|
||||
void render_VBOs() const;
|
||||
void render_legacy() const;
|
||||
#endif // ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING
|
||||
|
||||
// Finalize the initialization of the geometry & indices,
|
||||
// upload the geometry and indices to OpenGL VBO objects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue