Ok so I did something stupid with the [<span class="il">GEMglLightModeli</span> GL_LIGHT_MODEL_TWO_SIDE GL_FALSE] test which that I connected it to a [gemhead] instead of [gemhead 1]. When I corrected that I did find that indeed the performance changes drastically for the better. OTOH I couldn&#39;t get satisfactory lighting for my environment. It&#39;s a good technique for me to remember and I could probably make it work even for this project with enough experimentation of lighting sources and direction but...<br>

<br>it seems clear to me on my system at least with GL_LIGHT_MODEL_TWO_SIDE set to its default GL_TRUE the bottleneck is the lighting and any gains with a display list or model are lost because of the lighting issue. However I&#39;m finding that I get satisfactory performance and appearance by changing the sphere to have 10 segments instead of 30. With a 10 segment sphere I can make 1000 spheres and straight-line curves at 20fps at about 70% draw on a CPU core. That works for me! :-)<br>

<br>I was curious if for a future project there might be a way I could make a shader that would emulate the local lighting effect and do it more efficiently. Serious exploration with shaders definitely needs to be in my future.<br>

<br>In any case, thanks for all the help!<br><br>-John<br><br><div class="gmail_quote">On Wed, Mar 9, 2011 at 1:55 PM, cyrille henry <span dir="ltr">&lt;<a href="mailto:ch@chnry.net">ch@chnry.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">with lighting on, things did not really change with the model or display list, but rendering sphere is 2 time slower.<br>


<br>
here is the sphere.<br>
<br>
Cyrille<br>
<br>
Le 09/03/2011 20:44, John Harrison a écrit :<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
It appears I&#39;m actually getting better results from [gemlist] too with lighting off. But how do your results change with lighting on? For me, with lighting on, they seem about the same.<br>
<br>
If you have your sphere.obj model with 900 triangles handy, I&#39;d love to try it.<br>
<br>
-John<br>
<br></div><div class="im">
On Wed, Mar 9, 2011 at 12:19 PM, cyrille henry &lt;<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a> &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>&gt;&gt; wrote:<br>
<br>
    here, at 20fps, no lighting, i can draw about 500 model with your sphere.obj.<br>
    1000 sphere 30, and about 3500 display list of sphere 30.<br>
    using an other sphere.obj with about 900 triangles, i&#39;ve got the same performance than with the display list.<br>
<br>
    it really is strange that the sphere is the fastest on your computer.<br>
<br>
    Cyrille<br>
<br>
<br>
    Le 09/03/2011 19:08, John Harrison a écrit :<br>
<br>
        Using Cyrille&#39;s test patch for speed which he sent into the list a week or so ago, I tried creating multiple spheres, gemlists, and models. The sphere is getting the best performance results, unfortunately. Attached is my test patch. I just connected [repeat] to either [sphere] [GEMglCallList] or [model] in the patch. The sphere model I used has probably got way too many points (just found it on the &#39;net) but my hope was that as the vertices were static it wouldn&#39;t matter.<br>


<br></div>
        <a href="http://www.eecs.umich.edu/%7Eguskov/eecs598-1/sphere.obj" target="_blank">http://www.eecs.umich.edu/~guskov/eecs598-1/sphere.obj</a> &lt;<a href="http://www.eecs.umich.edu/%7Eguskov/eecs598-1/sphere.obj" target="_blank">http://www.eecs.umich.edu/%7Eguskov/eecs598-1/sphere.obj</a>&gt;<div class="im">

<br>
<br>
        maybe one with less vertices will help. I can try...<br>
<br>
        -John<br>
<br></div><div class="im">
        On Wed, Mar 9, 2011 at 9:48 AM, chris clepper &lt;<a href="mailto:cgclepper@gmail.com" target="_blank">cgclepper@gmail.com</a> &lt;mailto:<a href="mailto:cgclepper@gmail.com" target="_blank">cgclepper@gmail.com</a>&gt; &lt;mailto:<a href="mailto:cgclepper@gmail.com" target="_blank">cgclepper@gmail.com</a> &lt;mailto:<a href="mailto:cgclepper@gmail.com" target="_blank">cgclepper@gmail.com</a>&gt;&gt;&gt; wrote:<br>


<br>
            A model is the way to go since the vertex data is static.  Ideally for situations like this there would be one object that loads a single model and several clients that just call the display list.  Although there is a lot of memory on GPUs now so 200 models of a sphere won&#39;t take up that much.<br>


<br></div>
            On Wed, Mar 9, 2011 at 10:32 AM, John Harrison &lt;<a href="mailto:johnharrisonwsu@gmail.com" target="_blank">johnharrisonwsu@gmail.com</a> &lt;mailto:<a href="mailto:johnharrisonwsu@gmail.com" target="_blank">johnharrisonwsu@gmail.com</a>&gt; &lt;mailto:<a href="mailto:johnharrisonwsu@gmail.com" target="_blank">johnharrisonwsu@gmail.com</a> &lt;mailto:<a href="mailto:johnharrisonwsu@gmail.com" target="_blank">johnharrisonwsu@gmail.com</a>&gt;&gt;&gt; wrote:<div class="im">

<br>
<br>
<br>
<br>
<br>
                        On Wed, Mar 9, 2011 at 1:59 AM, cyrille henry &lt;<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a> &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>&gt; &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a> &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>&gt;&gt; &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a> &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>&gt; &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a> &lt;mailto:<a href="mailto:ch@chnry.net" target="_blank">ch@chnry.net</a>&gt;&gt;&gt;&gt; wrote:<br>


<br>
                            hello,<br>
<br>
                            - try using a display list to render a sphere, so that every point don&#39;t have to be send for every sphere.<br>
                            see exemple 09.openGL/02.displaylist<br>
                            you can also use a model with a sphere.obj to have the same result.<br>
<br>
                        if the spheres are all moving at once, would a display list still help? Seems like recompilation would have to happen for every sphere for every frame? I haven&#39;t tried the model yet...<br>
<br>
                    yes, the display list will help to render 1 single sphere.<br>
                    you have to call it 200 times.<br>
<br>
<br>
                Ok I&#39;m seeing a huge performance difference between using 200 of [sphere &lt;size-doesn&#39;t-matter&gt; 20] and [sphere &lt;size-doesn&#39;t-matter&gt; 30]. Huge. So if I want to keep the sphere with 30 points, I&#39;m thinking gemlist or model are my answer. I&#39;ll try both and report back, unless you have a strong recommendation for one or the other to save me time.<br>


<br>
                This list is awesome. Where else could I find help like this? :-)<br>
<br>
                -John<br>
<br>
                _______________________________________________<br>
<br></div>
        <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt; &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt;&gt; mailing list<div class="im">

<br>
<br>
                UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
<br>
<br>
<br>
<br>
<br></div>
_______________________________________________<div class="im"><br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt;  <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></blockquote>
</blockquote></div><br><br clear="all"><br>-- <br>John<br><a href="http://alumni.media.mit.edu/~harrison/">http://alumni.media.mit.edu/~harrison/</a><br>