Permalink
Browse files

modifications

preview window in ISF editor behaves as if bilinear filtering was disabled :: updated the pkg with the built-in ISF resources :: the ISF spec defines the values to be stored at the WIDTH and HEIGHT keys as strings, but ISFGLScene will now work even if the dimensions provided are numbers :: this is vsn 2.9 of the ISF editor :: added locking around QC scene rendering for safety :: enabled signing for release build of the ISF editor
  • Loading branch information...
1 parent 0c86969 commit ebe44ecef73954abf287675a4fb2ef882fc00657 @mrRay committed Sep 2, 2016
@@ -68,8 +68,10 @@ void main() {
vec2 normMaskSrcCoord;
normMaskSrcCoord.x = (gl_FragCoord.x-rectOfResizedInputImage.x)/rectOfResizedInputImage.z;
normMaskSrcCoord.y = (gl_FragCoord.y-rectOfResizedInputImage.y)/rectOfResizedInputImage.w;
+ vec2 pixelMaskSrcCoord = floor(normMaskSrcCoord * IMG_SIZE(inputImage)) + vec2(0.5);
// get the color of the pixel from the input image for these normalized coords (the color is transparent black if there should be no image here as a result of the rect resize)
- vec4 inputImagePixel = (normMaskSrcCoord.x>=0.0 && normMaskSrcCoord.x<=1.0 && normMaskSrcCoord.y>=0.0 && normMaskSrcCoord.y<=1.0) ? IMG_NORM_PIXEL(inputImage, normMaskSrcCoord) : vec4(0,0,0,0);
+ //vec4 inputImagePixel = (normMaskSrcCoord.x>=0.0 && normMaskSrcCoord.x<=1.0 && normMaskSrcCoord.y>=0.0 && normMaskSrcCoord.y<=1.0) ? IMG_NORM_PIXEL(inputImage, normMaskSrcCoord) : vec4(0,0,0,0);
+ vec4 inputImagePixel = (normMaskSrcCoord.x>=0.0 && normMaskSrcCoord.x<=1.0 && normMaskSrcCoord.y>=0.0 && normMaskSrcCoord.y<=1.0) ? IMG_PIXEL(inputImage, pixelMaskSrcCoord) : vec4(0,0,0,0);
// now we do the "source atop" composition that will show the checkerboard backing
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
- <string>2.8</string>
+ <string>2.9</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.8</string>
+ <string>2.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Binary file not shown.
@@ -374,8 +374,10 @@ - (void) _renderPrep {
}
- (void) _initialize {
//NSLog(@"%s",__func__);
- if (context == nil)
+ if (context == nil) {
NSLog(@"\t\terr: context nil, %s",__func__);
+ return;
+ }
// if there's no renderer, make one
if (renderer == nil) {
//NSLog(@"\t\tshould be making a renderer");
@@ -386,11 +388,15 @@ - (void) _initialize {
NSLog(@"\terr: QCComposition was nil %s",__func__);
else {
pthread_mutex_lock(&universalInitializeLock);
+ CGLLockContext([context CGLContextObj]);
+ //NSLog(@"\t\tlocked context %p on thread %p in %s on %p",[context CGLContextObj],[NSThread currentThread],__func__,self);
renderer = [[QCRenderer alloc]
initWithCGLContext:[context CGLContextObj]
pixelFormat:[customPixelFormat CGLPixelFormatObj]
colorSpace:colorSpace
composition:composition];
+ //NSLog(@"\t\tunlocking context %p on thread %p in %s on %p",[context CGLContextObj],[NSThread currentThread],__func__,self);
+ CGLUnlockContext([context CGLContextObj]);
if (renderer == nil)
NSLog(@"\t\terr: couldn't create QCRenderer, %s",__func__);
pthread_mutex_unlock(&universalInitializeLock);
View
@@ -329,16 +329,28 @@ - (void) useFile:(NSString *)p resetTimer:(BOOL)r {
if (bufferDescription!=nil && [bufferDescription isKindOfClass:dictClass]) {
ISFTargetBuffer *newBuffer = [ISFTargetBuffer create];
[newBuffer setName:bufferName];
- NSString *tmpString = nil;
- tmpString = [bufferDescription objectForKey:@"WIDTH"];
- if (tmpString != nil && [tmpString isKindOfClass:[NSString class]]) {
- [newBuffer setTargetWidthString:tmpString];
- bufferRequiresEval = YES;
+ id tmpObj = nil;
+ tmpObj = [bufferDescription objectForKey:@"WIDTH"];
+ if (tmpObj != nil) {
+ if ([tmpObj isKindOfClass:[NSString class]]) {
+ [newBuffer setTargetWidthString:tmpObj];
+ bufferRequiresEval = YES;
+ }
+ else if ([tmpObj isKindOfClass:[NSNumber class]]) {
+ [newBuffer setTargetWidthString:VVFMTSTRING(@"%d",[tmpObj intValue])];
+ bufferRequiresEval = YES;
+ }
}
- tmpString = [bufferDescription objectForKey:@"HEIGHT"];
- if (tmpString != nil && [tmpString isKindOfClass:[NSString class]]) {
- [newBuffer setTargetHeightString:tmpString];
- bufferRequiresEval = YES;
+ tmpObj = [bufferDescription objectForKey:@"HEIGHT"];
+ if (tmpObj != nil) {
+ if ([tmpObj isKindOfClass:[NSString class]]) {
+ [newBuffer setTargetHeightString:tmpObj];
+ bufferRequiresEval = YES;
+ }
+ else if ([tmpObj isKindOfClass:[NSNumber class]]) {
+ [newBuffer setTargetHeightString:VVFMTSTRING(@"%d",[tmpObj intValue])];
+ bufferRequiresEval = YES;
+ }
}
NSNumber *tmpNum = [bufferDescription objectForKey:@"FLOAT"];
if (tmpNum!=nil && [tmpNum isKindOfClass:[NSNumber class]] && [tmpNum boolValue])
@@ -9686,6 +9686,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";

0 comments on commit ebe44ec

Please sign in to comment.