<pre>Hi All,&nbsp;I've created a consumer plugin which uses opengl to draw
a bunch of stuff and all is now working nicely (finally.. thanks to
all...)</pre><pre>&nbsp;however now I would like to send some information
to QC as well, to control branching and other stuff to happen outside of my
plugin... seeing as a consumer can't send any data to QC I'm trying to
convert it to a processor patch.. but am not having much
luck.</pre><pre>&nbsp;</pre><pre><span class="Apple-style-span"
style="font-family: Monaco; font-size: 10px; white-space: normal"><span
class="Apple-style-span" style="font-family: Verdana; font-size: 12px;
white-space: pre">The error I'm getting is an exception at <span
class="Apple-style-span" style="font-family: Monaco; font-size: 10px;
white-space: normal">[QCPlugOutputImage initWithImage:]&nbsp;<span
class="Apple-style-span" style="font-family: Verdana; font-size: 12px;
white-space: pre">exception and in the log I'm getting CREATING PROVIDER,
IMAGE BOUNDS, COLORSPACE.. and no
further...</span></span></span></span></pre><p style="font: normal normal
normal 10px/normal Monaco; min-height: 14px; margin: 0px"><span
class="Apple-style-span" style="font-family: Verdana; font-size: 12px;
white-space: pre">Have I understood this outputImage rendering context
stuff incorrectly? Is what I'm trying to do completely wrong or am I just
missing something ?</span></p><p style="font: normal normal normal
10px/normal Monaco; min-height: 14px; margin: 0px">&nbsp;</p><p
style="font: normal normal normal 10px/normal Monaco; min-height: 14px;
margin: 0px">&nbsp;</p><p style="font: normal normal normal 10px/normal
Monaco; min-height: 14px; margin: 0px">&nbsp;</p><pre>In my QCPlugIn I've
defined and made dynamic - <span class="Apple-style-span" style="color:
#5c2699; font-family: Monaco; font-size: 10px; white-space: normal"><span
style="color: #aa0d91">@property</span><span style="color:
#000000">(</span><span style="color: #aa0d91">assign</span><span
style="color: #000000">) </span><span style="color: #aa0d91">id</span><span
style="color: #000000">&lt;</span>QCPlugInOutputImageProvider<span
style="color: #000000">&gt; outputImage;<span class="Apple-style-span"
style="font-family: Verdana; font-size: 12px; white-space:
pre">&nbsp;</span></span></span></pre><pre>Now my execute method of the
QCPlugin does a bunch of calculations and logic, does NOT do any openGL
drawing commands but instead just before returning does:</pre><p
style="font: normal normal normal 10px/normal Monaco; color: #c41a16;
margin: 0px"><span style="color: #000000"><span class="Apple-tab-span"
style="white-space: pre">               </span></span><span style="color:
#2e0d6e">NSLog</span><span style="color: #000000">(</span>@&quot;*****
CREATING PROVIDER *****&quot;<span style="color: #000000">);</span></p><p
style="font: normal normal normal 10px/normal Monaco; margin: 0px"><span
class="Apple-tab-span" style="white-space: pre">                </span><span
style="color: #3f6e74">ImageProvider</span>*<span class="Apple-tab-span"
style="white-space: pre">       </span>provider = [[<span style="color:
#3f6e74">ImageProvider</span> <span style="color: #2e0d6e">alloc</span>]
<span style="color: #26474b">initWithApp</span>:<span style="color:
#aa0d91">self</span> <span style="color: #26474b">andBounds</span>:[context
<span style="color: #2e0d6e">bounds</span>] <span style="color:
#26474b">andColorSpace</span>:<span style="color:
#aa0d91">NULL</span>];</p><p style="font: normal normal normal 10px/normal
Monaco; margin: 0px"><span class="Apple-tab-span" style="white-space:
pre">           </span><span style="color: #aa0d91">if</span>(provider == <span
style="color: #aa0d91">nil</span>) <span style="color:
#aa0d91">return</span> <span style="color: #aa0d91">NO</span>;</p><p
style="font: normal normal normal 10px/normal Monaco; margin: 0px"><span
class="Apple-tab-span" style="white-space: pre">                </span><span
style="color: #aa0d91">self</span>.outputImage = provider;</p><p
style="font: normal normal normal 10px/normal Monaco; margin: 0px"><span
class="Apple-tab-span" style="white-space: pre">                
</span>[provider <span
style="color: #2e0d6e">release</span>];</p><p style="font: normal normal
normal 10px/normal Monaco; margin: 0px"><span class="Apple-tab-span"
style="white-space: pre">               </span>return 
YES;&nbsp;</p><pre>&nbsp;And
ImageProvider is a new class - <span class="Apple-style-span" style="color:
#5c2699; font-family: Monaco; font-size: 10px; white-space: normal"><span
style="color: #000000">ImageProvider : </span>NSObject<span style="color:
#000000"> &lt;</span>QCPlugInOutputImageProvider<span style="color:
#000000">&gt;</span></span></pre><pre>Which has the following
methods:</pre><pre><p style="font: normal normal normal 10px/normal Monaco;
margin: 0px">- (<span style="color: #5c2699">NSRect</span>) imageBounds
{</p><p style="font: normal normal normal 10px/normal Monaco; margin:
0px"><span class="Apple-tab-span" style="white-space: pre">     </span><span
style="color: #2e0d6e">NSLog</span>(<span style="color:
#c41a16">@&quot;***** imageBounds is ***** %f, %f, %f, %f&quot;</span>,
_bounds.<span style="color: #5c2699">origin</span>.<span style="color:
#5c2699">x</span>, _bounds.<span style="color: #5c2699">origin</span>.<span
style="color: #5c2699">y</span>, _bounds.<span style="color:
#5c2699">size</span>.<span style="color: #5c2699">width</span>,
_bounds.<span style="color: #5c2699">size</span>.<span style="color:
#5c2699">height</span>);</p><p style="font: normal normal normal
10px/normal Monaco; margin: 0px"><span class="Apple-tab-span"
style="white-space: pre">       </span><span style="color: 
#aa0d91">return</span>
_bounds;<span class="Apple-tab-span" style="white-space: pre">  </span>//
filled in the exec method above from <span class="Apple-style-span"
style="white-space: normal">[context&nbsp;<span style="color:
#2e0d6e">bounds</span>]</span></p><p style="font: normal normal normal
10px/normal Monaco; margin: 0px">}</p></pre><p style="font: normal normal
normal 10px/normal Monaco; min-height: 14px; margin: 0px">&nbsp;</p><p
style="font: normal normal normal 10px/normal Monaco; min-height: 14px;
margin: 0px">&nbsp;</p><p style="font: normal normal normal 10px/normal
Monaco; margin: 0px">- (<span style="color:
#5c2699">CGColorSpaceRef</span>) imageColorSpace {</p><p style="font:
normal normal normal 10px/normal Monaco; margin: 0px"><span
class="Apple-style-span" style="color: #c41a16"><span style="color:
#000000"><span class="Apple-tab-span" style="white-space:
pre">   </span></span><span style="color: #2e0d6e">NSLog</span><span
style="color: #000000">(</span>@&quot;***** imageColorSpace
*****&quot;<span style="color: #000000">);</span></span>&nbsp;</p><p
style="font: normal normal normal 10px/normal Monaco; margin: 0px"><span
class="Apple-tab-span" style="white-space: pre">        </span><span 
style="color:
#aa0d91">return</span> _colorSpace;</p><p style="font: normal normal normal
10px/normal Monaco; margin: 0px">}</p><p style="font: normal normal normal
10px/normal Monaco; margin: 0px">&nbsp;</p><p style="font: normal normal
normal 10px/normal Monaco; min-height: 14px; margin: 0px">&nbsp;</p><p
style="font: normal normal normal 10px/normal Monaco; margin: 0px">- (<span
style="color: #aa0d91">BOOL</span>) canRenderWithCGLContext:(<span
style="color: #5c2699">CGLContextObj</span>)cgl_ctx {</p><p style="font:
normal normal normal 10px/normal Monaco; color: #c41a16; margin: 0px"><span
style="color: #000000"><span class="Apple-tab-span" style="white-space:
pre">   </span></span><span style="color: #2e0d6e">NSLog</span><span
style="color: #000000">(</span>@&quot;***** canRenderWithCGLContext
*****&quot;<span style="color: #000000">);</span></p><p style="font: normal
normal normal 10px/normal Monaco; color: #aa0d91; margin: 0px"><span
style="color: #000000"><span class="Apple-tab-span" style="white-space:
pre">   </span></span>return<span style="color: #000000"> </span>YES<span
style="color: #000000">;</span></p><p style="font: normal normal normal
10px/normal Monaco; margin: 0px">}</p><p style="font: normal normal normal
10px/normal Monaco; min-height: 14px; margin: 0px">&nbsp;</p><p
style="font: normal normal normal 10px/normal Monaco; margin: 0px">- (<span
style="color: #aa0d91">BOOL</span>) renderWithCGLContext:(<span
style="color: #5c2699">CGLContextObj</span>)cgl_ctx forBounds:(<span
style="color: #5c2699">NSRect</span>)bounds {</p><p style="font: normal
normal normal 10px/normal Monaco; color: #c41a16; margin: 0px"><span
style="color: #000000"><span class="Apple-tab-span" style="white-space:
pre">   </span></span><span style="color: #2e0d6e">NSLog</span><span
style="color: #000000">(</span>@&quot;***** renderWithCGLContext %f, %f,
%f, %f *****&quot;<span style="color: #000000">, bounds.</span><span
style="color: #5c2699">origin</span><span style="color:
#000000">.</span><span style="color: #5c2699">x</span><span style="color:
#000000">, bounds.</span><span style="color: #5c2699">origin</span><span
style="color: #000000">.</span><span style="color: #5c2699">y</span><span
style="color: #000000">, bounds.</span><span style="color:
#5c2699">size</span><span style="color: #000000">.</span><span
style="color: #5c2699">width</span><span style="color: #000000">,
bounds.</span><span style="color: #5c2699">size</span><span style="color:
#000000">.</span><span style="color: #5c2699">height</span><span
style="color: #000000">);</span></p><p style="font: normal normal normal
10px/normal Monaco; color: #c41a16; margin: 0px"><span
class="Apple-tab-span" style="white-space: pre">        </span>// save opengl
state</p><p style="font: normal normal normal 10px/normal Monaco; color:
#c41a16; margin: 0px"><span class="Apple-tab-span" style="white-space:
pre">   </span>// bunch of opengl drawing commands (no extensions or textures
- yet :S)</p><p style="font: normal normal normal 10px/normal Monaco;
color: #c41a16; margin: 0px"><span class="Apple-tab-span"
style="white-space: pre">       </span>// restore opengl state</p><p 
style="font:
normal normal normal 10px/normal Monaco; color: #c41a16; margin: 0px"><span
class="Apple-tab-span" style="white-space: pre">        </span>return YES;</p><p
style="font: normal normal normal 10px/normal Monaco; color: #c41a16;
margin: 0px">}&nbsp;</p><p>&nbsp;</p><p style="font: normal normal normal
10px/normal Monaco; min-height: 14px; margin: 0px">&nbsp;</p><p
style="font: normal normal normal 10px/normal Monaco; min-height: 14px;
margin: 0px">Many thanks in advance,&nbsp;</p><p style="font: normal normal
normal 10px/normal Monaco; min-height: 14px; margin:
0px">&nbsp;</p><pre>&nbsp;</pre><pre>&nbsp;</pre><pre>----------------------------Mehmet
S. [EMAIL PROTECTED]</pre>

 _______________________________________________
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]

Reply via email to