mirror of https://github.com/CGAL/cgal
Moved draw_buffer function.
This commit is contained in:
parent
b8509e4da1
commit
c8c068ecff
|
|
@ -53,6 +53,7 @@
|
|||
#include <CGAL/Qt/constraint.h>
|
||||
#include <CGAL/Random.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/Qt/init_ogl_context.h>
|
||||
|
||||
namespace CGAL
|
||||
{
|
||||
|
|
@ -1719,6 +1720,30 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
template <typename BufferType = float>
|
||||
void draw_buffer(GraphicBuffer<BufferType> &graphic_buffer) {
|
||||
|
||||
#if defined(CGAL_TEST_SUITE)
|
||||
bool cgal_test_suite = true;
|
||||
#else
|
||||
bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE");
|
||||
#endif
|
||||
|
||||
if (!cgal_test_suite) {
|
||||
CGAL::Qt::init_ogl_context(4, 3);
|
||||
// Qt::init_ogl_context(4, 3);
|
||||
|
||||
int argc = 1;
|
||||
const char *argv[2] = {"lccviewer", nullptr};
|
||||
QApplication app(argc, const_cast<char **>(argv));
|
||||
|
||||
Basic_viewer_qt<float> basic_viewer(app.activeWindow(), graphic_buffer);
|
||||
|
||||
basic_viewer.show();
|
||||
app.exec();
|
||||
}
|
||||
}
|
||||
|
||||
} // End namespace CGAL
|
||||
|
||||
#else // CGAL_USE_BASIC_VIEWER
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||
|
||||
#ifdef CGAL_USE_BASIC_VIEWER
|
||||
#include <CGAL/Qt/init_ogl_context.h>
|
||||
|
||||
#include <CGAL/Linear_cell_complex_operations.h>
|
||||
#include <CGAL/Random.h>
|
||||
|
|
@ -342,29 +341,6 @@ void add_in_graphic_buffer_lcc(GraphicBuffer<BufferType> &graphic_buffer,
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Move to Basic_viewer_qt.h
|
||||
template <typename BufferType = float>
|
||||
void draw_buffer(GraphicBuffer<BufferType> &graphic_buffer) {
|
||||
|
||||
#if defined(CGAL_TEST_SUITE)
|
||||
bool cgal_test_suite = true;
|
||||
#else
|
||||
bool cgal_test_suite = qEnvironmentVariableIsSet("CGAL_TEST_SUITE");
|
||||
#endif
|
||||
|
||||
if (!cgal_test_suite) {
|
||||
CGAL::Qt::init_ogl_context(4, 3);
|
||||
int argc = 1;
|
||||
const char *argv[2] = {"lccviewer", nullptr};
|
||||
QApplication app(argc, const_cast<char **>(argv));
|
||||
|
||||
Basic_viewer_qt<float> basic_viewer(app.activeWindow(), graphic_buffer);
|
||||
|
||||
basic_viewer.show();
|
||||
app.exec();
|
||||
}
|
||||
}
|
||||
|
||||
// Specialization of draw function.
|
||||
#define CGAL_LCC_TYPE \
|
||||
CGAL::Linear_cell_complex_base<d_, ambient_dim, Traits_, Items_, Alloc_, \
|
||||
|
|
|
|||
Loading…
Reference in New Issue