mirror of https://github.com/vitalif/openscad
continue merging enable_opencsg_shaders
parent
958657eb26
commit
eff1628335
12
src/GLView.h
12
src/GLView.h
|
@ -48,12 +48,12 @@ public:
|
|||
|
||||
size_t width;
|
||||
size_t height;
|
||||
double viewer_distance;//
|
||||
double w_h_ratio;//
|
||||
bool orthomode;//
|
||||
bool showaxes;//
|
||||
bool showfaces;//
|
||||
bool showedges;//
|
||||
double viewer_distance;
|
||||
double w_h_ratio;
|
||||
bool orthomode;
|
||||
bool showaxes;
|
||||
bool showfaces;
|
||||
bool showedges;
|
||||
Eigen::Vector3d object_trans;
|
||||
Eigen::Vector3d object_rot;
|
||||
Eigen::Vector3d camera_eye;
|
||||
|
|
|
@ -7,6 +7,13 @@
|
|||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <GL/wglew.h>
|
||||
#elif !defined(__APPLE__)
|
||||
#include <GL/glxew.h>
|
||||
#endif
|
||||
|
||||
|
||||
OffscreenView::OffscreenView(size_t width, size_t height)
|
||||
{
|
||||
orthomode = false;
|
||||
|
@ -18,6 +25,11 @@ OffscreenView::OffscreenView(size_t width, size_t height)
|
|||
camera_center << 0, 0, 0;
|
||||
|
||||
#ifdef ENABLE_OPENCSG
|
||||
is_opencsg_capable = false;
|
||||
has_shaders = false;
|
||||
opencsg_support = true;
|
||||
static int sId = 0;
|
||||
this->opencsg_id = sId++;
|
||||
for (int i = 0; i < 10; i++) this->shaderinfo[i] = 0;
|
||||
#endif
|
||||
this->ctx = create_offscreen_context(width, height);
|
||||
|
|
|
@ -24,8 +24,15 @@ public:
|
|||
bool save(const char *filename);
|
||||
bool save(std::ostream &output);
|
||||
std::string getRendererInfo() const;
|
||||
void enable_opencsg_shaders();
|
||||
OffscreenContext *ctx; // not
|
||||
|
||||
#ifdef ENABLE_OPENCSG
|
||||
bool is_opencsg_capable;
|
||||
bool has_shaders;
|
||||
void enable_opencsg_shaders();
|
||||
bool opencsg_support;
|
||||
int opencsg_id;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
void setOrthoMode(bool enabled) { this->orthomode = enabled; }
|
||||
std::string getRendererInfo() const;
|
||||
bool save(const char *filename);
|
||||
void enable_opencsg_shaders();
|
||||
|
||||
public:
|
||||
QLabel *statusLabel;
|
||||
|
|
Loading…
Reference in New Issue