mac opengl support. proper coordinate flipping
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
f700e90d23
commit
db577bb01f
7 changed files with 610 additions and 390 deletions
|
|
@ -119,6 +119,7 @@
|
|||
- (void)destroy;
|
||||
|
||||
- (NSWindow *)parentWindow;
|
||||
- (NSView *)getView;
|
||||
|
||||
@end
|
||||
#define OBJC(x) x
|
||||
|
|
|
|||
|
|
@ -5,17 +5,24 @@
|
|||
#ifndef __MW_WIDGET_OPENGL_H__
|
||||
#define __MW_WIDGET_OPENGL_H__
|
||||
|
||||
#include <Mw/Core.h>
|
||||
#include <Mw/MachDep.h>
|
||||
#include <Mw/TypeDefs.h>
|
||||
#include <Mw/Core.h>
|
||||
|
||||
#if !defined(MW_OPENGL_NO_INCLUDE) && !defined(__gl_h_)
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#elif defined(__APPLE__)
|
||||
#else
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY APIENTRY
|
||||
|
|
@ -36,7 +43,7 @@ MWDECL MwClass MwOpenGLClass;
|
|||
* @param handle Widget
|
||||
*/
|
||||
MwInline void MwOpenGLMakeCurrent(MwWidget handle) {
|
||||
MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL);
|
||||
MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -45,10 +52,10 @@ MwInline void MwOpenGLMakeCurrent(MwWidget handle) {
|
|||
* @param name Name
|
||||
* @return Procedure
|
||||
*/
|
||||
MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
|
||||
void* out;
|
||||
MwVaWidgetExecute(handle, "mwOpenGLGetProcAddress", &out, name);
|
||||
return out;
|
||||
MwInline void *MwOpenGLGetProcAddress(MwWidget handle, const char *name) {
|
||||
void *out;
|
||||
MwVaWidgetExecute(handle, "mwOpenGLGetProcAddress", &out, name);
|
||||
return out;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -56,7 +63,7 @@ MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) {
|
|||
* @param handle Widget
|
||||
*/
|
||||
MwInline void MwOpenGLSwapBuffer(MwWidget handle) {
|
||||
MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL);
|
||||
MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue