Skip to content

Instantly share code, notes, and snippets.

@ryanbartley
Last active January 14, 2016 01:11
Show Gist options
  • Save ryanbartley/3b495cac22f8070c0ca8 to your computer and use it in GitHub Desktop.
Save ryanbartley/3b495cac22f8070c0ca8 to your computer and use it in GitHub Desktop.
ocl::printSupportedImageFormats( mClContext, CL_MEM_OBJECT_IMAGE2D );
auto imageSource = loadImage( loadAsset( "sunset.jpg" ) );
mClImage = ocl::createImage2D( imageSource, mClContext );
mClBuffer = ocl::createBuffer( imageSource, mClContext );
auto source = ocl::createSource( mClImage );
mGlTexture = gl::Texture2d::create( source );
writeImage( getAppPath(), source, ImageTarget::Options(), "png" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment