Author Topic: PCS2 DevIL Migration?  (Read 3885 times)

0 Members and 1 Guest are viewing this topic.

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
PCS2 DevIL Migration?
After a short discussion between me and m|m on IRC, we've decided it might be a good idea to switch to using a different image library than DevIL, since it hasn't been well maintained has proven to be a bit difficult to get newer versions of MSVS situated to build it. There has been some work done on github for DevIL to try to get cmake rolling on it, so things may change for the better in the coming months.

What are some possible alternatives to DevIL?

Aside from image format decryption and loading, I'm not sure of what the needs of PCS2 is regarding image formats at this point in time, so a second question would be: What are the needs of PCS2 regarding image formats?

Ideally, the image library that we end up choosing will support cmake, or otherwise have a number of packages available for download that developers can choose to suit their particular build system.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: PCS2 DevIL Migration?
PCS2 needs to read the most common texture formats. Right now, these would be DDS, TGA and PNG. Everything else, I feel, can be safely ignored.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Axem

  • 211
Re: PCS2 DevIL Migration?
No more love for 8-bit paletted PCX files?  :(

The world has truly changed.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: PCS2 DevIL Migration?
I guess we'd need those too for retail compatibility.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: PCS2 DevIL Migration?
I guess we'd need those too for retail compatibility.

Yer FSPort will throw a ****storm if they cant do retail compattible
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: PCS2 DevIL Migration?
We can use libpng easily enough, and I've got specs to and experience with .PCX so those two formats shouldn't be a hassle.

Just now grabbed the spec of TGA, shouldn't be too difficult to implement, but a lib that's maintained by smarter folk than I would be preferable. :)

So, that just leaves DDS. Doesn't OpenGL provide some sort of import lib for that?

[EDIT]I've been eyeing up the stb library (which is C) and one of its derivatives Cimg (which is C++ templates) and they seem like they're hassle free-ish at a first glance.
« Last Edit: October 18, 2015, 04:39:09 am by z64555 »
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline m!m

  • 211
Re: PCS2 DevIL Migration?
I looked for a DDS reading library before but I couldn't find anything good so I wrote one myself: https://github.com/asarium/libddsimg

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: PCS2 DevIL Migration?
What about Nvidia's texture tools? https://code.google.com/p/nvidia-texture-tools/
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 
Re: PCS2 DevIL Migration?
Why not libSDL_Image?
wrong answer you see hiding in that asteroid belt are 6 dralthi fighters, a Kilrathi gangbang. -Devereaux

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
:bump:

So we're getting back to PCS2. Has anybody checked on the image libraries lately? I got sidetracked by life...  :nervous:
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Ok, so. I'm going to try giving wxWidget's libraries a shot, since it already comes with loaders that'll cover the bulk of the required image types, excluding DDS. I'm thinking we'll give m|m's loader a chance once the other formats can load up readily, although I'm not quite sure at this moment how that'll end up looking like when it comes time to shoehorn it in.

Texture loading process is basically:
1. Find texture. It's either a loose texture or it's inside of a VP somewhere.
2. Import the texture into a buffer.
3. Bind the buffered texture to OpenGL and save its index.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline m!m

  • 211
My DDS loader currently only support the compressed formats but not the raw RGB formats. If that's a problem then I could try adding that capability.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
because I don't think anyone else mentioned it, why not ResIL? a fork of DevIL that has the added feature of being actively maintained!
should just be a drop in replacement I would think.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline m!m

  • 211
I have been working on a standalone C image loader library and so far it's working pretty well: https://github.com/asarium/imageloader

Currently it has support for DDS, PNG and the formats supported by stb_image (which includes TGA and JPEG) but it is plugin-based so a PCX plugin can be added later.

The code that handles texture uploads seems to be reasonable easy to work with. I'll try to convert it to use my library.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
The PCX spec is real easy to do, I could make a plugin for ya.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline m!m

  • 211
I migrated the PCS2 build system to CMake which enables me to directly integrate imageloader and also unifies the build system across all platforms.
After doing that I replaced the DevIL loading code with code that uses imageloader and so far everything is working great: