milsko/include/Mw/Widget/OpenGL.h

56 lines
913 B
C
Raw Normal View History

/* $Id$ */
/*!
* %file Mw/Widget/OpenGL.h
* %brief OpenGL widget
*/
#ifndef __MW_WIDGET_OPENGL_H__
#define __MW_WIDGET_OPENGL_H__
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <GL/glx.h>
#endif
#include <GL/gl.h>
#ifndef GLAPIENTRY
#define GLAPIENTRY APIENTRY
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*!
* %brief OpenGL widget class
*/
MWDECL MwClass MwOpenGLClass;
/*!
* %brief Make a widget current OpenGL context
* %param handle Widget
*/
MWDECL void MwOpenGLMakeCurrent(MwWidget handle);
/*!
* %brief Get a procedure from OpenGL
* %param handle Widget
* %param name Name
* %return Procedure
*/
MWDECL void* MwOpenGLGetProcAddress(MwWidget handle, const char* name);
/*!
* %brief Swaps the buffer of OpenGL context
* %param handle Widget
*/
MWDECL void MwOpenGLSwapBuffer(MwWidget handle);
#ifdef __cplusplus
}
#endif
#endif