~unity-team/nux/texture-atlas

« back to all changes in this revision

Viewing changes to NuxGraphics/IOpenGLSurface.cpp

  • Committer: Nicolas d'Offay
  • Date: 2012-11-16 18:23:48 UTC
  • mfrom: (682.2.25 trunk)
  • Revision ID: nicolas.doffay@canonical.com-20121116182348-ygq13lkwgbugen04
Additional work to get the texture atlas class running as a normal texture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
525
525
    nuxAssert( texheight > 0 ); // Should never happen
526
526
    nuxAssert( size > 0 ); // Should never happen
527
527
 
528
 
    BYTE *DummyBuffer = (BYTE *) calloc(size, sizeof(BYTE));
529
 
 
530
528
    CHECKGL(glPixelStorei(GL_UNPACK_ALIGNMENT, MemAlignment));
531
529
 
532
530
#ifndef NUX_OPENGLES_20
546
544
          texheight,
547
545
          0,                          // border
548
546
          size,                       // image Size
549
 
          DummyBuffer                           // data
 
547
          NULL                        // data
550
548
        );
551
549
        CHECKGL_MSG(glCompressedTexImage2DARB);
552
550
      }
580
578
          0,                          // border
581
579
          GPixelFormats[_BaseTexture->_PixelFormat].Format,
582
580
          GPixelFormats[_BaseTexture->_PixelFormat].type,
583
 
          DummyBuffer);
 
581
          NULL);
584
582
        CHECKGL_MSG(glTexImage2D);
585
583
#ifndef NUX_OPENGLES_20
586
584
      }
602
600
    }
603
601
#endif
604
602
 
605
 
    free(DummyBuffer);
606
 
 
607
 
 
608
603
    //    { //[DEBUGGING - Red Texture]
609
604
    //        // This is going to put some red in the texture.
610
605
    //        // The texture is not compressed.