View Issue Details

IDProjectCategoryView StatusLast Update
0005665The Dark ModCodingpublic14.07.2021 11:48
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionTDM 2.09 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0005665: Remove DevIL library
DescriptionDevIL library is not necessary today.
Better implement reading/writing of formats directly.
Then remove the library, and Image class wrapping it.
Additional InformationDiscussion of dev forums:
  https://forums.thedarkmod.com/index.php?/topic/21002-devil-and-images-infrastructure
TagsNo tags attached.

Activities

stgatilov

stgatilov

14.07.2021 11:47

administrator   ~0014154

First of all, I implemented direct reading/writing functions for various formats:
  r9443. Implemented direct reading/writing of JPG and PNG files.
  r9444. Reordered code in renderer/Image_files.cpp
So both JPG and PNG can be loaded and written after that.
Note: these are pretty big commits, including the main changes.

Then, there is minor cleaning and generic fixes, not coupled to the main changes:
  r9448. Removed unused makePowerOf2 argument of R_LoadImage.
  r9451. Fixed Linux build after commit 9448.
  r9449. When image is defaulted, save its residency.

Then another pack of major commits:
  r9453. Remove support for PCX image format.
  r9454. Major refactoring in image-loading/writing code.
The goal was to achieve nice interface for image loading, similar to how it was already done for image writing.

These commits are about replacing usages of DevIL-based Image class:
  r9450. SEED now loads its map as CPU-resident idImage instead of using DevIL-based Image class.
  r9452. Mini-screenshots for savegames are now written using idImageWriter instead of DevIL-based Image class.
  r9455. Now mission screenshots are handled using idImageReader/idImageWriter instead of DevIL-based Image class.
  r9456. Removed some random usages of code being removed.
Note that game assets should be loaded and cached as CPU-resident idImage, but other uncached images should be loaded via idImageReader.

The last usage of DevIL code was related to CLightMaterial class.
These commits replace usages:
  r9457. Commented out light material texture fetches in idLight::GetDistanceColor.
  r9458. Check idMaterial for ambient light in idLight::CastsShadow.
And after that lots of no-longer-used code is removed:
  r9459. Removed DevIL-based code: Image, ImageMapManager, CLightMaterial classes.

And the DevIL library is removed in the last commits:
  r9460. Removed DevIL library from build, both on MSVC and CMake.
  r9461. Removed DevIL library, along with all its artefacts.

Issue History

Date Modified Username Field Change
10.07.2021 12:09 stgatilov New Issue
10.07.2021 12:09 stgatilov Status new => assigned
10.07.2021 12:09 stgatilov Assigned To => stgatilov
13.07.2021 17:09 stgatilov Additional Information Updated
14.07.2021 11:47 stgatilov Note Added: 0014154
14.07.2021 11:48 stgatilov Status assigned => resolved
14.07.2021 11:48 stgatilov Resolution open => fixed
14.07.2021 11:48 stgatilov Fixed in Version => TDM 2.10