So, I'm testing more. To recap, in SL, it used to be that setting the
metadata of the image to be a 2D texture would automatically put the image
in a mode where it was in GL_REPEAT.
In SL, what was in the last post can be boiled down to:
if([inputGLTEXTURE2D booleanValue])
{
[[inputImage imageValue]setMetadata:[NSNumber numberWithInt:GL_TEXTURE_2D]
forKey:@"textureTarget" shouldForward:YES];
}
[inputImage setOnOpenGLContext: context unit:GL_TEXTURE0];
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
}
To get it working, and have "tiling" repeat effect.
Now, since just making the image 2D to begin with gives the GL_REPEAT
freebie, I've reconfirmed this by testing:
if([inputGLTEXTURE2D booleanValue])
{
[[inputImage imageValue]setMetadata:[NSNumber numberWithInt:GL_TEXTURE_2D]
forKey:@"textureTarget" shouldForward:YES];
}
[inputImage setOnOpenGLContext: context unit:GL_TEXTURE0];
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
}
This, as expected in Snow Leopard, results in a clamped texture.
By this process of elimination, I'm pretty darn sure I'm calling my
parameters in the correct place, and the correct way. This is making me feel
like there has been a regression in the QC Image pipeline that's likely to
effect more patches negatively, but I'm not 100% sure about that of course.
Again, any thoughts or help are greatly appreciated. As is, I think this is
a bug, but since I'm using GFPlugin, I can't really file.
Best,
gt
On Sat, Oct 29, 2011 at 4:26 PM, George Toledo <[email protected]> wrote:
> So, I'm trying more, and this won't work either - well, it works fine in
> SL, but produces no output in Lion.
>
> if([inputGLTEXTURE2D booleanValue])
> {
> [[inputImage imageValue]setMetadata:[NSNumber
> numberWithInt:GL_TEXTURE_2D] forKey:@"textureTarget" shouldForward:YES];
> }
> [inputImage setOnOpenGLContext: context unit:GL_TEXTURE0];
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
> }
>
>
> This seems like it should work, because I'm setting the metadata to 2D
> texture, then after the texture context is set, I'm trying to pass the
> parameters.
>
> I've wondered if I should be using glTexParameterf, but I wouldn't think
> that would be making the difference here.
>
> I'm kind of worried, because it's feeling like maybe one can't make any
> assumptions that when texture is set on context, that it's bound. Or maybe
> it's just a stupid error here, but as said, both work in SL, but not Lion.
> Any help is greatly appreciated.
>
> I'm guessing I can just treat the image with "Image Texturing Properties"
> ahead of time if needed, but it's not as eloquent as having that happen
> inside of the patch, and it's problematic to pass the output of Image
> Texturing Properties to some things, so this has been great to be able to
> have happen in the past.
>
> On Sat, Oct 29, 2011 at 2:34 PM, George Toledo <[email protected]> wrote:
>
>> In Leopard and SL, I was able to make image into a QC Image port do GL
>> Repeat by doing something like this:
>>
>> if([inputGLTEXTURE2D booleanValue])
>> {
>> [[inputImage imageValue]setMetadata:[NSNumber numberWithInt:GL_TEXTURE_2D]
>> forKey:@"textureTarget" shouldForward:YES];
>> }
>> [inputImage setOnOpenGLContext: context unit:GL_TEXTURE0];
>> }
>>
>>
>> For some reason, this has broken in Lion. What's the quickest way for me
>> to get this going again, and is this a bug? I understand I'm not going "all
>> the way" and specifying the repeat, but this used to "just work". What's the
>> proper way to set the metadata to get the repeat? I'm not using the standard
>> API, so I take my lumps on that one, but any help would be great.
>>
>> -gt
>>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]