<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:477653133;
mso-list-type:hybrid;
mso-list-template-ids:1485207354 1664753106 67567619 67567621 67567617 67567619 67567621 67567617 67567619 67567621;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">We are using an MiniPC with the following configuration:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">Intel SandyBridge PC Mainboard DH61AG and integrated Intel HD Graphics 3000<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US">Dual OS: Windows 7 32bit and Ubuntu 12.04 32bit<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When using OpenGL sampler objects for configuring textures, on Ubuntu I have to create a mipmap chain by calling “glGenerateMipmap()”. Otherwise the texture sampling will not work (e.g. returns black).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Take the following example:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">// Init<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">int texture;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glGenTextures(1, &texture);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glBindTexture(GL_TEXTURE_2D, texture);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glTexImage2D(…);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">int sampler;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glGenSamplers(1, &sampler);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glSamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, GL_LINEAR);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glSamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, GL_LINEAR);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">// Render loop<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glActiveTexture(GL_TEXTURE0);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glBindTexture(GL_TEXTURE_2D, texture);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glBindSampler(0, sampler);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This works perfectly on Windows but not on Ubuntu. For Ubuntu Linux I have to add the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">//Init<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glTexImage2D(…);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glGenerateMipmap(GL_TEXTURE_2D);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Without the mipmap the texture sampling does not work, although I am not using any mipmaps.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When using the traditional texture filter configuration, this problem does not occur and the code behaves the same on Windows and Linux:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">// Render loop<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glActiveTexture(GL_TEXTURE0);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glBindTexture(GL_TEXTURE_2D, texture);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Seems to be a driver bug for me. Or did I oversee something ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks and best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Mark<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Mark Newiger | Senior Software Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">SeeFront GmbH<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Esplanade 41 | D-20354 Hamburg, Germany<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Office: +49 40 416 22 64-83<o:p></o:p></span></p>
<p class="MsoNormal"><a href="mailto:mark.newiger@seefront.com"><span lang="EN-US" style="color:blue">mark.newiger@seefront.com</span></a><span lang="EN-US"> |
</span><a href="http://www.seefront.com"><span lang="EN-US" style="color:blue">www.seefront.com</span></a><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Managing Director: Christoph Grossmann<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Registered seat of the company: Hamburg<o:p></o:p></span></p>
<p class="MsoNormal">Register Court: Amtsgericht Hamburg HRB 98205 VAT-ID-No. DE248406189<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>