macgl3.h 644 Bytes
Newer Older
Thery Sylvain's avatar
Thery Sylvain committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
//#include <QApplication>
#include <QGLWidget>
#include <QGLContext>
#include <iostream>

//external Objective C function
void* select_3_2_mac_visual(GDHandle handle);

namespace CGoGN
{

/// Use with  GLWidget(...):QGLWidget(new Core3_2_context(QGLFormat::defaultFormat()))
/// check with std::cout<<glGetString(GL_VERSION)<<std::endl;
struct Core3_2_context : public QGLContext
{
	Core3_2_context(const QGLFormat& format, QPaintDevice* device) : QGLContext(format,device) {}
	Core3_2_context(const QGLFormat& format) : QGLContext(format) {}

	virtual void* chooseMacVisual(GDHandle handle)
	{
		return select_3_2_mac_visual(handle);
	}
};

}