#include "apple_glx_context.h"
#include "apple_glx_drawable.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <pthread.h>
#include <assert.h>
#include "apple_glx.h"
-#include "glcontextmodes.h"
+#include "glxconfig.h"
#include "apple_cgl.h"
+#include "util/debug.h"
/* mesa defines in glew.h, Apple in glext.h.
* Due to namespace nightmares, just do it here.
}
if (!ac->made_current) {
- glViewport(0, 0, pbuf->width, pbuf->height);
- glScissor(0, 0, pbuf->width, pbuf->height);
+ apple_glapi_oglfw_viewport_scissor(0, 0, pbuf->width, pbuf->height);
ac->made_current = true;
}
Window root;
int screen;
Pixmap xid;
- struct glx_config *modes = (__GLcontextModes *) config;
+ struct glx_config *modes = (struct glx_config *) config;
root = DefaultRootWindow(dpy);
screen = DefaultScreen(dpy);
err = apple_cgl.choose_pixel_format(attr, &pfobj, &vsref);
if (kCGLNoError != err) {
- if (getenv("LIBGL_DIAGNOSTIC")) {
+ if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) {
printf("choose_pixel_format error in %s: %s\n", __func__,
apple_cgl.error_string(err));
}
err = apple_cgl.create_context(pfobj, NULL, &newcontext);
if (kCGLNoError != err) {
- if (getenv("LIBGL_DIAGNOSTIC")) {
+ if (env_var_as_boolean("LIBGL_DIAGNOSTIC", false)) {
printf("create_context error in %s: %s\n", __func__,
apple_cgl.error_string(err));
}