<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Well done, Jon!</p>
    <p>-Pete<br>
    </p>
    <div class="moz-cite-prefix">On 4/22/20 11:43 AM, Jon Wolfe via
      TriEmbed wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:md5:Xx5KcUkIk9lLnUGDWbtZ5g==">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Also, since you’re defining the array at
          global scope, the size of it must be a compile time
          const-expression anyways, so you wouldn’t even need dynamic
          memory allocation.</p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Vec3<unsigned char>
          framebuffer[imageWidth * imageHeight]; <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">would work., instead of using new. That
          also has the advantage that the linker will more easily catch
          size overruns. <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div
          style="mso-element:para-border-div;border:none;border-top:solid
          #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
          <p class="MsoNormal" style="border:none;padding:0in"><b>From:
            </b><a href="mailto:triembed@triembed.org"
              moz-do-not-send="true">Jon Wolfe via TriEmbed</a><br>
            <b>Sent: </b>Wednesday, April 22, 2020 11:36 AM<br>
            <b>To: </b><a href="mailto:triembed@triembed.org"
              moz-do-not-send="true">Jon Wolfe via TriEmbed</a><br>
            <b>Subject: </b>Re: [TriEmbed] TriEmbed Digest, Vol 83,
            Issue 15</p>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I just realized something I’d overlooked. <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Your for loop *<b>is</b>* unexpected in
          your example, it’s outside of any function.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I just fired up the Arduino and tried my
          example template code (with the for loop inside of Setup) ,
          and it worked for me. </p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <br>
      </div>
    </blockquote>
  </body>
</html>