<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OpenGL trouble (HD Graphics 4000) in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420689#M35554</link>
    <description>&lt;P&gt;Hi -Nic&lt;/P&gt;&lt;P&gt;Thank you for the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample, the polygon was tried on one.&lt;/P&gt;&lt;P&gt;But I would like to know which polygon is in front,&lt;/P&gt;&lt;P&gt;when two or more polygons exist.&lt;/P&gt;&lt;P&gt;Then, I watched the "buff[2]".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It means distance of the depth direction on 3D-space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HD graphics 4000 returned zero,&lt;/P&gt;&lt;P&gt;however other video cards returned non-zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case of zero value,&lt;/P&gt;&lt;P&gt;It won't know the positional relation on 3D-space of two or more polygons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2013 02:47:26 GMT</pubDate>
    <dc:creator>idata</dc:creator>
    <dc:date>2013-01-08T02:47:26Z</dc:date>
    <item>
      <title>OpenGL trouble (HD Graphics 4000)</title>
      <link>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420687#M35552</link>
      <description>&lt;P&gt;Windows 7 64bit VisualC/C++ 2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear Sir, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a trouble on HD Graphics 4000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the following code is executed,&lt;/P&gt;&lt;P&gt;zero will be written to a selection buffer by PreparePick() function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But zero is not written in other video cards. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do for me to receive a value correctly? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I am poor at English. Please answer with an easy word.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ******************************&lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include "glut.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# define max(a,b) (((a) &amp;gt; (b)) ? (a) : (b))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void PreparePick( unsigned int size, unsigned int* buff )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  ::glSelectBuffer( size/4, buff );&lt;/P&gt;&lt;P&gt;  ::glRenderMode ( GL_SELECT );&lt;/P&gt;&lt;P&gt;  ::glInitNames ();&lt;/P&gt;&lt;P&gt;  ::glPushName (0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ::glMatrixMode (GL_PROJECTION);&lt;/P&gt;&lt;P&gt;  ::glPushMatrix ();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ::glLoadIdentity();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int CleanupPick()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  ::glMatrixMode (GL_PROJECTION);&lt;/P&gt;&lt;P&gt;  ::glPopMatrix();&lt;/P&gt;&lt;P&gt;  ::glFlush();&lt;/P&gt;&lt;P&gt;  int iR=::glRenderMode(GL_RENDER);&lt;/P&gt;&lt;P&gt;  iR=max( iR, 0 );&lt;/P&gt;&lt;P&gt;  return iR;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void TestBufferDepth()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  int hits;&lt;/P&gt;&lt;P&gt;  GLuint buff[4096];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ::glMatrixMode(GL_MODELVIEW);&lt;/P&gt;&lt;P&gt;  ::glPushMatrix();&lt;/P&gt;&lt;P&gt;  ::glLoadIdentity();&lt;/P&gt;&lt;P&gt;  PreparePick( 4000, buff );&lt;/P&gt;&lt;P&gt;  ::glOrtho( -100, 100, -100, 100, -1000, 1000 );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ::glLoadName(1);&lt;/P&gt;&lt;P&gt;  ::glBegin( GL_QUADS );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  const double z = 0.0;&lt;/P&gt;&lt;P&gt;  double work[3];&lt;/P&gt;&lt;P&gt;  work[0] = -100.0;&lt;/P&gt;&lt;P&gt;  work[1] = 100.0;&lt;/P&gt;&lt;P&gt;  work[2] = z;&lt;/P&gt;&lt;P&gt;  ::glVertex3dv( work );&lt;/P&gt;&lt;P&gt;  work[0] = -100.0;&lt;/P&gt;&lt;P&gt;  work[1] = -100.0;&lt;/P&gt;&lt;P&gt;  work[2] = z;&lt;/P&gt;&lt;P&gt;  ::glVertex3dv( work );&lt;/P&gt;&lt;P&gt;  work[0] = 100.0;&lt;/P&gt;&lt;P&gt;  work[1] = -100.0;&lt;/P&gt;&lt;P&gt;  work[2] = z;&lt;/P&gt;&lt;P&gt;  ::glVertex3dv( work );&lt;/P&gt;&lt;P&gt;  work[0] = 100.0;&lt;/P&gt;&lt;P&gt;  work[1] = 100.0;&lt;/P&gt;&lt;P&gt;  work[2] = z;&lt;/P&gt;&lt;P&gt;  ::glVertex3dv( work );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ::glEnd();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  hits = CleanupPick();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ::glMatrixMode(GL_MODELVIEW);&lt;/P&gt;&lt;P&gt;  ::glPopMatrix();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if( hits ){&lt;/P&gt;&lt;P&gt;  unsigned int bit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  bit = buff[2];&lt;/P&gt;&lt;P&gt;  std::cout &amp;lt;&amp;lt; "hit bit = "&amp;lt;&amp;lt; bit &amp;lt;&amp;lt; '\n';&lt;/P&gt;&lt;P&gt;  }else{&lt;/P&gt;&lt;P&gt;  std::cout &amp;lt;&amp;lt; "no hit"&amp;lt;&amp;lt;'\n';&lt;/P&gt;&lt;P&gt;  }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void GLUT_INIT()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  glutInitDisplayMode(GLUT_RGBA| GLUT_DOUBLE | GLUT_DEPTH);&lt;/P&gt;&lt;P&gt;  glutInitWindowSize(640,480);&lt;/P&gt;&lt;P&gt;  glutCreateWindow("Depth Buffer");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char **argv)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;  glutInit(&amp;amp;argc,argv);&lt;/P&gt;&lt;P&gt;  GLUT_INIT();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TestBufferDepth();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2012 08:29:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420687#M35552</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2012-12-21T08:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL trouble (HD Graphics 4000)</title>
      <link>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420688#M35553</link>
      <description>&lt;P&gt;Hi suzuki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We do not specifically work on code, but can you tell us what it is exactly you are trying to do?  We may or may not be able to help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;-Nic&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2012 23:45:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420688#M35553</guid>
      <dc:creator>NICHOLAS_F_Intel</dc:creator>
      <dc:date>2012-12-27T23:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL trouble (HD Graphics 4000)</title>
      <link>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420689#M35554</link>
      <description>&lt;P&gt;Hi -Nic&lt;/P&gt;&lt;P&gt;Thank you for the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample, the polygon was tried on one.&lt;/P&gt;&lt;P&gt;But I would like to know which polygon is in front,&lt;/P&gt;&lt;P&gt;when two or more polygons exist.&lt;/P&gt;&lt;P&gt;Then, I watched the "buff[2]".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It means distance of the depth direction on 3D-space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HD graphics 4000 returned zero,&lt;/P&gt;&lt;P&gt;however other video cards returned non-zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the case of zero value,&lt;/P&gt;&lt;P&gt;It won't know the positional relation on 3D-space of two or more polygons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2013 02:47:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/OpenGL-trouble-HD-Graphics-4000/m-p/420689#M35554</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2013-01-08T02:47:26Z</dc:date>
    </item>
  </channel>
</rss>

