Mandelbrot in OpenGL and something else in OpenCL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

38 lines
615 B

// NSGLWrapper.hpp
// XcodeOpenCL
// Created by Joshua Moerman on 13/04/14.
#pragma once
#include <memory>
#include <functional>
#include <OpenGL/OpenGL.h>
#include <CoreVideo/CVDisplayLink.h>
struct GLContext {
void set_as_current_context() const;
void lock();
void unlock();
CGLContextObj ctx{};
CGLPixelFormatObj pix{};
struct CVDisplayLinky {
CVDisplayLinky(GLContext const &);
void start();
void stop();
std::function<void()> callback;
CVDisplayLinkRef displayLink;