Hello Vade,
the Billboard is not a normal OpenGL 3D object which has texture
coordinates (what I was tweaking using Image Texturing Properties
patch) and stuff. Billboard is just a flat thing. I imagine this is
something like it just overwrites everything in the frame buffer byte
wise in the last rendering step.
I'm not that skilled with Objective-C and native OS X APIs.
I just use low level OpenGL and GLUT with C++.
But when going down to OpenGL then I'd try Christopher Wright suggested.
It's not that difficult to implement once the image data is loaded
into the memory.
Just a few calculations how many tiles we need and then copy the bytes.
But I don't know how to map them if not on sprites ( or GL_QUADS when
using low level OpenGL ).
Since this is a QuartzComposer mailinglist I assume you can access
Quartz APIs.
Why not tile the images, map them on sprites and then use the "Render
in Image" patch.
Then you have something you can render using a Billboard.
It works still real time for me when I put my approach into a render
in Image patch.
I'll try to write an QuartzComposition which automatically tiles an
image and renders the resulting pan zoom stuff into an image ready for
Billboard.
-Michael
Thank you. You are totally right about Core image and GLSL not being
panacea, and I will admit my core OpenGL API knowledge is more than
lacking.
However, the issue is that I need a cropped image, since I am
sending this image/texturing input to something more like a
Billboard. Replacing the Sprite with a Billboard in your patch does
render the same output. The Billboard shows the full image.
Essentially, I think for my purposes I need to have a new texture, a
subtexture, which is unique and independent due to the fact that I
am using something more akin to a billboard than a sprite renderer
(I am using highly modified GLHeighfield plugin as my rendering
destination).
Now perhaps this means I can internally treat my texture/QC image
input like a the Sprite does and use the texturematrix (glTexcoord,
correct?) as the image extents. Looking into this, it seems 10.5 has
a API for textureMatrix:
so I should be able to do:
[myImage bindTextureRepresentationToCGLContext:cgl_ctx
textureUnit:GL_TEXTURE0 normalizeCoordinates:YES];
glTexcoord4f([myImage textureMatrix]);
glBlahBlah;
should should basically work as a Sprite, no? Time to try it out. My
only concern is that my plugin will now be processing a 5000x5000
texture internally, rather than just my cropped duplicate standalone
image. I will mediate on this and report back.
Thanks again.
P.S. Shotguns are fun though!
_______________________________________________
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]