Cyrille<br><br>Go ahead and commit those changes.<br><br>This turned out to be an architecture problem where PowerPC conformed to the casts and x86 didn't.&nbsp; The MacBook here also had the same problem.&nbsp; <br><br>Looks like some further vetting of the code is needed to deal with 'x86 float' issues.
<br><br>cgc<br><br><div><span class="gmail_quote">On 8/21/06, <b class="gmail_sendername">cyrille henry</b> &lt;<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
finally : i replace all GLclampd by float<br>and cast the value on the glClearDepth.<br>like in the attachment.<br><br>this solve the problem.<br><br>is it clean enough to be commited on the cvs?<br><br>cyrille<br><br>cyrille henry a écrit :
<br>&gt; i made more test.<br>&gt; the depth buffer is empty, but not with the correct value.<br>&gt; the problem comes from GEMglClearDepth<br>&gt;<br>&gt; this code :<br>&gt;<br>&gt; /////////////////////////////////////////////////////////
<br>&gt; // Render<br>&gt; //<br>&gt; void GEMglClearDepth :: render(GemState *state) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; glClearDepth (10);&nbsp;&nbsp;// &lt;- fix for test only<br>&gt; post(&quot;depth : %d&quot;, depth);&nbsp;&nbsp;// &lt;- ...<br>&gt;<br>&gt; }
<br>&gt;<br>&gt; gives :<br>&gt; depth : 1073741824 in the log<br>&gt; and the patch is working.<br>&gt;<br>&gt; look like there is a problem with (GLclampd) casting.<br>&gt;<br>&gt;<br>&gt; cyrille<br>&gt;<br>&gt;<br>&gt; chris clepper a écrit :
<br>&gt;&gt; Yes, that mask is only for the depth buffer.&nbsp;&nbsp;The mask for color and<br>&gt;&gt; depth would be 256 + 16384.<br>&gt;&gt; On 8/21/06, *cyrille henry* &lt; <a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr
</a><br>&gt;&gt; &lt;mailto:<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>&gt;&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I add the line :<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; post(&quot;mask %d, depth %d, current %d, color %d&quot;, mask,
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; GL_DEPTH_BUFFER_BIT, GL_CURRENT_BIT, GL_COLOR_BUFFER_BIT);<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; and it gives me :<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; mask 256, depth 256, current 1, color 16384<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; looks OK.
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; ???<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; cyrille<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; chris clepper a écrit :<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; On 8/21/06, *cyrille henry* &lt; <a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr
</a><br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; &lt;mailto:<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>&gt;&gt;&gt; wrote:<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; well, if you see something, then it &quot;work better&quot;
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; i think we have the same problem.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; so, i think the gemglcleardeph and gemglclear does not only<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; clear depth<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; buffer, but also the color buffer.
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp; but i don't really see why, and how to solve this.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; It works on both Nvidia and ATI on OSX, but not ATI on<br>&gt;&gt; Windows.&nbsp;&nbsp;The
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; code only clears the depth buffer, so I can't see what would<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; trigger the<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; clearing of any other buffers.&nbsp;&nbsp;Maybe the GLdefine constants are<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; wrong<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; or there is an OR being done?&nbsp;&nbsp;Try printing out<br>&gt;&gt; GL_DEPTH_BUFFER_BIT,<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; GL_CURRENT_BIT and GL_COLOR_BUFFER_BIT to the console.<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; cgc
<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&gt;<br>&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; _______________________________________________<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; GEM-dev mailing list<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; <a href="mailto:GEM-dev@iem.at">GEM-dev@iem.at</a> &lt;mailto:<a href="mailto:GEM-dev@iem.at">
GEM-dev@iem.at</a>&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; <a href="http://lists.puredata.info/listinfo/gem-dev">http://lists.puredata.info/listinfo/gem-dev</a><br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="http://lists.puredata.info/listinfo/gem-dev">
http://lists.puredata.info/listinfo/gem-dev</a>&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; GEM-dev mailing list<br>&gt; <a href="mailto:GEM-dev@iem.at">GEM-dev@iem.at
</a><br>&gt; <a href="http://lists.puredata.info/listinfo/gem-dev">http://lists.puredata.info/listinfo/gem-dev</a><br>&gt;<br>&gt;<br></blockquote></div><br>