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.

41 lines
934 B

// NSWrapper.hpp
// XcodeOpenCL
// Created by Joshua Moerman on 13/04/14.
#pragma once
#include <memory>
#include <functional>
#include <CoreGraphics/CoreGraphics.h>
struct GLContext;
struct ContextParameters{
GLContext & context;
struct GLViewFunctionality {
// All three will only be called with the current gl context already set
// May be called from different threads
std::function<void(ContextParameters)> initialize_callback;
std::function<void(ContextParameters)> draw_callback;
std::function<void(ContextParameters, CGFloat, CGFloat)> resize_callback;
// returns a GLViewFunctionality with only its draw function set.
GLViewFunctionality simple_draw(std::function<void()> f);
struct NSAppWrapper {
void run();
void create_window(GLViewFunctionality const &);
std::unique_ptr<struct NSAppWrapperImpl> impl;