OpenGL: Refactor some defines and typedefs to a common location

These will be needed by the upcoming OpenGL enablers so move them
out of qopenglfunctions.h to somewhere that any opengl related file can
access them.

Change-Id: I0c788559397d446ec7210e2ad940da862179710d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Sean Harmer 2013-02-01 13:20:19 +00:00 committed by The Qt Project
parent 22077e1609
commit 25c9005097
2 changed files with 17 additions and 21 deletions

View File

@ -108,6 +108,23 @@ typedef GLfloat GLdouble;
QT_BEGIN_NAMESPACE
// Types that aren't defined in all system's gl.h files.
typedef ptrdiff_t qopengl_GLintptr;
typedef ptrdiff_t qopengl_GLsizeiptr;
#if defined(APIENTRY) && !defined(QOPENGLF_APIENTRY)
# define QOPENGLF_APIENTRY APIENTRY
#endif
# ifndef QOPENGLF_APIENTRYP
# ifdef QOPENGLF_APIENTRY
# define QOPENGLF_APIENTRYP QOPENGLF_APIENTRY *
# else
# define QOPENGLF_APIENTRY
# define QOPENGLF_APIENTRYP *
# endif
# endif
QT_END_NAMESPACE

View File

@ -73,27 +73,6 @@
QT_BEGIN_NAMESPACE
// Types that aren't defined in all system's gl.h files.
typedef ptrdiff_t qopengl_GLintptr;
typedef ptrdiff_t qopengl_GLsizeiptr;
#if defined(APIENTRY) && !defined(QOPENGLF_APIENTRY)
# define QOPENGLF_APIENTRY APIENTRY
#elif defined(GL_APIENTRY) && !defined(QOPENGLF_APIENTRY)
# define QOPENGLF_APIENTRY GL_APIENTRY
#endif
# ifndef QOPENGLF_APIENTRYP
# ifdef QOPENGLF_APIENTRY
# define QOPENGLF_APIENTRYP QOPENGLF_APIENTRY *
# else
# define QOPENGLF_APIENTRY
# define QOPENGLF_APIENTRYP *
# endif
# endif
struct QOpenGLFunctionsPrivate;
// Undefine any macros from GLEW, qopenglextensions_p.h, etc that