TexTarga C++ Library Edit

Abstract Edit

TexTarga C++ Libraryは
TexTarga画像データを簡単に扱うためのC++ライブラリです。

Download Edit

http://www.10106.net/~hoboaki/download/textga/textga_cpplib/

Sample Code Edit

すべてを展開すべてを収束
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 
 
 
-
|
|
|
-
|
|
!
|
|
|
|
-
|
|
!
|
|
|
|
|
|
|
|
|
-
|
|
!
|
|
|
|
|
|
!
 
#include <textga/textga.h>
 
void main()
{
    // Load TGAFile
    ::textga::TGAFileLoader loader( "tgaFilePath.tga" );
    if ( !loader.isLoaded() )
    {
        // Load Failed
        return;
    }
    
    // Standard TGA Check
    const ::textga::TGADataAccessor tgaDataAccessor = loader.tgaDataAccessor();
    if ( !tgaDataAccessor.isSupportedTGA() )
    {
        // Not supported tga file
        return;
    }
    
    // Standard TGA Data Access
    // tgaDataAccessor.width();  // get width
    // tgaDataAccessor.height(); // get height
    // tgaDataAccessor.pixelAtIndex(0); // get first pixel data
    // and more. see TGADataAccessor.hpp
    
    // TexTarga Check
    if ( !tgaDataAccessor.isTexTarga() )
    {
        // Not tex targa
        return;
    }
    
    // TexTarga Data Access
    // tgaDataAccessor.pixelFormat() // get PixelFormat(see PixelFormat.hpp)
    // tgaDataAccessor.srcDataPixelAtIndex(0) // get before convert pixel data
    // and more. see TGADataAccessor.hpp
 
}

    ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS