mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Use texture compression on GPU
This commit is contained in:
parent
5afd0b4ee2
commit
efd247fc58
6 changed files with 102 additions and 21 deletions
|
@ -60,6 +60,9 @@ class GLCanvas3DManager
|
|||
bool m_use_legacy_opengl;
|
||||
bool m_use_VBOs;
|
||||
static EMultisampleState s_multisample;
|
||||
#if ENABLE_COMPRESSED_TEXTURES
|
||||
static bool s_compressed_textures_supported;
|
||||
#endif // ENABLE_COMPRESSED_TEXTURES
|
||||
|
||||
public:
|
||||
GLCanvas3DManager();
|
||||
|
@ -79,14 +82,18 @@ public:
|
|||
GLCanvas3D* get_canvas(wxGLCanvas* canvas);
|
||||
|
||||
static bool can_multisample() { return s_multisample == MS_Enabled; }
|
||||
#if ENABLE_COMPRESSED_TEXTURES
|
||||
static bool are_compressed_textures_supported() { return s_compressed_textures_supported; }
|
||||
#endif // ENABLE_COMPRESSED_TEXTURES
|
||||
|
||||
static wxGLCanvas* create_wxglcanvas(wxWindow *parent);
|
||||
|
||||
private:
|
||||
CanvasesMap::iterator _get_canvas(wxGLCanvas* canvas);
|
||||
CanvasesMap::const_iterator _get_canvas(wxGLCanvas* canvas) const;
|
||||
CanvasesMap::iterator do_get_canvas(wxGLCanvas* canvas);
|
||||
CanvasesMap::const_iterator do_get_canvas(wxGLCanvas* canvas) const;
|
||||
|
||||
bool _init(GLCanvas3D& canvas);
|
||||
static void _detect_multisample(int* attribList);
|
||||
bool init(GLCanvas3D& canvas);
|
||||
static void detect_multisample(int* attribList);
|
||||
};
|
||||
|
||||
} // namespace GUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue