Comments (5)
Hi there; so sorry I couldn't respond to your issue earlier. I'm not planning to add CMake support anytime soon, as this repository is intended primarily as a convenience wrapper around the VST3 SDK and an example of how to use the SDK, not as its own library. You are correct that you download and build the SDK on your system, then include the appropriate headers and source files. Assuming you got it to work since you closed the issue, but if you need anything else then message me here and I'll get back to you when I have the opportunity.
from easyvst.
no worries! thanks for getting back to me :)
I've been trying to write my own implementation using yours as a point of reference apart from using GLFW instead of SDL2.
Was wondering why you chose SDL2 in the end? Was there a consideration for GLFW?
I looked at the other issue and have actually ran into a similar problem with NSView and unfortunately GLFW has no glfwGetCocoaView() type function (but strangely has a glfwGetCocoaWindow for NSWindow)
from easyvst.
I just used SDL because it's commonly used in many applications. GLFW should work too but hasn't been tested. Is there a way to get an NSView from an NSWindow? Does NSWindow inherit NSView? Not very familiar with macOS native development yet...
from easyvst.
yeah there is a way to get NSView from NSWindow, I figured it out similar to how it was solved from the last issue!
(its a little bit hacked together but it works for now!)
#import <Cocoa/Cocoa.h>
#import <CoreFoundation/CoreFoundation.h>
#import "platform.h"
void* platform::getNSView(GLFWwindow* window)
{
NSWindow* nsWindow = glfwGetCocoaWindow(window);
return (__bridge void*)([nsWindow contentView]);
}
and in platform.h:
#pragma once
#include <glfw3.h>
#define GLFW_EXPOSE_NATIVE_COCOA
#include <glfw3native.h>
#define GLFW_NATIVE_INCLUDE_NONE
class platform {
public:
static void* getNSView(GLFWwindow* wind);
};
my aim here is to create a platform class that handles different defines for the glfw3native.h file and then have one for mac, windows and linux and then in the part of the code where im attaching the view to glfw just have a #if preprocessor which acts according to
platform::getNSView(window)
platform::getHWND(window)
platform::getX11(window)
from easyvst.
Great, happy to see it worked! Thank you so much for sharing your code above. I'll close this issue for now but if you want to share your platform class once it's done then feel free to comment again, or better yet make a PR with an example! No need to do that though if it creates more work for you.
from easyvst.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyvst.