Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: TGA file format

  1. #1
    Intern Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    50

    TGA file format

    hi all,
    i'm going to write my own TGA file loader.
    i made some google search but i could not find good specifications about the TGA 2.0 file format, i know that my question isn't strictly opengl related but i would not join another forum only for a such small question.

    thanks advance.

  2. #2
    Junior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    152
    What about that one?

    Google query "TGA 2.0" got me there. Third result from the top.

  3. #3
    Intern Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    50
    Quote Originally Posted by Agent D View Post
    What about that one?

    Google query "TGA 2.0" got me there. Third result from the top.
    yeah, i saw, but seems complicated to me, i had no problem understanding old TGA file format but this new is giving me more annoy
    another thing i need to solve before start coding my own TGA file importer:
    i'm using SOIL to load images but when i apply a texture to an OBJ that came with it's own texture coords this is what happen
    Click image for larger version. 

Name:	wired texture.jpg 
Views:	17 
Size:	16.9 KB 
ID:	1422

    can you help me with this?
    thank you
    Last edited by Ruggero Visitnin; 09-05-2014 at 03:38 AM.

  4. #4
    Junior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    152
    I just skimmed over the TGA 2.0 specification and as far as I can tell, there is not that much of a difference between the original and the TGA 2.0 format.
    The only difference is an additional footer with extensions headers at the end, which makes it fully backwards compatible to the original format.
    The entries are specified one by one, pretty straightforward to read.

    There's not much usefull data there (apart for gamma and color correction), so if you don't need that, I don't really see a reason for supporting that
    particular format in the first place.

    Concerning your sphere, I assume the texture coordinates are messed up. If you suspect the image loader to do something wrong, try dumping the
    image data to a very simple format (e.g. netpbm) and take a look at it.

  5. #5
    Intern Contributor
    Join Date
    Jul 2014
    Location
    Italy, Lissone
    Posts
    50
    i tried to import a plane that came with texture coordinates and it works well, i double checked my obj loader but it dosen't seem wrong to me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •