<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Commentaires pour UpdatePixels (Blog) {</title>
	<link>http://updatepixels.net/2007/blog</link>
	<description>//////////////////////////////////////////////////////////////////////////////////////</description>
	<pubDate>Sat, 31 Jul 2010 14:39:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>Commentaires sur Waaahhhooouuuuu&#8230; !!!! par Ecoute bebe</title>
		<link>http://updatepixels.net/2007/blog/2008/07/12/waaahhhooouuuuu/#comment-961</link>
		<author>Ecoute bebe</author>
		<pubDate>Tue, 22 Jun 2010 23:51:35 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/07/12/waaahhhooouuuuu/#comment-961</guid>
		<description>&lt;strong&gt;Ecoute bebe...&lt;/strong&gt;

Come back, baby come back......</description>
		<content:encoded><![CDATA[<p><strong>Ecoute bebe&#8230;</strong></p>
<p>Come back, baby come back&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur Hard Flowers ////////////////////////////////////////////////////////////// par Flygel</title>
		<link>http://updatepixels.net/2007/blog/2007/08/04/hard-flower/#comment-960</link>
		<author>Flygel</author>
		<pubDate>Thu, 03 Jun 2010 15:52:50 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2007/08/04/hard-flower/#comment-960</guid>
		<description>&lt;strong&gt;Flygel...&lt;/strong&gt;

I found your blog via Google while searching for free settlement letters to creditors and your post regarding news looks very interesting to me. I have a few super websites of my own and I must say that your site is really top notch. Keep up the great ...</description>
		<content:encoded><![CDATA[<p><strong>Flygel&#8230;</strong></p>
<p>I found your blog via Google while searching for free settlement letters to creditors and your post regarding news looks very interesting to me. I have a few super websites of my own and I must say that your site is really top notch. Keep up the great &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// GeekPower ///////////////////////////////////////////////////////// par me piano</title>
		<link>http://updatepixels.net/2007/blog/2010/04/14/geekpower/#comment-959</link>
		<author>me piano</author>
		<pubDate>Tue, 01 Jun 2010 02:56:09 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2010/04/14/geekpower/#comment-959</guid>
		<description>&lt;strong&gt;me piano...&lt;/strong&gt;

You made some good points there. I did a search on the super topic and found most people will agree with your blog Extra website Ezines Links Thanks!....</description>
		<content:encoded><![CDATA[<p><strong>me piano&#8230;</strong></p>
<p>You made some good points there. I did a search on the super topic and found most people will agree with your blog Extra website Ezines Links Thanks!&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Multitouch Wall //////////////////////////////////////////////////// par home articles</title>
		<link>http://updatepixels.net/2007/blog/2010/04/06/multitouch-wall/#comment-958</link>
		<author>home articles</author>
		<pubDate>Thu, 27 May 2010 15:19:07 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2010/04/06/multitouch-wall/#comment-958</guid>
		<description>&lt;strong&gt;home articles...&lt;/strong&gt;

Hola :-) This post was very nicely written, and it also contains a lot of useful extra facts. I enjoyed your professional way of writing this post. Thanks!...</description>
		<content:encoded><![CDATA[<p><strong>home articles&#8230;</strong></p>
<p>Hola :-) This post was very nicely written, and it also contains a lot of useful extra facts. I enjoyed your professional way of writing this post. Thanks!&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur VBO - 10000 Particiles par chineseLocker</title>
		<link>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-886</link>
		<author>chineseLocker</author>
		<pubDate>Fri, 02 Jan 2009 18:18:58 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-886</guid>
		<description>&lt;strong&gt;greatings...&lt;/strong&gt;

Not enought information...</description>
		<content:encoded><![CDATA[<p><strong>greatings&#8230;</strong></p>
<p>Not enought information&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur Waaahhhooouuuuu&#8230; !!!! par Pascal Chirol</title>
		<link>http://updatepixels.net/2007/blog/2008/07/12/waaahhhooouuuuu/#comment-885</link>
		<author>Pascal Chirol</author>
		<pubDate>Mon, 15 Dec 2008 06:22:47 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/07/12/waaahhhooouuuuu/#comment-885</guid>
		<description>Expo moyenne, je trouve pourtant qu'elle a le mérite d'avoir exister... Par ce que être artiste c'est ce de-territorialité de son medium.... car en soit un seul n'est généralement pas suffisant pour s'exprimer !</description>
		<content:encoded><![CDATA[<p>Expo moyenne, je trouve pourtant qu&#8217;elle a le mérite d&#8217;avoir exister&#8230; Par ce que être artiste c&#8217;est ce de-territorialité de son medium&#8230;. car en soit un seul n&#8217;est généralement pas suffisant pour s&#8217;exprimer !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur VBO - 10000 Particiles par Pascal Chirol</title>
		<link>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-588</link>
		<author>Pascal Chirol</author>
		<pubDate>Sun, 05 Oct 2008 06:35:33 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-588</guid>
		<description>I had publish a post about Opengl Superbible...
And the Nehe tuttorial are great...

Have fun....!</description>
		<content:encoded><![CDATA[<p>I had publish a post about Opengl Superbible&#8230;<br />
And the Nehe tuttorial are great&#8230;</p>
<p>Have fun&#8230;.!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur VBO - 10000 Particiles par klim</title>
		<link>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-576</link>
		<author>klim</author>
		<pubDate>Sat, 04 Oct 2008 13:07:02 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-576</guid>
		<description>wow.
that's very kind of you... but why not publish the entire file?
:-P
Do you have any references otherwise (books, sites, ...) ?

REALLY MANY THANKS!!!</description>
		<content:encoded><![CDATA[<p>wow.<br />
that&#8217;s very kind of you&#8230; but why not publish the entire file?<br />
:-P<br />
Do you have any references otherwise (books, sites, &#8230;) ?</p>
<p>REALLY MANY THANKS!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur VBO - 10000 Particiles par Pascal Chirol</title>
		<link>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-571</link>
		<author>Pascal Chirol</author>
		<pubDate>Sat, 04 Oct 2008 07:04:43 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-571</guid>
		<description>Voilou la class principal du fog...</description>
		<content:encoded><![CDATA[<p>Voilou la class principal du fog&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Commentaires sur VBO - 10000 Particiles par Pascal Chirol</title>
		<link>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-570</link>
		<author>Pascal Chirol</author>
		<pubDate>Sat, 04 Oct 2008 07:01:57 +0000</pubDate>
		<guid>http://updatepixels.net/2007/blog/2008/10/01/vbo-10000-particiles/#comment-570</guid>
		<description>package org.yourorghere;

import com.sun.opengl.util.BufferUtil;
import javax.media.opengl.*;
import com.sun.opengl.util.texture.*;
import java.io.*;
import java.net.URL;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;

public class LocalizeFog {

    private String path;
    private float angle;
    private IntBuffer indiceBuffer;
    private Texture texture;
    private FloatBuffer colorBuffer;
    private FloatBuffer vertexBuffer;
    private FloatBuffer test;
    private boolean completed;
    public Life particule[];
    public static int tailleGlobal = 4000;
    public static boolean negFog = false;
    public static boolean show = true;
    public Wind wind;
    public static int nbtoDraw;

    public LocalizeFog(GL gl, int numParticles) {
        vertexCount = numParticles;
        this.path = "images/ellipse.png";
        wind = new Wind();
        loadTexture();
        newList();
        vertexPipe(gl);
        texturePipe(gl);
        indexPipe(gl);
        colorPipe(gl);
        completed = true;
    }

    public void updateXYZ() {
        wind.updateWind();
        for (int i = 0; i &lt; nbtoDraw; i++) {
            particule[i].update();
        }
    }

    public void constrainNBDraw() {
        if (nbtoDraw &gt; vertexCount) {
            nbtoDraw = vertexCount;
        }
    }

    //  GL_ONE_MINUS_SRC_ALPHA
    //  GL_CONSTANT_ALPHA
    // GL_DST_ALPHA
    public void drawPipe(GL gl) {
        if (completed &#038;&#038; show &#038;&#038; nbtoDraw &gt; 0) {
            constrainNBDraw();
            updateXYZ();
            vertexPipe(gl);
            colorPipe(gl);
            gl.glEnable(GL.GL_TEXTURE_2D);
            gl.glDisable(GL.GL_DEPTH_TEST);
            gl.glEnable(GL.GL_BLEND);
            gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_CONSTANT_ALPHA);
            if (!negFog) {
                gl.glBlendEquation(gl.GL_FUNC_REVERSE_SUBTRACT);
            } else {
                gl.glBlendEquation(gl.GL_FUNC_ADD);
            }
            gl.glEnableClientState(GL.GL_COLOR_ARRAY);
            gl.glColorPointer(4, GL.GL_FLOAT, 0, 0);

            /////////////////////////////////////////
            gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
            gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOTexture[0]);
            /////////////////////////////////////////
            //gl.glTexEnvf(gl.GL_TEXTURE_2D, gl.GL_ALPHA_SCALE, 0.1f);
            gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);
            gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOVertices[0]);
            /////////////////////////////////////////
            //gl.glEnableClientState(GL.GL_COLOR_ARRAY);
            //gl.glColorPointer(4, GL.GL_FLOAT, 0, 0);
            /////////////////////////////////////////
            gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
            gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);
            /////////////////////////////////////////
            //gl.glAccum(gl.GL_ACCUM, 0.01f/i);
            // Draw All Of The Triangles At Once
            //gl.glDrawElements(GL.GL_POLYGON, 5, GL.GL_UNSIGNED_INT, indiceBuffer);
            gl.glDrawArrays(GL.GL_QUADS, 0, nbtoDraw);
        // Disable Texture Coord Arrays
        /////////////////////////////////////////
        gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY);
        gl.glDisableClientState(GL.GL_VERTEX_ARRAY);
        gl.glDisableClientState(GL.GL_COLOR_ARRAY);
        /////////////////////////////////////////
         gl.glDisable(GL.GL_BLEND);
        gl.glEnable(gl.GL_DEPTH_TEST);
        //gl.glDisable(GL.GL_TEXTURE_2D);
        }
    }
    //////////////////////////////////////////////////////////////////////////////
    private int[] VBOVertices;
    private int[] VBOTexture;
    private int[] VBOIndice;
    private int[] VBOColor;
    public int vertexCount;

    public void newList() {
        //nbtoDraw = vertexCount;
        particule = new Life[vertexCount];
        for (int i = 0; i &lt; vertexCount; i++) {
            particule[i] = new Life();
        }
    //////////////////////


    }

    public void vertexPipe(GL gl) {
        vertexBuffer = BufferUtil.newFloatBuffer(3 * 4 * vertexCount);
        for (int i = 0; i &lt; vertexCount; i++) {
            ////////////////////////////
            //Math.cos(xyz[i].x);
            vertexBuffer.put(particule[i].x - particule[i].taille);
            vertexBuffer.put(particule[i].y - particule[i].taille);
            vertexBuffer.put(particule[i].z);
            ////////////////////////////
            vertexBuffer.put(particule[i].x + particule[i].taille);
            vertexBuffer.put(particule[i].y - particule[i].taille);
            vertexBuffer.put(particule[i].z);
            ////////////////////////////
            vertexBuffer.put(particule[i].x + particule[i].taille);
            vertexBuffer.put(particule[i].y + particule[i].taille);
            vertexBuffer.put(particule[i].z);
            ////////////////////////////
            vertexBuffer.put(particule[i].x - particule[i].taille);
            vertexBuffer.put(particule[i].y + particule[i].taille);
            vertexBuffer.put(particule[i].z);
        }
        vertexBuffer.flip();
        ////////////////////////////////////////////
        if (VBOVertices == null) {
            VBOVertices = new int[1];
            gl.glGenBuffersARB(1, VBOVertices, 0);
        }
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOVertices[0]);
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 3 * 4 * BufferUtil.SIZEOF_FLOAT, vertexBuffer, GL.GL_STREAM_DRAW);
    /////
    }

    public void texturePipe(GL gl) {
        FloatBuffer textureBuffer = BufferUtil.newFloatBuffer(4 * 2 * vertexCount);
        for (int i = 0; i &lt; vertexCount; i++) {
            textureBuffer.put(0.2f);
            textureBuffer.put(0.2f);
            textureBuffer.put(0.8f);
            textureBuffer.put(0.2f);
            textureBuffer.put(0.8f);
            textureBuffer.put(0.8f);
            textureBuffer.put(0.2f);
            textureBuffer.put(0.8f);
        }
        //////////////////////////////
        textureBuffer.flip();
        //////////////////////////////
        if (VBOTexture == null) {
            VBOTexture = new int[1];
            gl.glGenBuffersARB(1, VBOTexture, 0);
        }
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOTexture[0]);
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 2 * 4 * BufferUtil.SIZEOF_FLOAT, textureBuffer, GL.GL_STATIC_DRAW);
    //////
    }

    public void indexPipe(GL gl) {
        indiceBuffer = BufferUtil.newIntBuffer(4 * vertexCount);
        int count = 0;
        for (int i = 0; i &lt; vertexCount; i++) {
            indiceBuffer.put(count++);
            indiceBuffer.put(count++);
            indiceBuffer.put(count++);
            indiceBuffer.put(count++);
        }
        indiceBuffer.flip();
        ///////////////////////////////////
        if (VBOIndice == null) {
            VBOIndice = new int[1];
            gl.glGenBuffersARB(1, VBOIndice, 0);
        }
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOIndice[0]);
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 4 * BufferUtil.SIZEOF_INT, indiceBuffer, GL.GL_STATIC_DRAW);

    }

    public void colorPipe(GL gl) {
        colorBuffer = BufferUtil.newFloatBuffer(4 * 4 * vertexCount);
        for (int i = 0; i &lt; vertexCount; i++) {
            for (int n = 0; n &lt; 4; n++) {
                colorBuffer.put(particule[i].getA());
                colorBuffer.put(particule[i].getA());
                colorBuffer.put(particule[i].getA());
                colorBuffer.put(particule[i].getA());
            }
        }
        colorBuffer.flip();
        ///////////////////////////////////
        if (VBOColor == null) {
            VBOColor = new int[1];
            gl.glGenBuffersARB(1, VBOColor, 0);
        }
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOColor[0]);
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 4 * 4 * BufferUtil.SIZEOF_FLOAT, colorBuffer, GL.GL_STREAM_DRAW);
    }

    public void loadTexture() {
        try {
            ClassLoader c1 = this.getClass().getClassLoader();
            URL url = c1.getResource(path);
            texture = TextureIO.newTexture(url, true, null);
            System.out.println("Texture as been loaded : " + url.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } catch (GLException e) {
            e.printStackTrace();
        }

    }
    // gl.glGenTextures(1, textureId, 0);
    // gl.glBindTexture(GL.GL_TEXTURE_2D, textureId[0]);
    // gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
    ///gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
    //gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, 4, texture.getImageWidth(), texture.getImageHeight(), 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, texture.);
}
</description>
		<content:encoded><![CDATA[<p>package org.yourorghere;</p>
<p>import com.sun.opengl.util.BufferUtil;<br />
import javax.media.opengl.*;<br />
import com.sun.opengl.util.texture.*;<br />
import java.io.*;<br />
import java.net.URL;<br />
import java.nio.FloatBuffer;<br />
import java.nio.IntBuffer;</p>
<p>public class LocalizeFog {</p>
<p>    private String path;<br />
    private float angle;<br />
    private IntBuffer indiceBuffer;<br />
    private Texture texture;<br />
    private FloatBuffer colorBuffer;<br />
    private FloatBuffer vertexBuffer;<br />
    private FloatBuffer test;<br />
    private boolean completed;<br />
    public Life particule[];<br />
    public static int tailleGlobal = 4000;<br />
    public static boolean negFog = false;<br />
    public static boolean show = true;<br />
    public Wind wind;<br />
    public static int nbtoDraw;</p>
<p>    public LocalizeFog(GL gl, int numParticles) {<br />
        vertexCount = numParticles;<br />
        this.path = &#8220;images/ellipse.png&#8221;;<br />
        wind = new Wind();<br />
        loadTexture();<br />
        newList();<br />
        vertexPipe(gl);<br />
        texturePipe(gl);<br />
        indexPipe(gl);<br />
        colorPipe(gl);<br />
        completed = true;<br />
    }</p>
<p>    public void updateXYZ() {<br />
        wind.updateWind();<br />
        for (int i = 0; i < nbtoDraw; i++) {<br />
            particule[i].update();<br />
        }<br />
    }</p>
<p>    public void constrainNBDraw() {<br />
        if (nbtoDraw > vertexCount) {<br />
            nbtoDraw = vertexCount;<br />
        }<br />
    }</p>
<p>    //  GL_ONE_MINUS_SRC_ALPHA<br />
    //  GL_CONSTANT_ALPHA<br />
    // GL_DST_ALPHA<br />
    public void drawPipe(GL gl) {<br />
        if (completed &#038;&#038; show &#038;&#038; nbtoDraw > 0) {<br />
            constrainNBDraw();<br />
            updateXYZ();<br />
            vertexPipe(gl);<br />
            colorPipe(gl);<br />
            gl.glEnable(GL.GL_TEXTURE_2D);<br />
            gl.glDisable(GL.GL_DEPTH_TEST);<br />
            gl.glEnable(GL.GL_BLEND);<br />
            gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_CONSTANT_ALPHA);<br />
            if (!negFog) {<br />
                gl.glBlendEquation(gl.GL_FUNC_REVERSE_SUBTRACT);<br />
            } else {<br />
                gl.glBlendEquation(gl.GL_FUNC_ADD);<br />
            }<br />
            gl.glEnableClientState(GL.GL_COLOR_ARRAY);<br />
            gl.glColorPointer(4, GL.GL_FLOAT, 0, 0);</p>
<p>            /////////////////////////////////////////<br />
            gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);<br />
            gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOTexture[0]);<br />
            /////////////////////////////////////////<br />
            //gl.glTexEnvf(gl.GL_TEXTURE_2D, gl.GL_ALPHA_SCALE, 0.1f);<br />
            gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);<br />
            gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOVertices[0]);<br />
            /////////////////////////////////////////<br />
            //gl.glEnableClientState(GL.GL_COLOR_ARRAY);<br />
            //gl.glColorPointer(4, GL.GL_FLOAT, 0, 0);<br />
            /////////////////////////////////////////<br />
            gl.glEnableClientState(GL.GL_VERTEX_ARRAY);<br />
            gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);<br />
            /////////////////////////////////////////<br />
            //gl.glAccum(gl.GL_ACCUM, 0.01f/i);<br />
            // Draw All Of The Triangles At Once<br />
            //gl.glDrawElements(GL.GL_POLYGON, 5, GL.GL_UNSIGNED_INT, indiceBuffer);<br />
            gl.glDrawArrays(GL.GL_QUADS, 0, nbtoDraw);<br />
        // Disable Texture Coord Arrays<br />
        /////////////////////////////////////////<br />
        gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY);<br />
        gl.glDisableClientState(GL.GL_VERTEX_ARRAY);<br />
        gl.glDisableClientState(GL.GL_COLOR_ARRAY);<br />
        /////////////////////////////////////////<br />
         gl.glDisable(GL.GL_BLEND);<br />
        gl.glEnable(gl.GL_DEPTH_TEST);<br />
        //gl.glDisable(GL.GL_TEXTURE_2D);<br />
        }<br />
    }<br />
    //////////////////////////////////////////////////////////////////////////////<br />
    private int[] VBOVertices;<br />
    private int[] VBOTexture;<br />
    private int[] VBOIndice;<br />
    private int[] VBOColor;<br />
    public int vertexCount;</p>
<p>    public void newList() {<br />
        //nbtoDraw = vertexCount;<br />
        particule = new Life[vertexCount];<br />
        for (int i = 0; i < vertexCount; i++) {<br />
            particule[i] = new Life();<br />
        }<br />
    //////////////////////</p>
<p>    }</p>
<p>    public void vertexPipe(GL gl) {<br />
        vertexBuffer = BufferUtil.newFloatBuffer(3 * 4 * vertexCount);<br />
        for (int i = 0; i < vertexCount; i++) {<br />
            ////////////////////////////<br />
            //Math.cos(xyz[i].x);<br />
            vertexBuffer.put(particule[i].x - particule[i].taille);<br />
            vertexBuffer.put(particule[i].y - particule[i].taille);<br />
            vertexBuffer.put(particule[i].z);<br />
            ////////////////////////////<br />
            vertexBuffer.put(particule[i].x + particule[i].taille);<br />
            vertexBuffer.put(particule[i].y - particule[i].taille);<br />
            vertexBuffer.put(particule[i].z);<br />
            ////////////////////////////<br />
            vertexBuffer.put(particule[i].x + particule[i].taille);<br />
            vertexBuffer.put(particule[i].y + particule[i].taille);<br />
            vertexBuffer.put(particule[i].z);<br />
            ////////////////////////////<br />
            vertexBuffer.put(particule[i].x - particule[i].taille);<br />
            vertexBuffer.put(particule[i].y + particule[i].taille);<br />
            vertexBuffer.put(particule[i].z);<br />
        }<br />
        vertexBuffer.flip();<br />
        ////////////////////////////////////////////<br />
        if (VBOVertices == null) {<br />
            VBOVertices = new int[1];<br />
            gl.glGenBuffersARB(1, VBOVertices, 0);<br />
        }<br />
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOVertices[0]);<br />
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 3 * 4 * BufferUtil.SIZEOF_FLOAT, vertexBuffer, GL.GL_STREAM_DRAW);<br />
    /////<br />
    }</p>
