GLWidget
::GLWidget(QWidget *parent
){
...
//ctrlpoints = new (GLfloat **);
GLfloat ctrlpoints[4][4][3]= <- this crash
{
{
{-1.5, -1.5, 4.0},
{-0.5, -1.5, 2.0},
{0.5, -1.5, -1.0},
{1.5, -1.5, 2.0}},
{
{-1.5, -0.5, 1.0},
{-0.5, -0.5, 3.0},
{0.5, -0.5, 0.0},
{1.5, -0.5, -1.0}},
{
{-1.5, 0.5, 4.0},
{-0.5, 0.5, 0.0},
{0.5, 0.5, 3.0},
{1.5, 0.5, 4.0}},
{
{-1.5, 1.5, -2.0},
{-0.5, 1.5, -2.0},
{0.5, 1.5, 0.0},
{1.5, 1.5, -1.0}}
};
...
GLWidget::GLWidget(QWidget *parent)
: QGLWidget(parent)
{
...
//ctrlpoints = new (GLfloat **);
GLfloat ctrlpoints[4][4][3]= <- this crash
{
{
{-1.5, -1.5, 4.0},
{-0.5, -1.5, 2.0},
{0.5, -1.5, -1.0},
{1.5, -1.5, 2.0}},
{
{-1.5, -0.5, 1.0},
{-0.5, -0.5, 3.0},
{0.5, -0.5, 0.0},
{1.5, -0.5, -1.0}},
{
{-1.5, 0.5, 4.0},
{-0.5, 0.5, 0.0},
{0.5, 0.5, 3.0},
{1.5, 0.5, 4.0}},
{
{-1.5, 1.5, -2.0},
{-0.5, 1.5, -2.0},
{0.5, 1.5, 0.0},
{1.5, 1.5, -1.0}}
};
...
To copy to clipboard, switch view to plain text mode
GLuint GLWidget::makeSurf(const GLfloat *reflectance, GLfloat ***points)
{
...
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &points[0][0][0]);
...
GLuint GLWidget::makeSurf(const GLfloat *reflectance, GLfloat ***points)
{
...
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &points[0][0][0]);
...
To copy to clipboard, switch view to plain text mode
Bookmarks