2025-09-29 08:20:45 +00:00
|
|
|
/* $Id$ */
|
2025-09-30 13:04:40 +00:00
|
|
|
/*!
|
2025-10-04 16:34:24 +00:00
|
|
|
* %file Mw/Widget/OpenGL.h
|
2025-09-30 13:04:40 +00:00
|
|
|
* %brief OpenGL widget
|
|
|
|
|
*/
|
2025-10-04 16:34:24 +00:00
|
|
|
#ifndef __MW_WIDGET_OPENGL_H__
|
|
|
|
|
#define __MW_WIDGET_OPENGL_H__
|
2025-09-29 08:20:45 +00:00
|
|
|
|
|
|
|
|
#include <Mw/MachDep.h>
|
|
|
|
|
#include <Mw/TypeDefs.h>
|
|
|
|
|
|
2025-10-10 10:17:30 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
#else
|
|
|
|
|
#include <GL/glx.h>
|
|
|
|
|
#endif
|
|
|
|
|
#include <GL/gl.h>
|
|
|
|
|
|
|
|
|
|
#ifndef GLAPIENTRY
|
|
|
|
|
#define GLAPIENTRY APIENTRY
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-09-29 08:20:45 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-09-30 13:04:40 +00:00
|
|
|
/*!
|
|
|
|
|
* %brief OpenGL widget class
|
|
|
|
|
*/
|
2025-09-29 08:20:45 +00:00
|
|
|
MWDECL MwClass MwOpenGLClass;
|
|
|
|
|
|
2025-09-30 13:04:40 +00:00
|
|
|
/*!
|
|
|
|
|
* %brief Make a widget current OpenGL context
|
|
|
|
|
* %param handle Widget
|
|
|
|
|
*/
|
2025-09-29 08:20:45 +00:00
|
|
|
MWDECL void MwOpenGLMakeCurrent(MwWidget handle);
|
2025-09-30 13:04:40 +00:00
|
|
|
|
2025-10-01 05:55:19 +00:00
|
|
|
/*!
|
|
|
|
|
* %brief Get a procedure from OpenGL
|
|
|
|
|
* %param handle Widget
|
|
|
|
|
* %param name Name
|
|
|
|
|
* %return Procedure
|
|
|
|
|
*/
|
|
|
|
|
MWDECL void* MwOpenGLGetProcAddress(MwWidget handle, const char* name);
|
|
|
|
|
|
2025-09-30 13:04:40 +00:00
|
|
|
/*!
|
|
|
|
|
* %brief Swaps the buffer of OpenGL context
|
|
|
|
|
* %param handle Widget
|
|
|
|
|
*/
|
2025-09-29 08:20:45 +00:00
|
|
|
MWDECL void MwOpenGLSwapBuffer(MwWidget handle);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|