netp_npokon: (дурень)
[personal profile] netp_npokon

#ifdef DEBUG
   /*
    * Let's see if anyone finds this.  If glTexImage2D() is called with
    * a NULL image pointer then load the texture image with something
    * interesting instead of leaving it indeterminate.
    */
   if (data) {
      static const char message[8][32] = {
         "   X   X  XXXXX   XXX     X    ",
         "   XX XX  X      X   X   X X   ",
         "   X X X  X      X      X   X  ",
         "   X   X  XXXX    XXX   XXXXX  ",
         "   X   X  X          X  X   X  ",
         "   X   X  X      X   X  X   X  ",
         "   X   X  XXXXX   XXX   X   X  ",
         "                               "

      };

      GLubyte *imgPtr = data;
      GLint h, i, j, k;
      for (h = 0; h < depth; h++) {
         for (i = 0; i < height; i++) {
            GLint srcRow = 7 - (i % 8);
            for (j = 0; j < width; j++) {
               GLint srcCol = j % 32;
               GLubyte texel = (message[srcRow][srcCol]=='X') ? 255 : 70;
               for (k = 0; k < components; k++) {
                  *imgPtr++ = texel;
               }
            }
         }
      }
   }

#endif


Совершенно случайно найдено в Mesa/src/mesa/main/teximage.c по причинам, о которых я уже писал

Date: 2007-03-14 09:47 pm (UTC)
From: [identity profile] netp-npokon.livejournal.com
Правда, вокруг там #if 000 ... #endif ((

Date: 2007-03-15 05:51 am (UTC)
From: [identity profile] aka-avor.livejournal.com
А ты видел Звёздные войны в ASCII?

Date: 2007-03-15 02:38 pm (UTC)
From: [identity profile] aka-avor.livejournal.com
Я имею в виду "telnet towel.blinkenlights.nl")

Date: 2007-03-15 02:56 pm (UTC)
From: [identity profile] netp-npokon.livejournal.com
A я всего лишь http://www.asciimation.co.nz/
Твоя версия получше однако, глюков нету)

Profile

netp_npokon: (Default)
netp_npokon

April 2017

S M T W T F S
      1
23 45678
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 1st, 2025 05:03 pm
Powered by Dreamwidth Studios