Posts

Post not yet marked as solved
0 Replies
417 Views
I have a simple piece of code that successfully creates pbuffers when compiled against the macOS 10.12 SDK, but an update to the 10.13 SDK breaks things. I know that this tech is very deprecated.#import <Cocoa/Cocoa.h> #import <OpenGL/OpenGL.h> #import <OpenGL/gl3.h> #import <OpenGL/glext.h> int main( int argc, const char* argv[] ) { GLsizei width = 1024; GLsizei height = 1024; GLenum target = GL_TEXTURE_RECTANGLE_EXT; GLenum internalFormat = GL_RGBA; GLint maxLevel = 0; CGLPBufferObj pBuffer = NULL; CGLError error = kCGLNoError; error = CGLCreatePBuffer( width, height, target, internalFormat, maxLevel, &pBuffer ); if( error ) { NSLog(@"CGL Error %@ : %s", @(error), CGLErrorString( error ) ); } return 0; }Using the 10.12 SDK, I get kCGLNoError, but using 10.13 it delivers kCGLBadDrawable.Beyond transitioning to using e.g. framebuffer objects, what can I do to keep this piece of code going for a little bit longer?Note: it's not even necessary to fully recompile the generated binary against a different macOS SDK. Changing the Mach-O load command (changing a single byte) around VERSION_MIN_MAC_OSX to point to 10.12.0 rather than 10.13.0 also fixes things.
Posted Last updated
.
Post not yet marked as solved
0 Replies
337 Views
I'm looking to programatically set the iTunes library location to custom locations using e.g. C / Obj-C or Swift API. Alternatively, modifying plists, using the defaults CLI tool, etc, are also OK for me.Ordinarily, selecting a custom iTunes library location is done by launching iTunes while holding down the option key. I need to be able to do this in e.g. a unit testing environment / programatically.Any ideas?
Posted Last updated
.