<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.1.92">
</HEAD>
<BODY>
Le jeudi 16 février 2012 à 23:02 +0100, gabor papp a écrit : 
<BLOCKQUOTE TYPE=CITE>
<PRE>
> I don't see the goal of the alternating frame  variable value
> and why don't shorten this in this, using only one texture:
it's not possible. it's an opengl limitation. a pixel-primitive is a 
framebuffer object (fbo) in opengl. this means you can render content into 
it. you can attach textures to an fbo, these are the pixel-primitive 
textures. it is not possible to render into a texture, and use that 
texture at the same time. that's why the texture switching is necessary.

</PRE>
</BLOCKQUOTE>
I get this now. But the script I posted on the previous mail works, and display the same result.<BR>
Maybe it's an openGl driver update or something?<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
> But can I use the different pixels primitives textures to do sort of
> multitexturing, or I'm misunderstanding this.
i'm not sure i understand the question. you can use pixel-primitive 
textures for multitexturing. there's a second parameter of 
(pixels->texture), to ask for the texture with the given the texture 
index.
</PRE>
</BLOCKQUOTE>
<BR>
In fact, I would like to do that:<BR>
<BR>
Pix - Pixels-Renderer<BR>
    \______Tex1<BR>
    \______Tex2<BR>
    \______Tex3<BR>
<BR>
(cond<BR>
    ((mask-update?)<BR>
        (pixels-render-to 2)<BR>
    )<BR>
    (else<BR>
        (pixels-render-to 1)<BR>
    )<BR>
    (pixels-update)<BR>
    (pixels-display 3)<BR>
<BR>
)<BR>
(define (pixels-update)<BR>
    ;The part I don't know how to write<BR>
    Tex3 = Tex1 - Tex2<BR>
)<BR>
<BR>
I don't know how to access to write in a pixels texture. Is the pixels primitive the only one allowed to update textures?<BR>
The idea is to make a multi-texturing ffgl-style scheme-writed.<BR>
<BR>
<BR>
An other question is, if I want to chain multiple ffgl effects,<BR>
One way would be with 10 anticipated textures in a pixels primitive<BR>
Or build one with only 2 textures,then destroy and rebuild with one more texture for each added ffgl effect?<BR>
The point is, is a dozen empty texture is not to heavy in memory if I have like a dozen of pixels primitives?<BR>
I don't know if I am really clear here.<BR>
<BR>
Thanks for the advices.<BR>
<BR>
Ted
</BODY>
</HTML>