<p>    public void texturePipe(GL gl) {<br />
        FloatBuffer textureBuffer = BufferUtil.newFloatBuffer(4 * 2 * vertexCount);<br />
        for (int i = 0; i < vertexCount; i++) {<br />
            textureBuffer.put(0.2f);<br />
            textureBuffer.put(0.2f);<br />
            textureBuffer.put(0.8f);<br />
            textureBuffer.put(0.2f);<br />
            textureBuffer.put(0.8f);<br />
            textureBuffer.put(0.8f);<br />
            textureBuffer.put(0.2f);<br />
            textureBuffer.put(0.8f);<br />
        }<br />
        //////////////////////////////<br />
        textureBuffer.flip();<br />
        //////////////////////////////<br />
        if (VBOTexture == null) {<br />
            VBOTexture = new int[1];<br />
            gl.glGenBuffersARB(1, VBOTexture, 0);<br />
        }<br />
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOTexture[0]);<br />
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 2 * 4 * BufferUtil.SIZEOF_FLOAT, textureBuffer, GL.GL_STATIC_DRAW);<br />
    //////<br />
    }</p>
<p>    public void indexPipe(GL gl) {<br />
        indiceBuffer = BufferUtil.newIntBuffer(4 * vertexCount);<br />
        int count = 0;<br />
        for (int i = 0; i < vertexCount; i++) {<br />
            indiceBuffer.put(count++);<br />
            indiceBuffer.put(count++);<br />
            indiceBuffer.put(count++);<br />
            indiceBuffer.put(count++);<br />
        }<br />
        indiceBuffer.flip();<br />
        ///////////////////////////////////<br />
        if (VBOIndice == null) {<br />
            VBOIndice = new int[1];<br />
            gl.glGenBuffersARB(1, VBOIndice, 0);<br />
        }<br />
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOIndice[0]);<br />
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 4 * BufferUtil.SIZEOF_INT, indiceBuffer, GL.GL_STATIC_DRAW);</p>
<p>    }</p>
<p>    public void colorPipe(GL gl) {<br />
        colorBuffer = BufferUtil.newFloatBuffer(4 * 4 * vertexCount);<br />
        for (int i = 0; i < vertexCount; i++) {<br />
            for (int n = 0; n < 4; n++) {<br />
                colorBuffer.put(particule[i].getA());<br />
                colorBuffer.put(particule[i].getA());<br />
                colorBuffer.put(particule[i].getA());<br />
                colorBuffer.put(particule[i].getA());<br />
            }<br />
        }<br />
        colorBuffer.flip();<br />
        ///////////////////////////////////<br />
        if (VBOColor == null) {<br />
            VBOColor = new int[1];<br />
            gl.glGenBuffersARB(1, VBOColor, 0);<br />
        }<br />
        gl.glBindBufferARB(GL.GL_ARRAY_BUFFER, VBOColor[0]);<br />
        gl.glBufferDataARB(GL.GL_ARRAY_BUFFER, vertexCount * 4 * 4 * BufferUtil.SIZEOF_FLOAT, colorBuffer, GL.GL_STREAM_DRAW);<br />
    }</p>
<p>    public void loadTexture() {<br />
        try {<br />
            ClassLoader c1 = this.getClass().getClassLoader();<br />
            URL url = c1.getResource(path);<br />
            texture = TextureIO.newTexture(url, true, null);<br />
            System.out.println(&#8221;Texture as been loaded : &#8221; + url.getPath());<br />
        } catch (IOException e) {<br />
            e.printStackTrace();<br />
        } catch (GLException e) {<br />
            e.printStackTrace();<br />
        }</p>
<p>    }<br />
    // gl.glGenTextures(1, textureId, 0);<br />
    // gl.glBindTexture(GL.GL_TEXTURE_2D, textureId[0]);<br />
    // gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);<br />
    ///gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);<br />
    //gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, 4, texture.getImageWidth(), texture.getImageHeight(), 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, texture.);<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
