<div dir="ltr"><div class="gmail_extra">ok I have managed to rotate my display and convert the touch co-ordinates but I have a lot flashes on the screen. I presume it has to do with the call to glScissor</div><div class="gmail_extra">

<br></div><div class="gmail_extra">At some places in my code I call glScissor and glGetIntegerv modify and retrieve the scissor box. If I don't call these there is no problem I have no flashes but obviously my rendering is wrong as I render outside my rectangle. </div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Does the rotation matrix (either in projection or model view mode) affect the glScissor and glGetIntegerv calls or do I have to manually calculate the rotation for the scissor box?</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">The code I use for scissoring is:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">//---------------------------------------------------------------------------------------------------------</div>

<div class="gmail_extra">RECT Presenter::ClippingRegion() const</div><div class="gmail_extra">{</div><div class="gmail_extra"><span class="" style="white-space:pre">     </span>RECT rc;</div><div class="gmail_extra"><span class="" style="white-space:pre">     </span>SetRect( &rc, 0, 0, mnScreenWidth, mnScreenHeight);</div>

<div class="gmail_extra"><br></div><div class="gmail_extra"><span class="" style="white-space:pre">       </span>if ( glIsEnabled(GL_SCISSOR_TEST) )</div><div class="gmail_extra"><span class="" style="white-space:pre">  </span>{</div>

<div class="gmail_extra"><span class="" style="white-space:pre">              </span>GLint clip[4];</div><div class="gmail_extra"><span class="" style="white-space:pre">               </span>glGetIntegerv( GL_SCISSOR_BOX, &(clip[0]) );</div>
<div class="gmail_extra">
<br></div><div class="gmail_extra"><span class="" style="white-space:pre">                </span>SetRect(<span class="" style="white-space:pre">  </span>&rc, clip[0], clip[1], (clip[0]+clip[2]), (clip[1]+clip[3] );</div><div class="gmail_extra">

<span class="" style="white-space:pre">       </span>}</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="" style="white-space:pre">     </span>return rc;</div><div class="gmail_extra">}</div><div class="gmail_extra">

//---------------------------------------------------------------------------------------------------------</div><div class="gmail_extra">void Presenter::ClippingRegion(const RECT& rc)</div><div class="gmail_extra">{</div>

<div class="gmail_extra"><span class="" style="white-space:pre">      </span>glEnable( GL_SCISSOR_TEST );</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="" style="white-space:pre">  </span>GLsizei width = rc.right - rc.left;</div>

<div class="gmail_extra"> <span class="" style="white-space:pre">     </span>GLsizei height = rc.bottom - rc.top;</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="" style="white-space:pre">  </span>GLint x = rc.left;</div>

<div class="gmail_extra"> <span class="" style="white-space:pre">     </span>GLint y = rc.top;</div><div class="gmail_extra"><span class="" style="white-space:pre">    </span>GLint y_modified = mnScreenHeight-(y+height);</div><div class="gmail_extra">

<br></div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>glScissor(x, y_modified, width, height);</div><div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">
Where in the above code RECT is a struct similar to Microsoft's RECT and SetRect(left, top, right, bottom) is a function similar to Microsoft's for setting left, top, right and bottom co-ordinates for a RECT.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">So do I have to calculate the rotation for the parameters or is it automatically done by the rotation matrix?</div><div><br></div></div></div>