#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLTexture.hpp>
|
| static std::atomic< bool > | m_dirty = false |
◆ Compressor()
| Slic3r::GUI::GLTexture::Compressor::Compressor |
( |
GLTexture & | texture | ) |
|
|
inlineexplicit |
◆ ~Compressor()
| Slic3r::GUI::GLTexture::Compressor::~Compressor |
( |
| ) |
|
|
inline |
void reset()
Definition GLTexture.cpp:55
References reset().
◆ add_level()
| void Slic3r::GUI::GLTexture::Compressor::add_level |
( |
unsigned int | w, |
|
|
unsigned int | h, |
|
|
const std::vector< unsigned char > & | data ) |
|
inline |
56{
m_levels.emplace_back(w, h, data); }
std::vector< Level > m_levels
Definition GLTexture.hpp:39
References m_levels.
◆ all_compressed_data_sent_to_gpu()
| bool Slic3r::GUI::GLTexture::Compressor::all_compressed_data_sent_to_gpu |
( |
| ) |
const |
|
inline |
◆ compress()
| void Slic3r::GUI::GLTexture::Compressor::compress |
( |
| ) |
|
|
private |
125{
126
127
130
133 break;
134
135
136
137 level.compressed_data = std::vector<unsigned char>(std::max((unsigned int)64, (unsigned int)level.src_data.size() / 2), 0);
138 int compressed_size = 0;
139 rygCompress(level.compressed_data.data(), level.src_data.data(), level.w, level.h, 1, compressed_size);
140 level.compressed_data.resize(compressed_size);
141
142
143 level.src_data.clear();
145 }
146
147
148
150 wxWakeUpIdle();
151}
static std::atomic< bool > m_dirty
Definition GLTexture.hpp:48
Definition GLTexture.hpp:28
References m_abort_compressing, m_dirty, m_levels, and m_num_levels_compressed.
Referenced by start_compressing().
◆ has_compressed_texture_to_refresh()
| bool Slic3r::GUI::GLTexture::Compressor::has_compressed_texture_to_refresh |
( |
| ) |
|
|
inlinestatic |
◆ reset()
| void Slic3r::GUI::GLTexture::Compressor::reset |
( |
| ) |
|
◆ send_compressed_data_to_gpu()
| void Slic3r::GUI::GLTexture::Compressor::send_compressed_data_to_gpu |
( |
| ) |
|
95{
96
98 return;
99
102
104 for (int i = 0; i < num_compressed; ++ i) {
106 if (! level.sent_to_gpu && ! level.compressed_data.empty()) {
110 level.sent_to_gpu = true;
111
112 level.compressed_data.clear();
113 }
114 }
116
117 if (num_compressed == (
int)
m_levels.size())
118
120}
#define glsafe(cmd)
Definition OpenGLUtils.hpp:25
#define GL_TEXTURE_MIN_FILTER
Definition gl.h:1828
#define glCompressedTexSubImage2D
Definition gl.h:3497
void GLvoid
Definition gl.h:2057
#define glPixelStorei
Definition gl.h:4451
#define GL_TEXTURE_MAX_LEVEL
Definition gl.h:1826
#define GL_LINEAR
Definition gl.h:930
#define glTexParameteri
Definition gl.h:4911
int GLint
Definition gl.h:2062
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
Definition gl.h:449
#define GL_LINEAR_MIPMAP_LINEAR
Definition gl.h:932
#define GL_UNPACK_ALIGNMENT
Definition gl.h:1924
int GLsizei
Definition gl.h:2065
#define glBindTexture
Definition gl.h:3299
#define GL_TEXTURE_2D
Definition gl.h:1739
References Slic3r::GUI::GLTexture::Compressor::Level::compressed_data, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_MIN_FILTER, GL_UNPACK_ALIGNMENT, glBindTexture, glCompressedTexSubImage2D, glPixelStorei, glsafe, glTexParameteri, Slic3r::GUI::GLTexture::Compressor::Level::h, m_levels, m_num_levels_compressed, m_texture, Slic3r::GUI::GLTexture::reset(), Slic3r::GUI::GLTexture::Compressor::Level::sent_to_gpu, and Slic3r::GUI::GLTexture::Compressor::Level::w.
◆ start_compressing()
| void Slic3r::GUI::GLTexture::Compressor::start_compressing |
( |
| ) |
|
◆ unsent_compressed_data_available()
| bool Slic3r::GUI::GLTexture::Compressor::unsent_compressed_data_available |
( |
| ) |
const |
83{
85 return false;
86
88 for (unsigned int i = 0; i < num_compressed; ++ i)
90 return true;
91 return false;
92}
References m_levels, and m_num_levels_compressed.
◆ m_abort_compressing
| std::atomic<bool> Slic3r::GUI::GLTexture::Compressor::m_abort_compressing |
|
private |
◆ m_dirty
| std::atomic< bool > Slic3r::GUI::GLTexture::Compressor::m_dirty = false |
|
staticprivate |
◆ m_levels
| std::vector<Level> Slic3r::GUI::GLTexture::Compressor::m_levels |
|
private |
◆ m_num_levels_compressed
| std::atomic<unsigned int> Slic3r::GUI::GLTexture::Compressor::m_num_levels_compressed |
|
private |
◆ m_texture
| GLTexture& Slic3r::GUI::GLTexture::Compressor::m_texture |
|
private |
◆ m_thread
| std::thread Slic3r::GUI::GLTexture::Compressor::m_thread |
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLTexture.hpp
- /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLTexture.cpp