Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few minor corrections, mostly undoing wrong changes to common files in that branch (results of a previous bad merge?) and getting rid of whitespace-only changes. Also remove debug logging from wxGrid. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
65
include/wx/qt/glcanvas.h
Normal file
65
include/wx/qt/glcanvas.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/qt/glcanvas.cpp
|
||||
// Author: Sean D'Epagnier
|
||||
// Copyright: (c) Sean D'Epagnier 2014
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GLCANVAS_H_
|
||||
#define _WX_GLCANVAS_H_
|
||||
|
||||
#include <QtOpenGL/QGLWidget>
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase
|
||||
{
|
||||
public:
|
||||
wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL);
|
||||
/// virtual ~wxGLContext();
|
||||
|
||||
virtual bool SetCurrent(const wxGLCanvas& win) const wxOVERRIDE;
|
||||
|
||||
private:
|
||||
QGLContext *m_glContext;
|
||||
|
||||
DECLARE_CLASS(wxGLContext)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGLCanvas: OpenGL output window
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase
|
||||
{
|
||||
public:
|
||||
wxEXPLICIT // avoid implicitly converting a wxWindow* to wxGLCanvas
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const int *attribList = NULL,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
virtual bool SwapBuffers();
|
||||
|
||||
static bool ConvertWXAttrsToQtGL(const int *wxattrs, QGLFormat &format);
|
||||
|
||||
virtual QGLWidget *GetHandle() const { return static_cast<QGLWidget *>(m_qtWindow); }
|
||||
|
||||
private:
|
||||
|
||||
// DECLARE_EVENT_TABLE()
|
||||
DECLARE_CLASS(wxGLCanvas)
|
||||
};
|
||||
|
||||
#endif // _WX_GLCANVAS_H_
|
Reference in New Issue
Block a user