├── .gitattributes ├── .gitignore ├── .travis.yml ├── DevIL-docs ├── .cvsignore ├── Design Documents │ ├── New File Formats.pdf │ ├── New File Formats.tex │ ├── Version Number.pdf │ └── Version Number.tex ├── DevIL Manual.doc ├── DevIL Manual.pdf ├── DevIL Reference Guide - French Version.doc ├── DevIL Reference Guide.doc ├── DevIL Reference Guide.pdf ├── DevilDoc.dtd ├── DevilDoc.xml ├── DocBuilder.java ├── Makefile ├── ToDo └── images │ └── DevIL.gif ├── DevIL-utils ├── DevIL Install │ ├── DevIL + Uninstall + Modern UI.nsi │ ├── DevIL + Uninstall.nsi │ └── DevIL.nsi └── DevIL Version │ ├── DevIL Version.cpp │ ├── DevIL Version.sln │ ├── DevIL Version.vcproj │ ├── IL Unicode.rc │ ├── IL.rc │ └── Version Numbers.txt ├── DevIL ├── AUTHORS ├── CMakeLists.txt ├── COPYING ├── CREDITS ├── ChangeLog ├── DevIL Website.url ├── INSTALL ├── Libraries.txt ├── NEWS ├── README.cmake ├── README.md ├── TODO ├── bindings │ ├── DotNet │ │ ├── AssemblyInfo.cpp │ │ ├── COPYING.txt │ │ ├── DevIL.NET.cpp │ │ ├── DevIL.NET.sln │ │ ├── DevIL.NET.vcproj │ │ ├── ImageViewCs │ │ │ ├── App.ico │ │ │ ├── AssemblyInfo.cs │ │ │ ├── ImageViewCs.csproj │ │ │ ├── ImageViewCs.csproj.user │ │ │ ├── frmImageView.cs │ │ │ └── frmImageView.resx │ │ ├── ImageViewVb │ │ │ ├── AssemblyInfo.vb │ │ │ ├── ImageViewVb.vbproj │ │ │ ├── ImageViewVb.vbproj.user │ │ │ ├── frmImageView.resx │ │ │ └── frmImageView.vb │ │ └── vcproj vs2005 │ │ │ ├── DevIL.NET.sln │ │ │ └── DevIL.NET.vcproj │ ├── Mathematica │ │ ├── DevIL Interface.c │ │ ├── DevIL Mathematica.sln │ │ ├── DevIL Mathematica.vcproj │ │ └── DevIL.nb │ ├── README.bindings │ ├── README.txt │ ├── delphi │ │ ├── openil.pas │ │ ├── openilu.pas │ │ ├── openilut.pas │ │ └── readme.1st │ ├── fortran │ │ ├── example.f │ │ └── fortran_wrapper.c │ ├── powerbasic │ │ ├── il.inc │ │ ├── ilu.inc │ │ ├── ilut.inc │ │ ├── imgconv.bas │ │ ├── imginfo.bas │ │ └── imgview.bas │ ├── python │ │ ├── DevIL-Linux.py │ │ ├── DevIL-Windows.py │ │ ├── DevIL.pyd │ │ ├── deviltest.py │ │ ├── readme.txt │ │ └── test.py │ └── visual basic │ │ ├── VBreadme.txt │ │ ├── il.bas │ │ ├── ilu.bas │ │ └── ilut.bas ├── cmake │ ├── Modules │ │ ├── FindLCMS2.cmake │ │ ├── FindMNG.cmake │ │ └── FindlibSquish.cmake │ └── cmake_build.bat ├── cpp wrapper │ ├── Cpp Wrapper.dsp │ ├── Cpp Wrapper.mak │ ├── Cpp Wrapper.vcproj │ └── il_wrap.cpp ├── data │ └── DevIL_logo.jpg ├── docs │ ├── DevIL_manual.texi │ ├── devil.doxyfile │ ├── generate-images.sh │ └── images │ │ ├── DevIL.jpg │ │ ├── DevIL.png │ │ ├── devil_msvc_include.png │ │ ├── devil_msvc_lib.png │ │ ├── ilu_small_stairway_alienify.jpg │ │ ├── ilu_small_stairway_blurAvg_10.jpg │ │ ├── ilu_small_stairway_blurGaussian_10.jpg │ │ ├── ilu_small_stairway_contrast_0.4.jpg │ │ ├── ilu_small_stairway_contrast_1.7.jpg │ │ ├── ilu_small_stairway_emboss.jpg │ │ ├── ilu_small_stairway_equalize.jpg │ │ ├── ilu_small_stairway_gammaCorrect_0.7.jpg │ │ ├── ilu_small_stairway_gammaCorrect_1.6.jpg │ │ ├── ilu_small_stairway_mirror.jpg │ │ ├── ilu_small_stairway_negative.jpg │ │ ├── ilu_small_stairway_noisify_0.1.jpg │ │ ├── ilu_small_stairway_noisify_0.8.jpg │ │ ├── ilu_small_stairway_pixelize_5.jpg │ │ ├── ilu_small_stairway_saturate1f_0.6.jpg │ │ ├── ilu_small_stairway_sharpen_1.8_2.jpg │ │ ├── ilu_small_stairway_sharpen_2.1_3.jpg │ │ ├── ilu_small_stairway_wave_1.2.jpg │ │ ├── original_stairway.jpg │ │ └── small_stairway.jpg ├── examples │ ├── CMakeLists.txt │ ├── Examples-vc2015.sln │ ├── Examples-vc8.sln │ ├── Examples-vc9.sln │ ├── allegro_example │ │ └── allegtest.c │ ├── animation_example │ │ ├── AnimTest.cpp │ │ ├── AnimTest.rc │ │ ├── OpenIL.ico │ │ ├── animation_example-vc2015.vcxproj │ │ ├── animation_example-vc8.vcproj │ │ ├── animation_example-vc9.vcproj │ │ └── resource.h │ ├── cpp_wrapper_example │ │ ├── cpp_wrapper_example-vc2015.vcxproj │ │ ├── cpp_wrapper_example-vc8.vcproj │ │ ├── cpp_wrapper_example-vc9.vcproj │ │ └── il_wrap.cpp │ ├── direct3d_example │ │ ├── CMakeLists.txt │ │ ├── D3DTest.dsp │ │ ├── d3dtest.cpp │ │ ├── direct3d_example-vc2015.vcxproj │ │ ├── direct3d_example-vc8.vcproj │ │ └── direct3d_example-vc9.vcproj │ ├── iller │ │ ├── README │ │ ├── iller.cpp │ │ └── iller.h │ ├── opengl_example │ │ ├── CMakeLists.txt │ │ ├── gltest.c │ │ ├── gltest.h │ │ ├── opengl_example-vc2015.vcxproj │ │ ├── opengl_example-vc8.vcproj │ │ └── opengl_example-vc9.vcproj │ ├── override_example │ │ ├── iotest.c │ │ ├── override_example-vc2015.vcxproj │ │ ├── override_example-vc8.vcproj │ │ └── override_example-vc9.vcproj │ ├── register_read_example │ │ ├── readtest.c │ │ ├── register_read_example-vc2015.vcxproj │ │ ├── register_read_example-vc8.vcproj │ │ └── register_read_example-vc9.vcproj │ ├── sdl_example │ │ ├── sdl_example-vc2015.vcxproj │ │ ├── sdl_example-vc8.vcproj │ │ ├── sdl_example-vc9.vcproj │ │ └── sdl_test.c │ ├── simple_example │ │ ├── simple.c │ │ ├── simple_example-vc2015.vcxproj │ │ ├── simple_example-vc8.vcproj │ │ └── simple_example-vc9.vcproj │ ├── volume_example │ │ ├── 3dtest.c │ │ ├── 3dtest.h │ │ ├── volume_example-vc2015.vcxproj │ │ ├── volume_example-vc8.vcproj │ │ └── volume_example-vc9.vcproj │ └── windows_example │ │ ├── BatchConv.cpp │ │ ├── WindowsTest.cpp │ │ ├── WindowsTest.dep │ │ ├── WindowsTest.h │ │ ├── WindowsTest.mak │ │ ├── WindowsTest.rc │ │ ├── WindowsTest.vcproj │ │ ├── resource.h │ │ ├── resources │ │ ├── 3d.ico │ │ ├── DevIL Logo.ico │ │ ├── OpenIL.ico │ │ ├── OpenIL_address_bar.ico │ │ ├── bmp.ico │ │ ├── gif.ico │ │ ├── graphic.ico │ │ ├── jpg.ico │ │ └── psd.ico │ │ ├── windows_example-vc2015.vcxproj │ │ ├── windows_example-vc8.vcproj │ │ ├── windows_example-vc9.vcproj │ │ ├── windows_example.cpp │ │ ├── windows_example.rc │ │ └── windowstest-vc8.vcproj ├── include │ └── IL │ │ ├── DevIL.i │ │ ├── build-lua │ │ ├── build-python │ │ ├── devil_cpp_wrapper.hpp │ │ ├── devil_internal_exports.h │ │ ├── il.h │ │ ├── il_wrap.h │ │ ├── ilu.h │ │ ├── ilu_region.h │ │ ├── ilut.h │ │ ├── ilut_config.h │ │ ├── luadevil.c │ │ └── stamp-h.in ├── src-IL │ ├── CMakeLists.txt │ ├── cmake │ │ ├── FindLCMS.cmake │ │ ├── FindNVTT.cmake │ │ ├── FindOpenEXR.cmake │ │ └── README │ ├── include │ │ ├── .cvsignore │ │ ├── altivec_common.h │ │ ├── altivec_typeconversion.h │ │ ├── config.h.cmake.in │ │ ├── il_alloc.h │ │ ├── il_bits.h │ │ ├── il_bmp.h │ │ ├── il_dcx.h │ │ ├── il_dds.h │ │ ├── il_doompal.h │ │ ├── il_dpx.h │ │ ├── il_endian.h │ │ ├── il_exr.h │ │ ├── il_files.h │ │ ├── il_gif.h │ │ ├── il_hdr.h │ │ ├── il_icns.h │ │ ├── il_icon.h │ │ ├── il_internal.h │ │ ├── il_jp2.h │ │ ├── il_jpeg.h │ │ ├── il_lif.h │ │ ├── il_manip.h │ │ ├── il_mdl.h │ │ ├── il_pal.h │ │ ├── il_pcx.h │ │ ├── il_pic.h │ │ ├── il_pnm.h │ │ ├── il_psd.h │ │ ├── il_psp.h │ │ ├── il_q2pal.h │ │ ├── il_register.h │ │ ├── il_rle.h │ │ ├── il_sgi.h │ │ ├── il_stack.h │ │ ├── il_states.h │ │ ├── il_targa.h │ │ ├── il_utx.h │ │ ├── il_vtf.h │ │ ├── il_wdp.h │ │ └── rg_etc1.h │ ├── msvc │ │ ├── IL Unicode.rc │ │ ├── IL.rc │ │ ├── il.def │ │ ├── resource.h │ │ └── resources │ │ │ └── IL Logo.ico │ ├── msvc8 │ │ ├── IL Unicode.rc │ │ └── IL.rc │ ├── msvc9 │ │ ├── IL Unicode.rc │ │ └── IL.rc │ ├── pkgconfig │ │ ├── IL.pc.cmake.in │ │ └── README │ └── src │ │ ├── altivec_common.cpp │ │ ├── altivec_typeconversion.cpp │ │ ├── il_alloc.cpp │ │ ├── il_bits.cpp │ │ ├── il_blp.cpp │ │ ├── il_bmp.cpp │ │ ├── il_convbuff.cpp │ │ ├── il_convert.cpp │ │ ├── il_cut.cpp │ │ ├── il_dcx.cpp │ │ ├── il_dds-save.cpp │ │ ├── il_dds.cpp │ │ ├── il_devil.cpp │ │ ├── il_dicom.cpp │ │ ├── il_doom.cpp │ │ ├── il_dpx.cpp │ │ ├── il_endian.cpp │ │ ├── il_error.cpp │ │ ├── il_exr.c │ │ ├── il_exr.cpp │ │ ├── il_fastconv.cpp │ │ ├── il_files.cpp │ │ ├── il_fits.cpp │ │ ├── il_ftx.cpp │ │ ├── il_gif.cpp │ │ ├── il_hdr.cpp │ │ ├── il_header.cpp │ │ ├── il_icns.cpp │ │ ├── il_icon.cpp │ │ ├── il_iff.cpp │ │ ├── il_ilbm.cpp │ │ ├── il_internal.cpp │ │ ├── il_io.cpp │ │ ├── il_iwi.cpp │ │ ├── il_jp2.cpp │ │ ├── il_jpeg.cpp │ │ ├── il_ktx.cpp │ │ ├── il_lif.cpp │ │ ├── il_main.cpp │ │ ├── il_manip.cpp │ │ ├── il_mdl.cpp │ │ ├── il_mng.cpp │ │ ├── il_mp3.cpp │ │ ├── il_neuquant.cpp │ │ ├── il_nvidia.cpp │ │ ├── il_pal.cpp │ │ ├── il_pcd.cpp │ │ ├── il_pcx.cpp │ │ ├── il_pic.cpp │ │ ├── il_pix.cpp │ │ ├── il_png.cpp │ │ ├── il_pnm.cpp │ │ ├── il_profiles.cpp │ │ ├── il_psd.cpp │ │ ├── il_psp.cpp │ │ ├── il_pxr.cpp │ │ ├── il_quantizer.cpp │ │ ├── il_raw.cpp │ │ ├── il_rawdata.cpp │ │ ├── il_register.cpp │ │ ├── il_rle.cpp │ │ ├── il_rot.cpp │ │ ├── il_scitex.cpp │ │ ├── il_sgi.cpp │ │ ├── il_size.cpp │ │ ├── il_squish.cpp │ │ ├── il_stack.cpp │ │ ├── il_states.cpp │ │ ├── il_sun.cpp │ │ ├── il_targa.cpp │ │ ├── il_texture.cpp │ │ ├── il_tiff.cpp │ │ ├── il_tpl.cpp │ │ ├── il_utility.cpp │ │ ├── il_utx.c │ │ ├── il_utx.cpp │ │ ├── il_vtf.cpp │ │ ├── il_wal.cpp │ │ ├── il_wbmp.cpp │ │ ├── il_wdp.cpp │ │ ├── il_xpm.cpp │ │ └── rg_etc1.cpp ├── src-ILU │ ├── CMakeLists.txt │ ├── ilur │ │ └── ilur.c │ ├── include │ │ ├── ilu_alloc.h │ │ ├── ilu_error │ │ │ ├── ilu_err-arabic.h │ │ │ ├── ilu_err-dutch.h │ │ │ ├── ilu_err-english.h │ │ │ ├── ilu_err-french.h │ │ │ ├── ilu_err-german.h │ │ │ ├── ilu_err-italian.h │ │ │ ├── ilu_err-japanese.h │ │ │ └── ilu_err-spanish.h │ │ ├── ilu_filter.h │ │ ├── ilu_internal.h │ │ ├── ilu_region.h │ │ └── ilu_states.h │ ├── msvc │ │ ├── ILU Unicode.rc │ │ ├── ILU.rc │ │ ├── ilu.def │ │ ├── resource.h │ │ └── resources │ │ │ └── IL Logo.ico │ ├── pkgconfig │ │ ├── ILU.pc.cmake.in │ │ └── README │ └── src │ │ ├── ilu_alloc.cpp │ │ ├── ilu_error.cpp │ │ ├── ilu_filter.cpp │ │ ├── ilu_filter_rcg.cpp │ │ ├── ilu_internal.cpp │ │ ├── ilu_main.cpp │ │ ├── ilu_manip.cpp │ │ ├── ilu_mipmap.cpp │ │ ├── ilu_noise.cpp │ │ ├── ilu_region.cpp │ │ ├── ilu_rotate.cpp │ │ ├── ilu_scale.cpp │ │ ├── ilu_scale2d.cpp │ │ ├── ilu_scale3d.cpp │ │ ├── ilu_scaling.cpp │ │ ├── ilu_states.cpp │ │ └── ilu_utilities.cpp ├── src-ILUT │ ├── CMakeLists.txt │ ├── include │ │ ├── ilut_allegro.h │ │ ├── ilut_internal.h │ │ ├── ilut_opengl.h │ │ └── ilut_states.h │ ├── msvc │ │ ├── ILUT Unicode.rc │ │ ├── ILUT.rc │ │ ├── ilut.def │ │ ├── resource.h │ │ └── resources │ │ │ └── IL Logo.ico │ ├── pkgconfig │ │ ├── ILUT.pc.cmake.in │ │ └── README │ └── src │ │ ├── ilut_allegro.cpp │ │ ├── ilut_directx.cpp │ │ ├── ilut_directx10.cpp │ │ ├── ilut_directx9.cpp │ │ ├── ilut_directxm.cpp │ │ ├── ilut_internal.cpp │ │ ├── ilut_main.cpp │ │ ├── ilut_opengl.cpp │ │ ├── ilut_sdlsurface.cpp │ │ ├── ilut_states.cpp │ │ ├── ilut_win32.cpp │ │ └── ilut_x11.cpp └── test │ ├── Benchmark │ ├── CMakeLists.txt │ ├── Makefile │ └── benchmark.c │ ├── CMakeLists.txt │ ├── DDrawTest │ ├── DDrawTest.dsp │ ├── SOURCE │ │ ├── DirectX.cpp │ │ ├── beScreen.cpp │ │ └── beSurface.cpp │ ├── header │ │ ├── Render2DCore.h │ │ ├── beScreen.h │ │ ├── beSurface.h │ │ └── beTypes.h │ └── test_window │ │ ├── DDrawTest.rc │ │ ├── WindowTest.cpp │ │ ├── main.cpp │ │ ├── resource.h │ │ └── resources │ │ ├── 3d.ico │ │ ├── OpenIL Address Bar Logo.ico │ │ ├── bmp.ico │ │ ├── gif.ico │ │ ├── graphic.ico │ │ ├── jpg.ico │ │ ├── psd.ico │ │ └── rt_targa.bin │ ├── Fltk │ ├── Fltk.dsp │ ├── fltk.cpp │ └── list_visuals.cxx │ ├── MdiTest │ ├── MdiTest.cpp │ ├── MdiTest.dsp │ ├── MdiTest.h │ ├── MdiTest.rc │ ├── resource.h │ └── resources │ │ ├── 3d.ico │ │ ├── OpenIL Address Bar Logo.ico │ │ ├── OpenIL Logo.ico │ │ ├── bmp.ico │ │ ├── gif.ico │ │ ├── graphic.ico │ │ ├── jpg.ico │ │ └── psd.ico │ ├── Stress │ ├── StressTest.dsp │ ├── StressTest.vcproj │ ├── mmgr.cpp │ ├── mmgr.h │ ├── nommgr.h │ └── stress.cpp │ ├── URar │ ├── test.c │ ├── test.dsp │ ├── test.dsw │ ├── urarlib.c │ └── urarlib.h │ ├── UnitTest │ ├── CMakeLists.txt │ ├── Data │ │ ├── Cardinal.gif │ │ └── Logo.png │ ├── ILTest.cpp │ ├── ILTest.h │ ├── ILUTest.cpp │ ├── ILUTest.h │ ├── Results │ │ └── Readme.txt │ ├── UnitTest.cpp │ └── cmake │ │ └── Findcppunit.cmake │ ├── Unzip │ ├── NV_UNZIP.H │ ├── UNZIP.H │ ├── nv_unzip.cpp │ └── unzip.c │ ├── VolTex │ ├── VolTex.dsp │ └── voltex.c │ ├── format_test │ ├── format_checks.sh.in │ ├── ilu_checks.sh.in │ └── testil.c │ └── old │ ├── doom.cpp │ └── testil.cpp ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.c text 7 | *.h text 8 | 9 | # Declare files that will always have CRLF line endings on checkout. 10 | *.sln text eol=crlf 11 | 12 | # Denote all files that are truly binary and should not be modified. 13 | *.png binary 14 | *.jpg binary 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeFiles/ 2 | Makefile 3 | cmake_install.cmake 4 | *.swp 5 | 6 | /src-IL/IL.pc 7 | /src-ILU/ILU.pc 8 | /src-ILUT/ILUT.pc 9 | /DevIL/src-IL/include/config.h 10 | /CMakeCache.txt 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # 2 | # libdevil travis hook 3 | # 4 | 5 | language: cpp 6 | dist: trusty 7 | sudo: required 8 | 9 | compiler: 10 | - clang 11 | - gcc 12 | before_script: 13 | - sudo apt-get install libpng12-dev zlib1g-dev libjpeg-dev libtiff4-dev libmng-dev libjasper-dev liblcms1-dev freeglut3-dev libsdl1.2-dev liblcms2-dev libcppunit-dev 14 | script: 15 | - cmake DevIL 16 | - make all UnitTest benchmark 17 | -------------------------------------------------------------------------------- /DevIL-docs/.cvsignore: -------------------------------------------------------------------------------- 1 | .project 2 | -------------------------------------------------------------------------------- /DevIL-docs/Design Documents/New File Formats.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/Design Documents/New File Formats.pdf -------------------------------------------------------------------------------- /DevIL-docs/Design Documents/Version Number.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/Design Documents/Version Number.pdf -------------------------------------------------------------------------------- /DevIL-docs/Design Documents/Version Number.tex: -------------------------------------------------------------------------------- 1 | \documentclass[letterpaper,10pt]{article} 2 | \title{Changing DevIL Version Number} 3 | \author{Denton Woods} 4 | \date{March 2009} 5 | \usepackage{amsmath,graphicx,fullpage} 6 | \begin{document} 7 | \maketitle 8 | 9 | \section*{Microsoft Visual C++ Resource Files} 10 | \subsection*{Unicode Resource Files} 11 | \emph{src-IL/msvc9/IL Unicode.rc}, \emph{src-IL/msvc8/IL Unicode.rc}, \emph{src-ILU/msvc9/ILU Unicode.rc}, \emph{src-ILU/msvc8/ILU Unicode.rc}, \emph{src-ILUT/msvc9/ILUT Unicode.rc} and \emph{src-ILUT/msvc8/ILUT Unicode.rc} must all be updated with the new version number. Look for the lines starting with \emph{FILEVERSION}, \emph{PRODUCTVERSION}, \emph{VALUE $\backslash$``FileVersion$\backslash$''}, \emph{VALUE $\backslash$``ProductVersion$\backslash$''} and \emph{IDC\_OPENIL}. 12 | 13 | \subsection*{Ansi Resource Files} 14 | \emph{src-IL/msvc9/IL.rc}, \emph{src-IL/msvc8/IL.rc}, \emph{src-ILU/msvc9/ILU.rc}, \emph{src-ILU/msvc8/ILU.rc}, \emph{src-ILUT/msvc9/ILUT.rc} and \emph{src-ILUT/msvc8/ILUT.rc} all have the same format as the Unicode resource files. 15 | 16 | 17 | \section*{configure.ac} 18 | Change the version number on line 12. 19 | 20 | 21 | \section*{IL.h, ILU.h, ILUT.h} 22 | At about line 164 in IL.h, change IL\_VERSION\_ and IL\_VERSION to reflect the new version number. The equivalent lines are at line 40 in ilu.h and line 32 in ilut.h. 23 | 24 | 25 | \section*{README} 26 | Change the first line of README to the new version number. 27 | 28 | 29 | \section*{il\_states.c, ilu\_states.c and ilut\_states.c} 30 | At the top of each of these files, change the \_il(u(t))Vendor and \_il(u(t))Version lines to the new version number. 31 | 32 | 33 | \end{document} 34 | 35 | -------------------------------------------------------------------------------- /DevIL-docs/DevIL Manual.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/DevIL Manual.doc -------------------------------------------------------------------------------- /DevIL-docs/DevIL Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/DevIL Manual.pdf -------------------------------------------------------------------------------- /DevIL-docs/DevIL Reference Guide - French Version.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/DevIL Reference Guide - French Version.doc -------------------------------------------------------------------------------- /DevIL-docs/DevIL Reference Guide.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/DevIL Reference Guide.doc -------------------------------------------------------------------------------- /DevIL-docs/DevIL Reference Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/DevIL Reference Guide.pdf -------------------------------------------------------------------------------- /DevIL-docs/DevilDoc.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /DevIL-docs/Makefile: -------------------------------------------------------------------------------- 1 | run: DocBuilder.class 2 | java DocBuilder DevilDoc.xml 3 | 4 | java: DocBuilder.java 5 | javac DocBuilder.java 6 | 7 | DocBuilder.class: DocBuilder.java 8 | javac DocBuilder.java 9 | 10 | dist: 11 | mkdir Docs 12 | mv index.html Constants IL ILU ILUT images Docs 13 | tar jcf Docs.tar.bz2 Docs 14 | rm -r Docs 15 | 16 | clean: 17 | rm *.class 18 | -------------------------------------------------------------------------------- /DevIL-docs/ToDo: -------------------------------------------------------------------------------- 1 | * add IL_LUMINANCE_ALPHA everywhere 2 | * Search for all ILU*_OUT_OF_MEMORY errors to add at the various functions (IL completed) 3 | 4 | iluInvertAlpha should be void <--- 5 | ilModAlpha e ilSetAlpha should to go ILU <-- 6 | 7 | * add functions: 8 | IL: 9 | + ILboolean ilApplyPal(const ILstring FileName); 10 | + ILboolean ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth); 11 | + ILboolean ilCompressFunc(ILenum Mode); 12 | + ILuint ilCreateSubImage(ILenum Type, ILuint Num); 13 | + ILboolean ilFormatFunc(ILenum Mode); 14 | + ILvoid ilModAlpha( ILint AlphaValue ); 15 | + ILvoid ilSetAlpha( ILuint AlphaValue ); 16 | + ILuint ilGetDXTCData(ILvoid *Buffer, ILuint BufferSize, ILenum DXTCFormat); 17 | + ILuint ilGetLumpPos(ILvoid); 18 | + ILboolean ilIsValid(ILenum Type, const ILstring FileName); 19 | + ILboolean ilIsValidF(ILenum Type, ILHANDLE File); 20 | + ILboolean ilIsValidL(ILenum Type, ILvoid *Lump, ILuint Size); 21 | + ILvoid ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha); 22 | + ILuint ilSaveF(ILenum Type, ILHANDLE File); 23 | + ILuint ilSaveL(ILenum Type, ILvoid *Lump, ILuint Size); 24 | - ilSetSharedPal 25 | 26 | ILU: 27 | + iluEdgeDetectE 28 | + iluEqualize 29 | + iluGammaCorrect 30 | + ILuint iluLoadImage(const ILstring FileName); 31 | + ILvoid iluRegionfv(ILpointf *Points, ILuint n); 32 | + ILvoid iluRegioniv(ILpointi *Points, ILuint n); 33 | + ILboolean iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance); 34 | + ILboolean iluWave(ILfloat Angle); 35 | + iluConvolution 36 | 37 | ILUT: need verification 38 | BITMAP* ilutAllegLoadImage(const ILstring FileName); 39 | BBitmap ilutConvertToBBitmap(ILvoid);� 40 | ILboolean ilutGLSaveImage(const ILstring FileName, GLuint TexID); 41 | ILboolean ilutGLSetTex(GLuint TexID); 42 | ILboolean ilutSDLSurfaceFromBitmap(SDL_Surface *Bitmap) 43 | ILboolean ilutGetWinClipboard(ILvoid); 44 | ILboolean ilutWinLoadUrl(const ILstring Url); 45 | ILboolean ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC); 46 | IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture(IDirect3DDevice9 *Device); 47 | ILboolean ilutD3D9VolTexFromFile(IDirect3DDevice9 *Device, char *FileName, IDirect3DVolumeTexture9 **Texture); 48 | ILboolean ilutD3D9VolTexFromFileInMemory(IDirect3DDevice9 *Device, ILvoid *Lump, ILuint Size, IDirect3DVolumeTexture9 **Texture); 49 | ILboolean ilutD3D9VolTexFromFileHandle(IDirect3DDevice9 *Device, ILHANDLE File, IDirect3DVolumeTexture9 **Texture); 50 | ILboolean ilutD3D9VolTexFromResource(IDirect3DDevice9 *Device, HMODULE SrcModule, char *SrcResource, IDirect3DVolumeTexture9 **Texture); 51 | ILboolean ilutD3D9LoadSurface(IDirect3DDevice9 *Device, IDirect3DSurface9 *Surface); 52 | -------------------------------------------------------------------------------- /DevIL-docs/images/DevIL.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-docs/images/DevIL.gif -------------------------------------------------------------------------------- /DevIL-utils/DevIL Install/DevIL + Uninstall + Modern UI.nsi: -------------------------------------------------------------------------------- 1 | ; DevIL.nsi 2 | 3 | 4 | ;-------------------------------- 5 | ;Include Modern UI 6 | 7 | !include "MUI2.nsh" 8 | 9 | ;-------------------------------- 10 | ;General 11 | 12 | Name "Developer's Image Library 1.7.2 Run-time Files" 13 | 14 | ; The file to write 15 | OutFile "DevIL-1.7.2.exe" 16 | 17 | ; The default installation directory 18 | InstallDir "$PROGRAMFILES\Developer's Image Library" 19 | 20 | ; Request application privileges for Windows Vista 21 | RequestExecutionLevel admin 22 | 23 | 24 | ;-------------------------------- 25 | ;Interface Settings 26 | 27 | !define MUI_ABORTWARNING 28 | 29 | ;-------------------------------- 30 | ;Pages 31 | 32 | !insertmacro MUI_PAGE_COMPONENTS 33 | !insertmacro MUI_PAGE_DIRECTORY 34 | !insertmacro MUI_PAGE_INSTFILES 35 | 36 | !insertmacro MUI_UNPAGE_CONFIRM 37 | !insertmacro MUI_UNPAGE_INSTFILES 38 | 39 | ;-------------------------------- 40 | ;Languages 41 | 42 | !insertmacro MUI_LANGUAGE "English" 43 | 44 | 45 | 46 | ; The stuff to install 47 | Section "Developer's Image Library (required)" 48 | 49 | ; Set output path to the installation directory. 50 | SetOutPath $SYSDIR 51 | 52 | ; Put files in the System folder 53 | File "..\devil\lib\DevIL.dll" 54 | File "..\devil\lib\ILU.dll" 55 | File "..\devil\lib\ILUT.dll" 56 | 57 | 58 | ; Set output path to the installation directory. 59 | SetOutPath $INSTDIR 60 | 61 | ; Write the installation path into the registry 62 | WriteRegStr HKLM SOFTWARE\DevIL "Install_Dir" "$INSTDIR" 63 | 64 | ; Write the uninstall keys for Windows 65 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "DisplayName" "Developer's Image Library" 66 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "UninstallString" '"$INSTDIR\uninstall.exe"' 67 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "NoModify" 1 68 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "NoRepair" 1 69 | WriteUninstaller "uninstall.exe" 70 | 71 | SectionEnd 72 | 73 | 74 | 75 | ;-------------------------------- 76 | ; Uninstaller 77 | 78 | Section "Uninstall" 79 | 80 | ; Remove registry keys 81 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" 82 | DeleteRegKey HKLM SOFTWARE\DevIL 83 | 84 | ; Remove files and uninstaller 85 | Delete $SYSDIR\DevIL.dll 86 | Delete $SYSDIR\ILU.dll 87 | Delete $SYSDIR\ILUT.dll 88 | Delete $INSTDIR\uninstall.exe 89 | 90 | ; Remove directories used 91 | RMDir "$INSTDIR" 92 | 93 | SectionEnd 94 | -------------------------------------------------------------------------------- /DevIL-utils/DevIL Install/DevIL + Uninstall.nsi: -------------------------------------------------------------------------------- 1 | ; DevIL.nsi 2 | 3 | Name "Developer's Image Library 1.7.1 Run-time Files" 4 | 5 | ; The file to write 6 | OutFile "DevIL-1.7.1.exe" 7 | 8 | ; The default installation directory 9 | InstallDir "$PROGRAMFILES\Developer's Image Library" 10 | 11 | ; Request application privileges for Windows Vista 12 | RequestExecutionLevel admin 13 | 14 | ;-------------------------------- 15 | 16 | ; Pages 17 | 18 | Page components 19 | Page directory 20 | Page instfiles 21 | 22 | UninstPage uninstConfirm 23 | UninstPage instfiles 24 | 25 | ;-------------------------------- 26 | 27 | ; The stuff to install 28 | Section "Developer's Image Library (required)" 29 | 30 | SectionIn RO 31 | 32 | ; Set output path to the installation directory. 33 | SetOutPath $SYSDIR 34 | 35 | ; Put files in the System folder 36 | File "..\devil\lib\DevIL.dll" 37 | File "..\devil\lib\ILU.dll" 38 | File "..\devil\lib\ILUT.dll" 39 | 40 | 41 | ; Set output path to the installation directory. 42 | SetOutPath $INSTDIR 43 | 44 | ; Write the installation path into the registry 45 | WriteRegStr HKLM SOFTWARE\DevIL "Install_Dir" "$INSTDIR" 46 | 47 | ; Write the uninstall keys for Windows 48 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "DisplayName" "Developer's Image Library" 49 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "UninstallString" '"$INSTDIR\uninstall.exe"' 50 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "NoModify" 1 51 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" "NoRepair" 1 52 | WriteUninstaller "uninstall.exe" 53 | 54 | SectionEnd 55 | 56 | 57 | 58 | ;-------------------------------- 59 | ; Uninstaller 60 | 61 | Section "Uninstall" 62 | 63 | ; Remove registry keys 64 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DevIL" 65 | DeleteRegKey HKLM SOFTWARE\DevIL 66 | 67 | ; Remove files and uninstaller 68 | Delete $SYSDIR\DevIL.dll 69 | Delete $SYSDIR\ILU.dll 70 | Delete $SYSDIR\ILUT.dll 71 | Delete $INSTDIR\uninstall.exe 72 | 73 | ; Remove directories used 74 | RMDir "$INSTDIR" 75 | 76 | SectionEnd 77 | -------------------------------------------------------------------------------- /DevIL-utils/DevIL Install/DevIL.nsi: -------------------------------------------------------------------------------- 1 | ; DevIL.nsi 2 | 3 | Name "Developer's Image Library 1.7.1 Run-time Files" 4 | 5 | ; The file to write 6 | OutFile "DevIL-1.7.1.exe" 7 | 8 | ; Request application privileges for Windows Vista 9 | RequestExecutionLevel admin 10 | 11 | ;-------------------------------- 12 | 13 | ; Pages 14 | 15 | Page components 16 | Page instfiles 17 | 18 | ;-------------------------------- 19 | 20 | ; The stuff to install 21 | Section "Developer's Image Library (required)" 22 | 23 | SectionIn RO 24 | 25 | ; Set output path to the installation directory. 26 | SetOutPath $SYSDIR 27 | 28 | ; Put file there 29 | File "..\devil\lib\devil.dll" 30 | File "..\devil\lib\ilu.dll" 31 | File "..\devil\lib\ilut.dll" 32 | 33 | SectionEnd 34 | 35 | -------------------------------------------------------------------------------- /DevIL-utils/DevIL Version/DevIL Version.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL Version", "DevIL Version.vcproj", "{038AD9B0-4964-417C-BA1A-9BE619CB7FB6}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release|Win32 = Release|Win32 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Debug|Win32.Build.0 = Debug|Win32 16 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Debug|x64.ActiveCfg = Debug|x64 17 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Debug|x64.Build.0 = Debug|x64 18 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Release|Win32.ActiveCfg = Release|Win32 19 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Release|Win32.Build.0 = Release|Win32 20 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Release|x64.ActiveCfg = Release|x64 21 | {038AD9B0-4964-417C-BA1A-9BE619CB7FB6}.Release|x64.Build.0 = Release|x64 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /DevIL-utils/DevIL Version/IL Unicode.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-utils/DevIL Version/IL Unicode.rc -------------------------------------------------------------------------------- /DevIL-utils/DevIL Version/IL.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL-utils/DevIL Version/IL.rc -------------------------------------------------------------------------------- /DevIL-utils/DevIL Version/Version Numbers.txt: -------------------------------------------------------------------------------- 1 | 174 2 | 175 3 | 4 | Previous version goes in the first line, and the current version goes in the next line. -------------------------------------------------------------------------------- /DevIL/AUTHORS: -------------------------------------------------------------------------------- 1 | The main programmer is Denton Woods, but this could not have been possible 2 | without contributions and some pieces of code from other projects. 3 | 4 | For contributors and credits, read the CREDITS file. 5 | -------------------------------------------------------------------------------- /DevIL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | project(ImageLib) 4 | # include our custom modules 5 | set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") 6 | 7 | add_subdirectory(src-IL) 8 | add_subdirectory(src-ILU) 9 | add_subdirectory(src-ILUT) 10 | option(IL_TESTS "build DevIL tests" ON) 11 | if (IL_TESTS) 12 | ENABLE_TESTING() 13 | Add_Subdirectory(test) 14 | endif() 15 | 16 | -------------------------------------------------------------------------------- /DevIL/CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/CREDITS -------------------------------------------------------------------------------- /DevIL/DevIL Website.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://openil.sf.net/ 3 | IDList= 4 | [{000214A0-0000-0000-C000-000000000046}] 5 | Prop3=19,2 6 | -------------------------------------------------------------------------------- /DevIL/INSTALL: -------------------------------------------------------------------------------- 1 | see README.cmake for details 2 | -------------------------------------------------------------------------------- /DevIL/Libraries.txt: -------------------------------------------------------------------------------- 1 | Libraries needed to compile DevIL* : 2 | ---------------------------------- 3 | 4 | (Most of these are optional) 5 | 6 | 7 | Libpng for .png (and some .ico) support available at http://www.libpng.org/pub/png/libpng.html 8 | ZLib for .png (and some .ico) support available at http://www.gzip.org/zlib/ 9 | Libjpeg for .jpg (and some .blp) support from http://www.ijg.org/ 10 | Libtiff for .tif support from http://www.libtiff.org/ 11 | Libmng for .mng and .jng support from http://www.libmng.com/ 12 | JasPer for .jp2 (and some .icns) support available at http://www.ece.uvic.ca/~mdadams/jasper/ 13 | HD Photo Device Porting Kit for .wdp/.hdp support from http://www.microsoft.com/Downloads/details.aspx?FamilyID=285eeffd-d86c-48c3-ab93-3abd5ee7f1ce&displaylang=en. 14 | Little CMS for color profiles (ILU) from http://www.littlecms.com/ 15 | Colour Picker lib for WindowsTest from http://www.fluidstudios.com/freeware.html 16 | Freeglut (or glut) for GLTest from http://freeglut.sourceforge.net 17 | glext.h from http://oss.sgi.com/projects/ogl-sample/ABI/glext.h (as if using OpenGL) 18 | libsquish for DXT compression from http://code.google.com/p/libsquish/ 19 | nVidia Texture Tools for DXT compression from http://developer.nvidia.com/object/nv_texture_tools.html. 20 | 21 | MSVC++ precompiled versions of libpng, zlib, libjpeg, libtiff, lcms and JasPer can be found 22 | at http://openil.sourceforge.net/libs/LibCompiled-vc8.zip or 23 | http://openil.sourceforge.net/libs/LibCompiled-vc9.zip. 24 | 25 | Sources of libpng, zlib, libjpeg, libmng, libungif, libtiff, lcms and JasPer can be 26 | found at http://openil.sourceforge.net/libs/LibSrc.zip 27 | 28 | Intel Jpeg Library from 29 | http://developer.intel.com/software/products/perflib/ijl/index.htm 30 | 31 | 32 | MAC OS X 33 | 34 | Source of external framework, downloaded from the previous sites 35 | http://openil.sourceforge.net/libs/ExternFrameworksSrc.sitx 36 | 37 | Complete Compiled Library 38 | http://openil.sourceforge.net/libs/OpenILBin.sitx 39 | -------------------------------------------------------------------------------- /DevIL/README.cmake: -------------------------------------------------------------------------------- 1 | Build DevIL with CMake 2 | ---------------------- 3 | 4 | GENERIC 5 | ------- 6 | 7 | For Linux/Unix/OSX/mingw, using makefiles: 8 | 9 | $ cd devil/DevIL 10 | $ mkdir build 11 | $ cd build 12 | $ cmake .. 13 | $ make 14 | $ make install 15 | 16 | To generate project files for visual studio/xcode/whatever, you 17 | need to tell CMake which generator to use. For example: 18 | 19 | 20 | See here for list of generators: 21 | http://www.cmake.org/cmake/help/v3.3/manual/cmake-generators.7.html 22 | 23 | 24 | Debug/Release/etc: 25 | 26 | $ cmake -DCMAKE_BUILD_TYPE=Debug .. 27 | 28 | 29 | WINDOWS - Visual studio 30 | ----------------------- 31 | 32 | You can get going without any commandline fiddling. Just install cmake 33 | (from http://cmake.org), and then: 34 | 35 | 1) Run cmake-gui. 36 | 37 | 2) Set the "where is the source code:" entry to the dir containing the top-level 38 | CMakeLists.txt, which should be DevIL/DevIL. 39 | 40 | 3) Set a build dir with the "where to build the binaries:" entry. Generally, this 41 | will be a new directory outside of the DevIL tree (to keep the build all clean 42 | and out-of-tree). 43 | 44 | 4) click the "configure" button. It should let you specify the generator to use. 45 | eg: 46 | "Visual Studio 14 2015" (for a 32-buit build) 47 | "Visual Studio 14 2015 w64" (for a 64-buit build) 48 | It'll spend a little time generating the project files and then you're set to go. 49 | 50 | 5) In visual studio, navigate to the build directory and open up the new .sln file. 51 | 52 | 6) build! 53 | Configurations for both Debug and Release (and others) are included in the project. 54 | 55 | 56 | WINDOWS - msys2 57 | --------------- 58 | 59 | 60 | Run mingw32 or mingw64 shell (for 32bit or 64bit respectively), then follow 61 | the generic instructions, except for: 62 | 63 | $ cmake -G "MSYS Makefiles" .. 64 | 65 | To set install prefix (windows default seems to be C:/program files/....): 66 | $ cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local .. 67 | 68 | 69 | 70 | 71 | TODO: 72 | - give some hints on installing prerequisites, eg: 73 | - an apt-get install line for ubuntu 74 | - brew packages to install for OSX 75 | - instructions for Msys2 on windows 76 | - steps for setting up libs for visual studio 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | using namespace System::Reflection; 4 | using namespace System::Runtime::CompilerServices; 5 | 6 | // 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | // 11 | [assembly:AssemblyTitleAttribute("DevIL.NET")]; 12 | [assembly:AssemblyDescriptionAttribute("DevIL.NET - Image Library for .NET framework")]; 13 | [assembly:AssemblyConfigurationAttribute("")]; 14 | [assembly:AssemblyCompanyAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com)")]; 15 | [assembly:AssemblyProductAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com)")]; 16 | [assembly:AssemblyCopyrightAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com) - Released under BSD license")]; 17 | [assembly:AssemblyTrademarkAttribute("(C) 2005 - Marco Mastropaolo (http://www.mastropaolo.com) - Released under BSD license")]; 18 | [assembly:AssemblyCultureAttribute("")]; 19 | 20 | // 21 | // Version information for an assembly consists of the following four values: 22 | // 23 | // Major Version 24 | // Minor Version 25 | // Build Number 26 | // Revision 27 | // 28 | // You can specify all the value or you can default the Revision and Build Numbers 29 | // by using the '*' as shown below: 30 | 31 | [assembly:AssemblyVersionAttribute("1.1.*")]; 32 | 33 | // 34 | // In order to sign your assembly you must specify a key to use. Refer to the 35 | // Microsoft .NET Framework documentation for more information on assembly signing. 36 | // 37 | // Use the attributes below to control which key is used for signing. 38 | // 39 | // Notes: 40 | // (*) If no key is specified, the assembly is not signed. 41 | // (*) KeyName refers to a key that has been installed in the Crypto Service 42 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 43 | // a key. 44 | // (*) If the KeyFile and the KeyName values are both specified, the 45 | // following processing occurs: 46 | // (1) If the KeyName can be found in the CSP, that key is used. 47 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 48 | // in the KeyFile is installed into the CSP and used. 49 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 50 | // When specifying the KeyFile, the location of the KeyFile should be 51 | // relative to the project directory. 52 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 53 | // documentation for more information on this. 54 | // 55 | [assembly:AssemblyDelaySignAttribute(false)]; 56 | [assembly:AssemblyKeyFileAttribute("")]; 57 | [assembly:AssemblyKeyNameAttribute("")]; 58 | 59 | -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/COPYING.txt: -------------------------------------------------------------------------------- 1 | DevIL.NET 2 | Copyright (c) 2005, Marco Mastropaolo 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of DevIL.NET nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/DevIL.NET.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 7.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL.NET", "DevIL.NET.vcproj", "{30D94686-D452-4A73-B59D-178288807EE5}" 3 | EndProject 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThumbView", "..\ThumbView\ThumbView.csproj", "{1541F8B7-DBE4-490B-9E1A-8D0122339F09}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageViewCs", "..\ImageViewCs\ImageViewCs.csproj", "{C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}" 7 | EndProject 8 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImageViewVb", "..\ImageViewVb\ImageViewVb.vbproj", "{F073580C-F355-4F4A-98B7-83D571B96B9E}" 9 | EndProject 10 | Global 11 | GlobalSection(DPCodeReviewSolutionGUID) = preSolution 12 | DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} 13 | EndGlobalSection 14 | GlobalSection(SolutionConfiguration) = preSolution 15 | ConfigName.0 = Debug 16 | ConfigName.1 = Release 17 | EndGlobalSection 18 | GlobalSection(ProjectDependencies) = postSolution 19 | EndGlobalSection 20 | GlobalSection(ProjectConfiguration) = postSolution 21 | {30D94686-D452-4A73-B59D-178288807EE5}.Debug.ActiveCfg = Debug|Win32 22 | {30D94686-D452-4A73-B59D-178288807EE5}.Debug.Build.0 = Debug|Win32 23 | {30D94686-D452-4A73-B59D-178288807EE5}.Release.ActiveCfg = Release|Win32 24 | {30D94686-D452-4A73-B59D-178288807EE5}.Release.Build.0 = Release|Win32 25 | {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug.ActiveCfg = Debug|.NET 26 | {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Debug.Build.0 = Debug|.NET 27 | {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release.ActiveCfg = Release|.NET 28 | {1541F8B7-DBE4-490B-9E1A-8D0122339F09}.Release.Build.0 = Release|.NET 29 | {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug.ActiveCfg = Debug|.NET 30 | {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Debug.Build.0 = Debug|.NET 31 | {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release.ActiveCfg = Release|.NET 32 | {C6EF7F8A-0CCB-4DAD-A70E-CCCB25608A5E}.Release.Build.0 = Release|.NET 33 | {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug.ActiveCfg = Debug|.NET 34 | {F073580C-F355-4F4A-98B7-83D571B96B9E}.Debug.Build.0 = Debug|.NET 35 | {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release.ActiveCfg = Release|.NET 36 | {F073580C-F355-4F4A-98B7-83D571B96B9E}.Release.Build.0 = Release|.NET 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityAddIns) = postSolution 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/ImageViewCs/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/bindings/DotNet/ImageViewCs/App.ico -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/ImageViewCs/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | // 9 | [assembly: AssemblyTitle("")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("")] 14 | [assembly: AssemblyCopyright("")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Revision and Build Numbers 27 | // by using the '*' as shown below: 28 | 29 | [assembly: AssemblyVersion("1.0.*")] 30 | 31 | // 32 | // In order to sign your assembly you must specify a key to use. Refer to the 33 | // Microsoft .NET Framework documentation for more information on assembly signing. 34 | // 35 | // Use the attributes below to control which key is used for signing. 36 | // 37 | // Notes: 38 | // (*) If no key is specified, the assembly is not signed. 39 | // (*) KeyName refers to a key that has been installed in the Crypto Service 40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 41 | // a key. 42 | // (*) If the KeyFile and the KeyName values are both specified, the 43 | // following processing occurs: 44 | // (1) If the KeyName can be found in the CSP, that key is used. 45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 46 | // in the KeyFile is installed into the CSP and used. 47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 48 | // When specifying the KeyFile, the location of the KeyFile should be 49 | // relative to the project output directory which is 50 | // %Project Directory%\obj\. For example, if your KeyFile is 51 | // located in the project directory, you would specify the AssemblyKeyFile 52 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 53 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 54 | // documentation for more information on this. 55 | // 56 | [assembly: AssemblyDelaySign(false)] 57 | [assembly: AssemblyKeyFile("")] 58 | [assembly: AssemblyKeyName("")] 59 | -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/ImageViewCs/ImageViewCs.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 37 | 38 | 39 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/ImageViewVb/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Reflection 2 | Imports System.Runtime.InteropServices 3 | 4 | ' General Information about an assembly is controlled through the following 5 | ' set of attributes. Change these attribute values to modify the information 6 | ' associated with an assembly. 7 | 8 | ' Review the values of the assembly attributes 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 19 | 20 | 21 | ' Version information for an assembly consists of the following four values: 22 | ' 23 | ' Major Version 24 | ' Minor Version 25 | ' Build Number 26 | ' Revision 27 | ' 28 | ' You can specify all the values or you can default the Build and Revision Numbers 29 | ' by using the '*' as shown below: 30 | 31 | 32 | -------------------------------------------------------------------------------- /DevIL/bindings/DotNet/ImageViewVb/ImageViewVb.vbproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 37 | 38 | 39 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /DevIL/bindings/Mathematica/DevIL Interface.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | int retval; 9 | int image; 10 | 11 | ilInit(); 12 | iluInit(); 13 | ilutInit(); 14 | 15 | ilGenImages(1, &image); 16 | ilBindImage(image); 17 | ilOriginFunc(IL_ORIGIN_LOWER_LEFT); 18 | 19 | retval = MLMain(argc, argv); 20 | 21 | ilDeleteImages(1, &image); 22 | 23 | ilShutDown(); // Only need to shut down DevIL, not ILU or ILUT 24 | 25 | return retval; 26 | } 27 | 28 | /*int f(int x, int y) 29 | { 30 | return x+y; 31 | } 32 | 33 | 34 | void bits(int i) 35 | { 36 | int a[32], k; 37 | for(k=0; k<32; k++) { 38 | a[k] = i%2; 39 | i >>= 1; 40 | if (i==0) break; 41 | } 42 | 43 | if (k<32) k++; 44 | MLPutInteger32List(stdlink, a, k); 45 | return; 46 | }*/ 47 | 48 | int mlLoad(char *Filename) 49 | { 50 | int ret = ilLoadImage(Filename); 51 | if (ilGetInteger(IL_ORIGIN_MODE) != IL_ORIGIN_UPPER_LEFT) 52 | iluFlipImage(); 53 | ilConvertImage(IL_RGBA, IL_DOUBLE); 54 | return ret; 55 | } 56 | 57 | int mlWidth(void) 58 | { 59 | return ilGetInteger(IL_IMAGE_WIDTH); 60 | } 61 | 62 | int mlHeight(void) 63 | { 64 | return ilGetInteger(IL_IMAGE_HEIGHT); 65 | } 66 | 67 | void mlData(void) 68 | { 69 | /*int x, y, c; 70 | int *Data; 71 | ILubyte *OrigData = ilGetData(); 72 | 73 | Data = malloc(ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * 4 * sizeof(int)); 74 | for (y = 0; y < ilGetInteger(IL_IMAGE_HEIGHT); y++) { 75 | for (x = 0; x < ilGetInteger(IL_IMAGE_WIDTH); x++) { 76 | for (c = 0; c < 4; c++) { 77 | Data[y * ilGetInteger(IL_IMAGE_WIDTH) * 4 + x * 4 + c] = OrigData[y * ilGetInteger(IL_IMAGE_WIDTH) * 4 + x * 4 + c]; 78 | } 79 | } 80 | } 81 | 82 | MLPutInteger32List(stdlink, Data, ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * 4); 83 | 84 | free(Data);*/ 85 | 86 | MLPutReal64List(stdlink, (ILdouble*)ilGetData(), ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * 4); 87 | 88 | return; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /DevIL/bindings/Mathematica/DevIL Mathematica.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevIL Mathematica", "DevIL Mathematica.vcproj", "{A73E8E53-2A08-405E-B462-E1541FE3E00F}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Debug|Win32.Build.0 = Debug|Win32 14 | {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Release|Win32.ActiveCfg = Release|Win32 15 | {A73E8E53-2A08-405E-B462-E1541FE3E00F}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /DevIL/bindings/README.bindings: -------------------------------------------------------------------------------- 1 | 2 | ** BINDING MANUAL ** 3 | 4 | 5 | DevIL library can be binded to many other languages then C using the swig binding interface builder. 6 | In the source distribution in the include/IL directory there are 2 script (build-python and build-lua) used to assist the developer on the building of the bindings for these 2 languages. 7 | The swig interface file is include/IL/DevIL.i 8 | The script have 2 common varibles IL_INCLUDE_PATH and IL_LIB_PATH that must be modified to reflect your installation. 9 | 10 | 11 | *** build-python 12 | 13 | The build-python script builds a python module. To do so it needs that the PYTHON_INCLUDE_PATH and PYTHON_LIB_PATH variables to be set correctly. Remember to se the LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on OSX) to reflect the location of the library when using the module and the library in not in the default search path. 14 | 15 | 16 | *** build-lua 17 | 18 | The lua build scripts compile a complete lua interpreter with the DevIL commands embedded in it. 19 | It uses the luadevil.c source code which is a copy of lua.c interpreter source code (found in the source distribution of Lua) with 2 little modification (just to print that it has embedded python and to import the code). 20 | This script needs that the LUA_INCLUDE_PATH and the LUA_LIB_PATH to be set correctly. 21 | The script can be configured to build the module for OS X (which requires some changes to be done) 22 | 23 | 24 | Other bindings are supported using the swig utility! 25 | 26 | Dario Meloni 27 | 11/02/2007 28 | -------------------------------------------------------------------------------- /DevIL/bindings/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains bindings to DevIL for various languages. 2 | -------------------------------------------------------------------------------- /DevIL/bindings/delphi/readme.1st: -------------------------------------------------------------------------------- 1 | To debug Delphi apps with DevIL, you must define OPENIL_DEBUG and rebuild your project. Do not define OPENIL_DEBUG for release builds. Sorry for the inconvenience. 2 | 3 | - Denton Woods and Alexander Blach -------------------------------------------------------------------------------- /DevIL/bindings/fortran/example.f: -------------------------------------------------------------------------------- 1 | program example 2 | integer n 3 | n = 1 4 | call ilFBindImage(n) 5 | end 6 | -------------------------------------------------------------------------------- /DevIL/bindings/python/DevIL.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/bindings/python/DevIL.pyd -------------------------------------------------------------------------------- /DevIL/bindings/python/deviltest.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | from OpenGL.GL import * 3 | from OpenGL.GLU import * 4 | import DevIL 5 | 6 | pygame.init() 7 | screen = pygame.display.set_mode((800, 600), pygame.OPENGL | pygame.DOUBLEBUF) 8 | pygame.display.set_caption('Devil Test') 9 | 10 | glDisable(GL_DEPTH_TEST) 11 | glMatrixMode(GL_PROJECTION) 12 | glLoadIdentity() 13 | gluOrtho2D(0, 800, 0, 600) 14 | glMatrixMode(GL_MODELVIEW) 15 | glLoadIdentity() 16 | glEnable(GL_TEXTURE_2D) 17 | 18 | DevIL.ilInit() 19 | DevIL.ilutRenderer(DevIL.ILUT_OPENGL) 20 | texture = DevIL.ilutGLLoadImage('devil.gif') 21 | glEnable(GL_TEXTURE_2D) 22 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) 23 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) 24 | glBindTexture(GL_TEXTURE_2D, texture) 25 | 26 | while 1: 27 | event = pygame.event.poll() 28 | if event.type == pygame.QUIT: 29 | break 30 | 31 | glClear(GL_COLOR_BUFFER_BIT) 32 | 33 | glBegin(GL_QUADS) 34 | glTexCoord2f(0, 0); glVertex2f(-400, -400); 35 | glTexCoord2f(5, 0); glVertex2f(1200, -400) 36 | glTexCoord2f(5, 5); glVertex2f(1200, 1000) 37 | glTexCoord2f(0, 5); glVertex2f(-400, 1000) 38 | glEnd() 39 | 40 | glTranslatef(400, 300, 0) 41 | glRotatef(0.5, 0, 0, 1) 42 | glTranslatef(-400, -300, 0) 43 | 44 | pygame.display.flip() 45 | -------------------------------------------------------------------------------- /DevIL/bindings/python/readme.txt: -------------------------------------------------------------------------------- 1 | Versions of Python since 2.5 include ctypes, easily letting you interface directly with a Windows .dll or a Linux .so. Two .py files are included that let you do this: DevIL-Windows.py and DevIL-Linux.py. 2 | 3 | For more information on ctypes, visit http://starship.python.net/crew/theller/ctypes/ . 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Here is the text for the old version of the DevIL Python wrapper (still included at the moment): 12 | 13 | The test program require Pygame and PyOpenGL to work but 14 | you don't need them to use the library. You can find the 15 | needed package at: 16 | 17 | Pygame - http://www.pygame.org 18 | PyOpenGL - http://pyopengl.sourceforge.net 19 | 20 | -------------------------------------------------------------------------------- /DevIL/bindings/python/test.py: -------------------------------------------------------------------------------- 1 | from DevIL import * 2 | 3 | ilInit() 4 | image = ilGenImages(1) 5 | ilBindImage(image) 6 | 7 | ilLoadImage('devil.gif') 8 | 9 | data = ilGetData() 10 | for i in range(len(data)): 11 | if data[i] == 255: 12 | data[i] = 0 13 | ilSetData(data) 14 | 15 | ilSaveImage('test.tga') 16 | -------------------------------------------------------------------------------- /DevIL/cmake/Modules/FindLCMS2.cmake: -------------------------------------------------------------------------------- 1 | # Denton: Found in LibMNG sources 2 | # 3 | # - Find LCMS version 2 library 4 | # 5 | # LCMS2_INCLUDE_DIR - Where to find lcms2.h, etc. 6 | # LCMS2_LIBRARIES - Libraries to link against to use LCMS2. 7 | # LCMS2_FOUND - If false, do not try to use LCMS2. 8 | # 9 | # also defined, but not for general use are 10 | # LCMS2_LIBRARY - Where to find the LCMS2 library. 11 | 12 | FIND_PATH(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include) 13 | 14 | SET(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static) 15 | 16 | FIND_LIBRARY(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} ) 17 | 18 | MARK_AS_ADVANCED(LCMS2_INCLUDE_DIR LCMS2_LIBRARY) 19 | 20 | # handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if 21 | # all listed variables are TRUE 22 | INCLUDE(FindPackageHandleStandardArgs) 23 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR) 24 | 25 | IF(LCMS2_FOUND) 26 | SET(LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR}) 27 | SET(LCMS2_LIBRARIES ${LCMS2_LIBRARY} ) 28 | ENDIF(LCMS2_FOUND) 29 | -------------------------------------------------------------------------------- /DevIL/cmake/Modules/FindMNG.cmake: -------------------------------------------------------------------------------- 1 | # Denton: Modified from the libsquish one 2 | FIND_PATH(MNG_INCLUDE_DIR mng.h PATHS . mng .. ../mng DOC "Directory containing libmng headers") 3 | FIND_LIBRARY(MNG_LIBRARY NAMES mng libmng PATHS . mng .. ../mng PATH_SUFFIXES lib lib64 release minsizerel relwithdebinfo DOC "Path to libmng library") 4 | 5 | SET(MNG_LIBRARIES ${MNG_LIBRARY}) 6 | 7 | IF (MNG_LIBRARY AND MNG_INCLUDE_DIR) 8 | SET(MNG_FOUND TRUE) 9 | MESSAGE(STATUS "Found libmng: ${MNG_LIBRARY}") 10 | ENDIF (MNG_LIBRARY AND MNG_INCLUDE_DIR) 11 | -------------------------------------------------------------------------------- /DevIL/cmake/Modules/FindlibSquish.cmake: -------------------------------------------------------------------------------- 1 | # Defines 2 | # LIBSQUISH_FOUND 3 | # LIBSQUISH_INCLUDE_DIR 4 | # LIBSQUISH_LIBRARIES 5 | 6 | FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . squish .. ../squish DOC "Directory containing libSquish headers") 7 | FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . squish .. ../squish PATH_SUFFIXES lib lib64 release minsizerel relwithdebinfo DOC "Path to libSquish library") 8 | 9 | SET(LIBSQUISH_LIBRARIES ${LIBSQUISH_LIBRARY}) 10 | 11 | IF (LIBSQUISH_LIBRARY AND LIBSQUISH_INCLUDE_DIR) 12 | SET(LIBSQUISH_FOUND TRUE) 13 | MESSAGE(STATUS "Found libSquish: ${LIBSQUISH_LIBRARY}") 14 | ELSE (LIBSQUISH_LIBRARY AND LIBSQUISH_INCLUDE_DIR) 15 | MESSAGE(STATUS "Could not find libSquish") 16 | ENDIF (LIBSQUISH_LIBRARY AND LIBSQUISH_INCLUDE_DIR) 17 | -------------------------------------------------------------------------------- /DevIL/data/DevIL_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/data/DevIL_logo.jpg -------------------------------------------------------------------------------- /DevIL/docs/generate-images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # The script optionally takes two parameters: 3 | # sh ./generate-images.sh [ []] 4 | # Example: 5 | # sh ./generate-images.sh ../test_image.jpg images/test 6 | 7 | FUNCTIONS=" iluAlienify() iluBlurAvg(10) iluBlurGaussian(10) iluContrast(0.4) iluContrast(1.7) iluEqualize() iluNegative() iluNoisify(0.1) iluNoisify(0.8) iluPixelize(5) iluSharpen(1.8,2) iluSharpen(2.1,3) iluEmboss() iluMirror() iluSaturate1f(0.6) iluWave(1.2) iluGammaCorrect(0.7) iluGammaCorrect(1.6)" 8 | #iluCrop, iluEdgeDetectE, iluEdgeDetectP, iluEdgeDetectS, iluEnlargeCanvas, iluEnlargeImage, iluFlipImage, iluInvertAlpha, iluReplaceColour, iluRotate, iluRotate3D, iluSaturate4f, iluScale, iluScaleAlpha, iluScaleColours 9 | IN_IMAGE=small_stairway.png 10 | test -n "$1" && IN_IMAGE=$1 11 | test -n "$2" && OUT_DIR=$2 12 | #just the filename without the path 13 | IN_IMAGE_NAME=$(echo $IN_IMAGE | sed -e 's/\/*\([^\/]*\/\)*\(.*\)\..*/\2/') 14 | #echo image_name: $IN_IMAGE_NAME 15 | #just the extension 16 | IN_IMAGE_EXT=$(echo $IN_IMAGE | sed -e 's/.*\.\(.*\)/\1/') 17 | #echo image_ext: $IN_IMAGE_EXT 18 | for function in $FUNCTIONS 19 | do 20 | # Substituing the comma from the parameters list to underscore 21 | # Substituing the first parenthesis to underscore and throwing away the closing parenthesis 22 | # Reformatting the output filename 23 | # and append the same extension as that of the original 24 | OUT_FILENAME=$OUT_DIR/ilu_${IN_IMAGE_NAME}_$(\ 25 | echo $function | sed -e "s/,/_/g" \ 26 | | sed -e "s/(\([^)]\+\))/_\1/g" \ 27 | | sed -e "s/ilu\(\w\)\(\w*\)(*\([^)]*\))*/\L\1\E\2\3/g")".${IN_IMAGE_EXT}" 28 | # don't overwrite anything, that doesn't make sense 29 | # echo out_filename: $OUT_FILENAME 30 | test -f $OUT_FILENAME && continue 31 | ../bin/ilur -l $IN_IMAGE -s $OUT_FILENAME -a "$function" 32 | done 33 | -------------------------------------------------------------------------------- /DevIL/docs/images/DevIL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/DevIL.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/DevIL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/DevIL.png -------------------------------------------------------------------------------- /DevIL/docs/images/devil_msvc_include.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/devil_msvc_include.png -------------------------------------------------------------------------------- /DevIL/docs/images/devil_msvc_lib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/devil_msvc_lib.png -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_alienify.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_alienify.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_blurAvg_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_blurAvg_10.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_blurGaussian_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_blurGaussian_10.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_contrast_0.4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_contrast_0.4.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_contrast_1.7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_contrast_1.7.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_emboss.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_emboss.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_equalize.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_equalize.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_gammaCorrect_0.7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_gammaCorrect_0.7.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_gammaCorrect_1.6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_gammaCorrect_1.6.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_mirror.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_mirror.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_negative.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_negative.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_noisify_0.1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_noisify_0.1.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_noisify_0.8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_noisify_0.8.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_pixelize_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_pixelize_5.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_saturate1f_0.6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_saturate1f_0.6.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_sharpen_1.8_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_sharpen_1.8_2.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_sharpen_2.1_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_sharpen_2.1_3.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/ilu_small_stairway_wave_1.2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/ilu_small_stairway_wave_1.2.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/original_stairway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/original_stairway.jpg -------------------------------------------------------------------------------- /DevIL/docs/images/small_stairway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/docs/images/small_stairway.jpg -------------------------------------------------------------------------------- /DevIL/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(DevIL_Examples) 2 | 3 | 4 | 5 | SUBDIRS( "GL Example" WindowsTest ) -------------------------------------------------------------------------------- /DevIL/examples/allegro_example/allegtest.c: -------------------------------------------------------------------------------- 1 | // Almost identical to Allegro's ex15.c 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | BITMAP *Image; 14 | PALETTE Pal; 15 | ILuint Id; 16 | 17 | if (argc != 2) { 18 | printf("Please specify a filename.\n"); 19 | return 1; 20 | } 21 | 22 | ilInit(); 23 | ilGenImages(1, &Id); 24 | ilBindImage(Id); 25 | ilLoadImage(argv[1]); 26 | 27 | // if (ilGetInteger(IL_IMAGE_FORMAT) == GL_BGR || 28 | // ilGetInteger(IL_IMAGE_FORMAT) == GL_BGRA) 29 | ilSwapColours(); 30 | 31 | Image = (BITMAP*)ilutConvertToAlleg(Pal); 32 | 33 | allegro_init(); 34 | install_keyboard(); 35 | if (ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL) == 8) { 36 | set_color_depth(8); 37 | set_palette(Pal); 38 | } 39 | else 40 | set_color_depth(32); 41 | set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0); 42 | 43 | blit(Image, screen, 0, 0, (SCREEN_W - Image->w) / 2, 44 | (SCREEN_H - Image->h) / 2, Image->w, Image->h); 45 | 46 | destroy_bitmap(Image); 47 | 48 | readkey(); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /DevIL/examples/animation_example/OpenIL.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/animation_example/OpenIL.ico -------------------------------------------------------------------------------- /DevIL/examples/cpp_wrapper_example/il_wrap.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | using namespace std; 5 | 6 | int main(int argc, char **argv) 7 | { 8 | if (argc < 2) { 9 | cout << "Please specify a filename." << endl; 10 | return 1; 11 | } 12 | 13 | ilImage Image(argv[1]); 14 | 15 | cout << Image.Width() << 'x' << Image.Height() << '@' << (ILuint)Image.Bpp() << endl; 16 | 17 | ilEnable(IL_FILE_OVERWRITE); 18 | 19 | Image.Save("test.tga"); 20 | 21 | return 0; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /DevIL/examples/direct3d_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(Example_D3D) 2 | 3 | FILE(GLOB Example_D3D_SRCS *.c *.cpp *.h ) 4 | 5 | INCLUDE_DIRECTORIES( 6 | 7 | ${CMAKE_CURRENT_SOURCE_DIR} 8 | ${DevIL_SOURCE_DIR}/include 9 | ${DevIL_SOURCE_DIR}/../include 10 | ) 11 | 12 | 13 | 14 | # 15 | # for windows add the .def and .rc files to the source list 16 | # 17 | IF(WIN32) 18 | IF(BUILD_SHARED_LIBS) 19 | ENDIF(BUILD_SHARED_LIBS) 20 | ENDIF(WIN32) 21 | 22 | ADD_EXECUTABLE(Example_D3D Example_D3D_SRCS) 23 | 24 | ## add link sub library info 25 | 26 | TARGET_LINK_LIBRARIES(Example_D3D 27 | 28 | DevIL 29 | DevILU 30 | DevILUT 31 | lcms 32 | libjpeg 33 | libmng 34 | libpng 35 | libtiff 36 | zlib 37 | ) 38 | 39 | INCLUDE_DIRECTORIES( 40 | 41 | ${DevIL_SOURCE_DIR} 42 | ${DevILU_SOURCE_DIR} 43 | ${DevILUT_SOURCE_DIR} 44 | ${LCMS_SOURCE_DIR} 45 | ${LIBJPEG_SOURCE_DIR} 46 | ${LIBMNG_SOURCE_DIR} 47 | ${LIBPNG_SOURCE_DIR} 48 | ${LIBTIFF_SOURCE_DIR} 49 | ${ZLIB_SOURCE_DIR} 50 | ) 51 | -------------------------------------------------------------------------------- /DevIL/examples/iller/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/iller/README -------------------------------------------------------------------------------- /DevIL/examples/iller/iller.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/iller/iller.cpp -------------------------------------------------------------------------------- /DevIL/examples/iller/iller.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/iller/iller.h -------------------------------------------------------------------------------- /DevIL/examples/opengl_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(Example_GL) 2 | 3 | FILE(GLOB Example_GL_SRCS *.c *.cpp *.h ) 4 | 5 | INCLUDE_DIRECTORIES( 6 | 7 | ${CMAKE_CURRENT_SOURCE_DIR} 8 | ${DevIL_SOURCE_DIR}/include 9 | ${DevIL_SOURCE_DIR}/../include 10 | ${DevIL_XTRA_SOURCE_DIR}/freeglut 11 | ) 12 | 13 | LINK_DIRECTORIES( 14 | 15 | ${DEVIL_LIB_DEST_DIR} 16 | ${CMAKE_CURRENT_SOURCE_DIR} 17 | ${DevIL_XTRA_SOURCE_DIR}/freeglut 18 | ) 19 | 20 | # 21 | # for windows add the .def and .rc files to the source list 22 | # 23 | IF(WIN32) 24 | ADD_DEFINITIONS(-DIL_USE_PRAGMA_LIBS) 25 | 26 | IF(BUILD_SHARED_LIBS) 27 | ELSE(BUILD_SHARED_LIBS) 28 | ADD_DEFINITIONS(-DIL_STATIC_LIB) 29 | ENDIF(BUILD_SHARED_LIBS) 30 | ENDIF(WIN32) 31 | 32 | SOURCE_GROUP(code FILES ${Example_GL_SRCS} ) 33 | 34 | ADD_EXECUTABLE(Example_GL Example_GL_SRCS) 35 | 36 | ## add link sub library info 37 | 38 | TARGET_LINK_LIBRARIES(Example_GL 39 | 40 | DevIL 41 | DevILU 42 | DevILUT 43 | ) 44 | 45 | INCLUDE_DIRECTORIES( 46 | 47 | ${DevIL_SOURCE_DIR} 48 | ${DevILU_SOURCE_DIR} 49 | ${DevILUT_SOURCE_DIR} 50 | ) 51 | 52 | # 53 | # Copy dlls into the output dir, so stuff just works from vcc 54 | # 55 | IF(WIN32) 56 | 57 | ADD_CUSTOM_COMMAND( TARGET Example_GL POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy 58 | ${DevIL_XTRA_SOURCE_DIR}/freeglut/freeglut.dll 59 | ${CMAKE_CFG_INTDIR} 60 | ) 61 | 62 | IF(BUILD_SHARED_LIBS) 63 | ADD_CUSTOM_COMMAND( TARGET Example_GL POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy 64 | ${DEVIL_LIB_DEST_DIR}/*.dll 65 | ${CMAKE_CFG_INTDIR} 66 | ) 67 | ENDIF(BUILD_SHARED_LIBS) 68 | 69 | ENDIF(WIN32) 70 | -------------------------------------------------------------------------------- /DevIL/examples/opengl_example/gltest.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib GL Test Source 4 | // Copyright (C) 2000-2002 by Denton Woods 5 | // Last modified: 10/13/2000 <--Y2K Compliant! =] 6 | // 7 | // Filename: examples/gl example/gl example.h 8 | // 9 | // Description: Sample implementation of an OpenGL image viewer. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef GLTEST_H 14 | #define GLTEST_H 15 | 16 | // We don't want a larger window than this. 17 | #define MAX_X 640 18 | #define MAX_Y 480 19 | 20 | // Function prototypes. 21 | void DisplayFunc(void); 22 | void CleanUp(void); 23 | void ResizeFunc(int NewWidth, int NewHeight); 24 | void IdleFunc(void); 25 | void KeyboardFunc(unsigned char cChar, int nMouseX, int nMouseY); 26 | ILboolean Setup(); 27 | 28 | // Has the main GL texture been deleted? 29 | ILboolean bCleaned = 0; 30 | 31 | // GL texture ID 32 | GLuint TexID = 0; 33 | // IL image ID 34 | ILuint ImgId = 0; 35 | 36 | #endif//GLTEST_H 37 | -------------------------------------------------------------------------------- /DevIL/examples/volume_example/3dtest.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST3D_H 2 | #define TEST3D_H 3 | 4 | #define MAX_X 640 5 | #define MAX_Y 480 6 | 7 | void DisplayFunc(void); 8 | void CleanUp(void); 9 | void ExitClean(void); 10 | void ResizeFunc(int NewWidth, int NewHeight); 11 | void IdleFunc(void); 12 | void KeyboardFunc(unsigned char cChar, int nMouseX, int nMouseY); 13 | void KeySpecialFunc(int Key, int x, int y); 14 | void SetPerspective(float Fov); 15 | ILboolean Setup(void); 16 | ILboolean GenSides(void); 17 | 18 | ILboolean bCleaned = IL_FALSE; 19 | 20 | GLuint TexID1 = 0, TexID2 = 0, TexID3 = 0, TexID4 = 0; 21 | ILuint ImgId; 22 | 23 | float Angle = 0.0, TransFactor = -470.0; 24 | 25 | #endif//TEST3D_H 26 | -------------------------------------------------------------------------------- /DevIL/examples/windows_example/WindowsTest.dep: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Generated Dependency File, included by WindowsTest.mak 2 | 3 | .\BatchConv.cpp : \ 4 | "..\..\..\vc98\include\basetsd.h"\ 5 | {$(INCLUDE)}"il\il.h"\ 6 | 7 | 8 | .\WindowsTest.cpp : \ 9 | "..\..\..\msvc\directx sdk\include\d3d8.h"\ 10 | "..\..\..\msvc\directx sdk\include\d3d8caps.h"\ 11 | "..\..\..\msvc\directx sdk\include\d3d8types.h"\ 12 | "..\..\..\vc98\include\basetsd.h"\ 13 | "..\..\include\il\ilu.h"\ 14 | "..\..\include\il\ilut.h"\ 15 | {$(INCLUDE)}"il\il.h"\ 16 | 17 | 18 | .\WindowsTest.rc : \ 19 | ".\resources\OpenIL.ico"\ 20 | 21 | -------------------------------------------------------------------------------- /DevIL/examples/windows_example/WindowsTest.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/3d.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/3d.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/DevIL Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/DevIL Logo.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/OpenIL.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/OpenIL.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/OpenIL_address_bar.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/OpenIL_address_bar.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/bmp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/bmp.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/gif.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/gif.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/graphic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/graphic.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/jpg.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/jpg.ico -------------------------------------------------------------------------------- /DevIL/examples/windows_example/resources/psd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/examples/windows_example/resources/psd.ico -------------------------------------------------------------------------------- /DevIL/include/IL/DevIL.i: -------------------------------------------------------------------------------- 1 | %module DevIL 2 | %{ 3 | #include "il.h" 4 | #include "ilu.h" 5 | #include "ilut.h" 6 | //#include "ilu_region.h" 7 | %} 8 | 9 | %include "il.h" 10 | %include "ilu.h" 11 | %include "ilut.h" 12 | //%include "ilu_region.h" 13 | 14 | -------------------------------------------------------------------------------- /DevIL/include/IL/build-lua: -------------------------------------------------------------------------------- 1 | IL_INCLUDE_PATH="/usr/include" 2 | IL_LIB_PATH="/usr/lib" 3 | LUA_INCLUDE_PATH="/usr/include/lua5.1" 4 | LUA_LIB_PATH="/usr/lib" 5 | OSX=no 6 | 7 | echo "Building the lua binding!" 8 | 9 | export SWIG_FEATURES="-I$IL_INCLUDE_PATH" 10 | swig -lua DevIL.i 11 | if [ $? -ne 0 ] ; then 12 | echo "swig Failed to build the lua interface" 13 | exit 1 14 | fi 15 | 16 | compile() { 17 | gcc luadevil.c "$1" -o luadevil "-L$LUA_LIB_PATH" "-I$LUA_INCLUDE_PATH" "-I$IL_LIB_PATH" -lIL -lILU -lILUT -llua5.1 &>/dev/null 18 | err=$? 19 | if [ "$OSX" = "no" ] ; then 20 | gcc -shared "$1" -o DevIL.so "-L$LUA_LIB_PATH" "-I$LUA_INCLUDE_PATH" "-I$IL_LIB_PATH" -lIL -lILU -lILUT &>/dev/null 21 | else 22 | gcc -bundle -undefined dynamic_lookup "$1" -o DevIL.so "-L$LUA_LIB_PATH" "-I$LUA_INCLUDE_PATH" "-I$IL_LIB_PATH" -lIL -lILU -lILUT &>/dev/null 23 | fi 24 | return $err 25 | } 26 | 27 | compile DevIL_wrap.c 28 | if [ $? -ne 0 ] ; then 29 | echo 'Failed compilation' 30 | echo 'On some platform the file malloc.h is not present and produces a compilation error' 31 | echo -n 'it can be removed safely, try [y/n] ? ' 32 | while read i ; do 33 | if [ "$i" = "y" ] ; then 34 | sed 's/\#include\ \//' < DevIL_wrap.c > DevIL_wrap.mod.c 35 | compile "DevIL_wrap.mod.c" 36 | if [ $? -ne 0 ] ; then 37 | echo 'still failing...' 38 | exit 2 39 | fi 40 | exit 0 41 | elif [ "$i" = "n" ] ; then 42 | echo 'ok, failing...' 43 | exit 3 44 | else 45 | echo 'Unknown command [y/n] ? ' 46 | fi 47 | done 48 | fi 49 | 50 | echo "ok!" 51 | exit 0 52 | -------------------------------------------------------------------------------- /DevIL/include/IL/build-python: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | IL_INCLUDE_PATH="/usr/local/include" 4 | IL_LIB_PATH="/usr/local/lib" 5 | PYTHON_INCLUDE_PATH="/usr/include/python2.5" 6 | 7 | swig "-I$IL_INCLUDE_PATH" -python -interface DevIL DevIL.i 8 | if [ $? -ne 0 ] ; then 9 | echo Error while building the swig interface 10 | exit 1 11 | fi 12 | 13 | gcc -shared "-I$IL_INCLUDE_PATH" "-I$PYTHON_INCLUDE_PATH" "-L$IL_LIB_PATH" -lIL -lILU -lILUT DevIL_wrap.c -o DevIL.so 14 | if [ $? -ne 0 ] ; then 15 | echo Error while compiling the python module 16 | fi 17 | echo "DevIL.py and DevIL.so are ready" 18 | -------------------------------------------------------------------------------- /DevIL/include/IL/ilu_region.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2002 by Denton Woods 5 | // Last modified: 07/09/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILU/src/ilu_region.h 8 | // 9 | // Description: Creates an image region. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef ILU_REGION_H 14 | #define ILU_REGION_H 15 | 16 | typedef struct Edge 17 | { 18 | ILint yUpper; 19 | ILfloat xIntersect, dxPerScan; 20 | struct Edge *next; 21 | } Edge; 22 | 23 | 24 | #endif//ILU_REGION_H 25 | 26 | -------------------------------------------------------------------------------- /DevIL/include/IL/ilut_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __ILUT_CONFIG_H__ 2 | #define __ILUT_CONFIG_H__ 3 | 4 | //#define IL_USE_PRAGMA_LIBS 5 | 6 | // Supported APIs (ILUT) 7 | 8 | // 9 | // sorry just 10 | // cant get this one to work under windows 11 | // have disabled for the now 12 | // 13 | // will look at it some more later 14 | // 15 | // Kriss 16 | // 17 | #undef ILUT_USE_ALLEGRO 18 | 19 | #undef ILUT_USE_DIRECTX8 20 | //#define ILUT_USE_DIRECTX9 21 | //#define ILUT_USE_DIRECTX10 22 | #define ILUT_USE_OPENGL 23 | //#define ILUT_USE_SDL 24 | #define ILUT_USE_WIN32 25 | 26 | #endif//__ILUT_CONFIG_H__ 27 | -------------------------------------------------------------------------------- /DevIL/include/IL/stamp-h.in: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /DevIL/src-IL/cmake/FindLCMS.cmake: -------------------------------------------------------------------------------- 1 | # - Find LCMS 2 | # Find the LCMS (Little Color Management System) library and includes and 3 | # This module defines 4 | # LCMS_INCLUDE_DIR, where to find lcms.h 5 | # LCMS_LIBRARIES, the libraries needed to use LCMS. 6 | # LCMS_DOT_VERSION, The version number of the LCMS library, e.g. "1.19" 7 | # LCMS_VERSION, Similar to LCMS_DOT_VERSION, but without the dots, e.g. "119" 8 | # LCMS_FOUND, If false, do not try to use LCMS. 9 | # 10 | # The minimum required version of LCMS can be specified using the 11 | # standard syntax, e.g. find_package(LCMS 1.10) 12 | 13 | # Copyright (c) 2008, Adrian Page, 14 | # Copyright (c) 2009, Cyrille Berger, 15 | # 16 | # Redistribution and use is allowed according to the terms of the BSD license. 17 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 18 | 19 | 20 | # use pkg-config to get the directories and then use these values 21 | # in the FIND_PATH() and FIND_LIBRARY() calls 22 | if(NOT WIN32) 23 | find_package(PkgConfig) 24 | pkg_check_modules(PC_LCMS lcms) 25 | set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER}) 26 | endif(NOT WIN32) 27 | 28 | find_path(LCMS_INCLUDE_DIR lcms.h 29 | HINTS 30 | ${PC_LCMS_INCLUDEDIR} 31 | ${PC_LCMS_INCLUDE_DIRS} 32 | PATH_SUFFIXES lcms liblcms1 33 | ) 34 | 35 | find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1 36 | HINTS 37 | ${PC_LCMS_LIBDIR} 38 | ${PC_LCMS_LIBRARY_DIRS} 39 | PATH_SUFFIXES lcms 40 | ) 41 | 42 | # Store the LCMS version number in the cache, so we don't have to search every time again 43 | if(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION) 44 | file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT) 45 | string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT}) 46 | if(LCMS_VERSION_MATCH) 47 | string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" _LCMS_VERSION ${LCMS_VERSION_MATCH}) 48 | string(SUBSTRING ${_LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION) 49 | string(SUBSTRING ${_LCMS_VERSION} 1 2 LCMS_MINOR_VERSION) 50 | endif(LCMS_VERSION_MATCH) 51 | set(LCMS_VERSION "${LCMS_MAJOR_VERSION}${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms" FORCE) 52 | set(LCMS_DOT_VERSION "${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms split into components" FORCE) 53 | endif(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION) 54 | 55 | include(FindPackageHandleStandardArgs) 56 | find_package_handle_standard_args(LCMS REQUIRED_VARS LCMS_LIBRARIES LCMS_INCLUDE_DIR 57 | VERSION_VAR LCMS_DOT_VERSION ) 58 | 59 | mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION) 60 | 61 | -------------------------------------------------------------------------------- /DevIL/src-IL/cmake/FindNVTT.cmake: -------------------------------------------------------------------------------- 1 | # Locate nvidia-texture-tools 2 | # This module defines 3 | # NVTT_LIBRARY 4 | # NVTT_FOUND, if false, do not try to link to nvtt 5 | # NVTT_INCLUDE_DIR, where to find the headers 6 | # 7 | 8 | 9 | FIND_PATH(NVTT_INCLUDE_DIR nvtt/nvtt.h 10 | PATHS 11 | /usr/local 12 | /usr 13 | $ENV{NVTT_DIR} 14 | ${3rdPartyRoot} 15 | PATH_SUFFIXES include 16 | ) 17 | 18 | # NVTT 19 | FIND_LIBRARY(NVTT_LIBRARY 20 | NAMES nvtt 21 | PATHS 22 | /usr/local 23 | /usr 24 | $ENV{NVTT_DIR} 25 | ${3rdPartyRoot} 26 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 27 | ) 28 | 29 | FIND_LIBRARY(NVTT_LIBRARY_DEBUG 30 | NAMES nvtt_d 31 | PATHS 32 | /usr/local 33 | /usr 34 | $ENV{NVTT_DIR} 35 | ${3rdPartyRoot} 36 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 37 | ) 38 | 39 | # NVIMAGE 40 | FIND_LIBRARY(NVIMAGE_LIBRARY 41 | NAMES nvimage 42 | PATHS 43 | /usr/local 44 | /usr 45 | $ENV{NVTT_DIR} 46 | ${3rdPartyRoot} 47 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 48 | ) 49 | 50 | FIND_LIBRARY(NVIMAGE_LIBRARY_DEBUG 51 | NAMES nvimage_d 52 | PATHS 53 | /usr/local 54 | /usr 55 | $ENV{NVTT_DIR} 56 | ${3rdPartyRoot} 57 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 58 | ) 59 | 60 | # NVMATH 61 | FIND_LIBRARY(NVMATH_LIBRARY 62 | NAMES nvmath 63 | PATHS 64 | /usr/local 65 | /usr 66 | $ENV{NVTT_DIR} 67 | ${3rdPartyRoot} 68 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 69 | ) 70 | 71 | FIND_LIBRARY(NVMATH_LIBRARY_DEBUG 72 | NAMES nvmath_d 73 | PATHS 74 | /usr/local 75 | /usr 76 | $ENV{NVTT_DIR} 77 | ${3rdPartyRoot} 78 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 79 | ) 80 | 81 | # NVCORE 82 | FIND_LIBRARY(NVCORE_LIBRARY 83 | NAMES nvcore 84 | PATHS 85 | /usr/local 86 | /usr 87 | $ENV{NVTT_DIR} 88 | ${3rdPartyRoot} 89 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 90 | ) 91 | FIND_LIBRARY(NVCORE_LIBRARY_DEBUG 92 | NAMES nvcore_d 93 | PATHS 94 | /usr/local 95 | /usr 96 | $ENV{NVTT_DIR} 97 | ${3rdPartyRoot} 98 | PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static 99 | ) 100 | 101 | 102 | 103 | 104 | SET(NVTT_FOUND "NO") 105 | IF(NVTT_LIBRARY AND NVTT_INCLUDE_DIR) 106 | SET(NVTT_FOUND "YES") 107 | ENDIF(NVTT_LIBRARY AND NVTT_INCLUDE_DIR) 108 | -------------------------------------------------------------------------------- /DevIL/src-IL/cmake/FindOpenEXR.cmake: -------------------------------------------------------------------------------- 1 | # Locate OpenEXR 2 | # This module defines 3 | # OPENEXR_LIBRARIES 4 | # OPENEXR_FOUND, if false, do not try to link to OpenEXR 5 | # OPENEXR_INCLUDE_DIR, where to find the headers 6 | # 7 | # $OPENEXR_DIR is an environment variable that would 8 | # correspond to the ./configure --prefix=$OPENEXR_DIR 9 | # 10 | # Created by Robert Osfield. 11 | 12 | 13 | FIND_PATH(OPENEXR_INCLUDE_DIR ImfIO.h 14 | $ENV{OPENEXR_DIR}/include/OpenEXR 15 | $ENV{OPENEXR_DIR}/include 16 | $ENV{OPENEXR_DIR} 17 | ~/Library/Frameworks 18 | /Library/Frameworks 19 | /usr/local/include 20 | /usr/include 21 | /sw/include # Fink 22 | /opt/local/include # DarwinPorts 23 | /opt/csw/include # Blastwave 24 | /opt/include 25 | /usr/freeware/include 26 | ) 27 | 28 | # Macro to find exr libraries (deduplicating search paths) 29 | # example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf) 30 | MACRO(OPENEXR_FIND_VAR varname libname) 31 | FIND_LIBRARY( ${varname} 32 | NAMES ${libname} 33 | PATHS 34 | $ENV{OPENEXR_DIR}/lib 35 | $ENV{OPENEXR_DIR} 36 | ~/Library/Frameworks 37 | /Library/Frameworks 38 | /usr/local/lib 39 | /usr/lib 40 | /sw/lib 41 | /opt/local/lib 42 | /opt/csw/lib 43 | /opt/lib 44 | /usr/freeware/lib64 45 | ) 46 | ENDMACRO(OPENEXR_FIND_VAR) 47 | 48 | # Macro to find exr libraries (and debug versions) 49 | # example: OPENEXR_FIND(IlmImf) 50 | MACRO(OPENEXR_FIND libname) 51 | OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY ${libname}) 52 | OPENEXR_FIND_VAR(OPENEXR_${libname}_LIBRARY_DEBUG ${libname}d) 53 | ENDMACRO(OPENEXR_FIND) 54 | 55 | OPENEXR_FIND(IlmImf) 56 | OPENEXR_FIND(IlmThread) 57 | OPENEXR_FIND(Iex) 58 | OPENEXR_FIND(Half) 59 | 60 | SET(OPENEXR_FOUND "NO") 61 | IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY) 62 | SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} ${OPENEXR_IlmThread_LIBRARY} ${OPENEXR_Half_LIBRARY} ${OPENEXR_Iex_LIBRARY} ) 63 | SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY OPENEXR_IlmThread_LIBRARY OPENEXR_Half_LIBRARY OPENEXR_Iex_LIBRARY ) 64 | SET(OPENEXR_FOUND "YES") 65 | ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY) 66 | -------------------------------------------------------------------------------- /DevIL/src-IL/cmake/README: -------------------------------------------------------------------------------- 1 | Custom modules for libraries which cmake doesn't have out-of-the-box 2 | support for. 3 | 4 | FindNVTT and FindOpenEXR are from OpenSceneGraph (OSG): 5 | 6 | http://trac.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/CMakeModules 7 | 8 | OSG is under a modified LGPL license. 9 | 10 | FindLCMS is from KDE (kdelibs/cmake/modules/) 11 | 12 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/altivec_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * altivec_typeconversion.h 3 | * DevIL 4 | * 5 | * Created by Meloni Dario on 17/04/05. 6 | * 7 | */ 8 | 9 | #include "il_internal.h" 10 | 11 | #ifdef ALTIVEC_GCC 12 | #ifndef ALTIVEC_COMMON 13 | #define ALTIVEC_COMMON 14 | 15 | typedef union { 16 | vector unsigned int vuint; 17 | unsigned int suint[4]; 18 | vector unsigned char vuchar; 19 | unsigned char suchar[4]; 20 | vector float vf; 21 | float sf[4]; 22 | } vector_t; 23 | 24 | // Loads 16 byte from the specified address, aligned or not 25 | //vector unsigned char load_unaligned( unsigned char *buffer ); 26 | 27 | // Fills a vector with the specified value 28 | vector float fill_vector_f( float value ); 29 | 30 | #define eround(v,x) (((int)((v/x)*10)%10) > 0 ? (v/x) : (v/x)+1) 31 | #define eround16(v) eround(v,16) 32 | 33 | #endif 34 | #endif 35 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/altivec_typeconversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * altivec_typeconversion.h 3 | * DevIL 4 | * 5 | * Created by Meloni Dario on 24/04/05. 6 | * 7 | */ 8 | 9 | #include "altivec_common.h" 10 | #ifdef ALTIVEC_GCC 11 | 12 | // data and newdata may be the same buffer 13 | 14 | // Used to convert RGB <-> BGR in various data types 15 | void abc2cba_byte( ILubyte *data, ILuint length, ILubyte *newdata ); 16 | void abc2cba_short( ILushort *data, ILuint length, ILushort *newdata ); 17 | void abc2cba_int( ILuint *data, ILuint length, ILuint *newdata ); 18 | #define abc2cba_float(x,y,z) abc2cba_int(((ILuint*)(x)),y,((ILuint*)(z))) 19 | void abc2cba_double( ILdouble *data, ILuint length, ILdouble *newdata ); 20 | 21 | // Used to convert RGBA <-> BGRA in various data types 22 | void abcd2cbad_byte( ILubyte *data, ILuint length, ILubyte *newdata ); 23 | void abcd2cbad_short( ILushort *data, ILuint length, ILushort *newdata ); 24 | void abcd2cbad_int( ILuint *data, ILuint length, ILuint *newdata ); 25 | #define abcd2cbad_float(x,y,z) abcd2cbad_int(((ILuint*)(x)),y,((ILuint*)(z))) 26 | void abcd2cbad_double( ILdouble *data, ILuint length, ILdouble *newdata ); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_alloc.h: -------------------------------------------------------------------------------- 1 | #ifndef ALLOC_H 2 | #define ALLOC_H 3 | 4 | /*#if defined(_WIN32) && defined(_MEM_DEBUG) 5 | void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line); 6 | void *m_alloc(unsigned long size, const char *file, unsigned long line); 7 | void f_ree(void *ptr); 8 | 9 | #ifdef malloc 10 | #undef malloc 11 | #endif 12 | 13 | #ifdef calloc 14 | #undef calloc 15 | #endif 16 | 17 | #ifdef free 18 | #undef free 19 | #endif 20 | 21 | 22 | #define malloc(size) m_alloc(size, __FILE__, __LINE__) 23 | #define calloc(size, num) c_alloc(size, num, __FILE__, __LINE__) 24 | #define free(addr) f_ree(addr) 25 | #endif//defined(_WIN32) && defined(_MEM_DEBUG)*/ 26 | 27 | 28 | #if defined (__ALLOC_C) 29 | #define __ALLOC_EXTERN 30 | #else 31 | #define __ALLOC_EXTERN extern 32 | #endif 33 | #include 34 | 35 | 36 | __ALLOC_EXTERN mAlloc ialloc_ptr; 37 | __ALLOC_EXTERN mFree ifree_ptr; 38 | 39 | 40 | 41 | #endif//ALLOC_H 42 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_bits.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_bits.h 8 | // 9 | // Description: Implements a file class that reads/writes bits directly. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef BITS_H 15 | #define BITS_H 16 | 17 | #include "il_internal.h" 18 | 19 | 20 | // Struct for dealing with reading bits from a file 21 | typedef struct BITFILE 22 | { 23 | ILHANDLE File; 24 | ILuint BitPos; 25 | ILint ByteBitOff; 26 | ILubyte Buff; 27 | } BITFILE; 28 | 29 | // Functions for reading bits from a file 30 | //BITFILE* bopen(const char *FileName, const char *Mode); 31 | ILint bclose(BITFILE *BitFile); 32 | BITFILE* bfile(ILHANDLE File); 33 | ILint btell(BITFILE *BitFile); 34 | ILint bseek(BITFILE *BitFile, ILuint Offset, ILuint Mode); 35 | ILint bread(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile); 36 | //ILint bwrite(void *Buffer, ILuint Size, ILuint Number, BITFILE *BitFile); 37 | 38 | // Useful macros for manipulating bits 39 | #define SetBits(var, bits) (var |= bits) 40 | #define ClearBits(var, bits) (var &= ~(bits)) 41 | 42 | 43 | #endif//BITS_H 44 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_bmp.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 09/01/2003 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_bmp.h 8 | // 9 | // Description: Reads and writes to a bitmap (.bmp) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef BMP_H 15 | #define BMP_H 16 | 17 | #include "il_internal.h" 18 | 19 | #ifdef _WIN32 20 | #pragma pack(push, bmp_struct, 1) 21 | #endif 22 | typedef struct BMPHEAD { 23 | ILushort bfType; 24 | ILint bfSize; 25 | ILuint bfReserved; 26 | ILint bfDataOff; 27 | ILint biSize; 28 | ILint biWidth; 29 | ILint biHeight; 30 | ILshort biPlanes; 31 | ILshort biBitCount; 32 | ILint biCompression; 33 | ILint biSizeImage; 34 | ILint biXPelsPerMeter; 35 | ILint biYPelsPerMeter; 36 | ILint biClrUsed; 37 | ILint biClrImportant; 38 | } IL_PACKSTRUCT BMPHEAD; 39 | 40 | typedef struct OS2_HEAD 41 | { 42 | // Bitmap file header. 43 | ILushort bfType; 44 | ILuint biSize; 45 | ILshort xHotspot; 46 | ILshort yHotspot; 47 | ILuint DataOff; 48 | 49 | // Bitmap core header. 50 | ILuint cbFix; 51 | //2003-09-01: changed cx, cy to ushort according to MSDN 52 | ILushort cx; 53 | ILushort cy; 54 | ILushort cPlanes; 55 | ILushort cBitCount; 56 | } IL_PACKSTRUCT OS2_HEAD; 57 | #ifdef _WIN32 58 | #pragma pack(pop, bmp_struct) 59 | #endif 60 | 61 | // Internal functions 62 | ILboolean iGetBmpHead(BMPHEAD * const Header); 63 | ILboolean iGetOS2Head(OS2_HEAD * const Header); 64 | ILboolean iIsValidBmp(); 65 | ILboolean iCheckBmp(const BMPHEAD *CONST_RESTRICT Header); 66 | ILboolean iCheckOS2(const OS2_HEAD *CONST_RESTRICT Header); 67 | ILboolean iLoadBitmapInternal(); 68 | ILboolean iSaveBitmapInternal(); 69 | ILboolean ilReadUncompBmp(BMPHEAD *Info); 70 | ILboolean ilReadRLE8Bmp(BMPHEAD *Info); 71 | ILboolean ilReadRLE4Bmp(BMPHEAD *Info); 72 | ILboolean iGetOS2Bmp(OS2_HEAD *Header); 73 | 74 | #ifdef IL_BMP_C 75 | #undef NOINLINE 76 | #undef INLINE 77 | #define INLINE 78 | #endif 79 | 80 | #ifndef NOINLINE 81 | INLINE void GetShiftFromMask(const ILuint Mask, ILuint * CONST_RESTRICT ShiftLeft, ILuint * CONST_RESTRICT ShiftRight) { 82 | ILuint Temp, i; 83 | 84 | if( Mask == 0 ) { 85 | *ShiftLeft = *ShiftRight = 0; 86 | return; 87 | } 88 | 89 | Temp = Mask; 90 | for( i = 0; i < 32; i++, Temp >>= 1 ) { 91 | if( Temp & 1 ) 92 | break; 93 | } 94 | *ShiftRight = i; 95 | 96 | // Temp is preserved, so use it again: 97 | for( i = 0; i < 8; i++, Temp >>= 1 ) { 98 | if( !(Temp & 1) ) 99 | break; 100 | } 101 | *ShiftLeft = 8 - i; 102 | 103 | return; 104 | } 105 | #endif 106 | 107 | #endif//BMP_H 108 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_dcx.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/26/2009 6 | // 7 | // Filename: src-IL/include/il_dcx.h 8 | // 9 | // Description: Reads from a .dcx file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef DCX_H 15 | #define DCX_H 16 | 17 | #include "il_internal.h" 18 | 19 | 20 | #ifdef _WIN32 21 | #pragma pack(push, packed_struct, 1) 22 | #endif 23 | typedef struct DCXHEAD 24 | { 25 | ILubyte Manufacturer; 26 | ILubyte Version; 27 | ILubyte Encoding; 28 | ILubyte Bpp; 29 | ILushort Xmin, Ymin, Xmax, Ymax; 30 | ILushort HDpi; 31 | ILushort VDpi; 32 | ILubyte ColMap[48]; 33 | ILubyte Reserved; 34 | ILubyte NumPlanes; 35 | ILushort Bps; 36 | ILushort PaletteInfo; 37 | ILushort HScreenSize; 38 | ILushort VScreenSize; 39 | ILubyte Filler[54]; 40 | } IL_PACKSTRUCT DCXHEAD; 41 | #ifdef _WIN32 42 | #pragma pack(pop, packed_struct) 43 | #endif 44 | 45 | // For checking and reading 46 | ILboolean iIsValidDcx(void); 47 | ILboolean iCheckDcx(DCXHEAD *Header); 48 | ILboolean iLoadDcxInternal(void); 49 | ILimage* iUncompressDcx(DCXHEAD *Header); 50 | ILimage* iUncompressDcxSmall(DCXHEAD *Header); 51 | 52 | #endif//PCX_H 53 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_exr.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 08/29/2008 6 | // 7 | // Filename: src-IL/include/il_exr.h 8 | // 9 | // Description: Reads from an OpenEXR (.exr) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef EXR_H 15 | #define EXR_H 16 | 17 | #include "il_internal.h" 18 | #include 19 | 20 | 21 | //using namespace Imf; // Using this leads to errors with Microsoft's IStream. 22 | // So it is better to just specify the namespace explicitly. 23 | 24 | 25 | typedef struct EXRHEAD 26 | { 27 | ILuint MagicNumber; // File signature (0x76, 0x2f, 0x31, 0x01) 28 | ILuint Version; // Treated as two bitfields 29 | } IL_PACKSTRUCT EXRHEAD; 30 | 31 | //@TODO: Should I just do these as enums? 32 | #define EXR_UINT 0 33 | #define EXR_HALF 1 34 | #define EXR_FLOAT 2 35 | 36 | #define EXR_NO_COMPRESSION 0 37 | #define EXR_RLE_COMPRESSION 1 38 | #define EXR_ZIPS_COMPRESSION 2 39 | #define EXR_ZIP_COMPRESSION 3 40 | #define EXR_PIZ_COMPRESSION 4 41 | #define EXR_PXR24_COMPRESSION 5 42 | #define EXR_B44_COMPRESSION 6 43 | #define EXR_B44A_COMPRESSION 7 44 | 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | ILboolean iIsValidExr(); 51 | ILboolean iCheckExr(EXRHEAD *Header); 52 | ILboolean iLoadExrInternal(); 53 | ILboolean iSaveExrInternal(); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | class ilIStream : public Imf::IStream 60 | { 61 | public: 62 | ilIStream(/*ILHANDLE Handle*/); 63 | virtual bool read (char c[/*n*/], int n); 64 | // I don't think I need this one, since we are taking care of the file handles ourselves. 65 | //virtual char * readMemoryMapped (int n); 66 | virtual Imf::Int64 tellg (); 67 | virtual void seekg (Imf::Int64 Pos); 68 | virtual void clear (); 69 | 70 | protected: 71 | 72 | private: 73 | }; 74 | 75 | class ilOStream : public Imf::OStream 76 | { 77 | public: 78 | ilOStream(/*ILHANDLE Handle*/); 79 | virtual void write (const char c[/*n*/], int n); 80 | // I don't think I need this one, since we are taking care of the file handles ourselves. 81 | //virtual char * readMemoryMapped (int n); 82 | virtual Imf::Int64 tellp (); 83 | virtual void seekp (Imf::Int64 Pos); 84 | 85 | protected: 86 | 87 | private: 88 | }; 89 | 90 | #endif//EXR_H 91 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_gif.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/14/2009 6 | // 7 | // Filename: src-IL/include/il_gif.h 8 | // 9 | // Description: Reads from a Graphics Interchange Format (.gif) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef GIF_H 15 | #define GIF_H 16 | 17 | #include "il_internal.h" 18 | 19 | #define GIF87A 87 20 | #define GIF89A 89 21 | 22 | #ifdef _WIN32 23 | #pragma pack(push, gif_struct, 1) 24 | #endif 25 | typedef struct GIFHEAD 26 | { 27 | char Sig[6]; 28 | ILushort Width; 29 | ILushort Height; 30 | ILubyte ColourInfo; 31 | ILubyte Background; 32 | ILubyte Aspect; 33 | } IL_PACKSTRUCT GIFHEAD; 34 | 35 | typedef struct IMAGEDESC 36 | { 37 | ILubyte Separator; 38 | ILushort OffX; 39 | ILushort OffY; 40 | ILushort Width; 41 | ILushort Height; 42 | ILubyte ImageInfo; 43 | } IL_PACKSTRUCT IMAGEDESC; 44 | 45 | typedef struct GFXCONTROL 46 | { 47 | ILubyte Size; 48 | ILubyte Packed; 49 | ILushort Delay; 50 | ILubyte Transparent; 51 | ILubyte Terminator; 52 | ILboolean Used; //this stores if a gfxcontrol was read - it is IL_FALSE (!) 53 | 54 | //if a gfxcontrol was read from the file, IL_TRUE otherwise 55 | } IL_PACKSTRUCT GFXCONTROL; 56 | #ifdef _WIN32 57 | #pragma pack(pop, gif_struct) 58 | #endif 59 | 60 | // Internal functions 61 | ILboolean iLoadGifInternal(void); 62 | ILboolean ilLoadGifF(ILHANDLE File); 63 | ILboolean iIsValidGif(void); 64 | ILboolean iGetPalette(ILubyte Info, ILpal *Pal, ILboolean UsePrevPal, ILimage *PrevImage); 65 | ILboolean GetImages(ILpal *GlobalPal, GIFHEAD *GifHead); 66 | ILboolean SkipExtensions(GFXCONTROL *Gfx); 67 | ILboolean GifGetData(ILimage *Image, ILubyte *Data, ILuint ImageSize, ILuint Width, ILuint Height, ILuint Stride, ILuint PalOffset, GFXCONTROL *Gfx); 68 | ILboolean RemoveInterlace(ILimage *image); 69 | ILboolean ConvertTransparent(ILimage *Image, ILubyte TransColour); 70 | 71 | #endif//GIF_H 72 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_hdr.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2004 by Denton Woods (this file by thakis) 5 | // Last modified: 06/09/2004 6 | // 7 | // Filename: src-IL/include/il_hdr.h 8 | // 9 | // Description: Reads a RADIANCE High Dynamic Range Image 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef HDR_H 15 | #define HDR_H 16 | 17 | #include "il_internal.h" 18 | 19 | #ifdef _WIN32 20 | #pragma pack(push, gif_struct, 1) 21 | #endif 22 | 23 | typedef struct HDRHEADER 24 | { 25 | char Signature[10]; //must be "#?RADIANCE" 26 | ILuint Width, Height; 27 | } IL_PACKSTRUCT HDRHEADER; 28 | 29 | #ifdef _WIN32 30 | #pragma pack(pop, gif_struct) 31 | #endif 32 | 33 | // Internal functions 34 | ILboolean ilIsValidHdrF(ILHANDLE file); 35 | ILboolean iIsValidHdr(); 36 | ILboolean iCheckHdr(HDRHEADER *Header); 37 | ILboolean ilLoadHdrF(ILHANDLE file); 38 | ILboolean iLoadHdrInternal(); 39 | ILboolean iSaveHdrInternal(); 40 | 41 | void ReadScanline(ILubyte *scanline, ILuint w); 42 | 43 | #endif//HDR_H 44 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_icns.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 08/23/2008 6 | // 7 | // Filename: src-IL/include/il_icns.h 8 | // 9 | // Description: Reads from a Mac OS X icon (.icns) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef ICNS_H 15 | #define ICNS_H 16 | 17 | #include "il_internal.h" 18 | 19 | #ifdef _WIN32 20 | #pragma pack(push, icns_struct, 1) 21 | #endif 22 | typedef struct ICNSHEAD 23 | { 24 | char Head[4]; // Must be 'ICNS' 25 | ILint Size; // Total size of the file (including header) 26 | } IL_PACKSTRUCT ICNSHEAD; 27 | 28 | typedef struct ICNSDATA 29 | { 30 | char ID[4]; // Identifier ('it32', 'il32', etc.) 31 | ILint Size; // Total size of the entry (including identifier) 32 | } IL_PACKSTRUCT ICNSDATA; 33 | 34 | #ifdef _WIN32 35 | #pragma pack(pop, icns_struct) 36 | #endif 37 | 38 | ILboolean iIsValidIcns(); 39 | ILboolean iLoadIcnsInternal(); 40 | ILboolean iIcnsReadData(ILboolean *BaseCreated, ILboolean IsAlpha, ILint Width, ICNSDATA *Entry, ILimage **Image); 41 | 42 | #endif//ICNS_H 43 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_icon.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_icon.h 8 | // 9 | // Description: Reads from a Windows icon (.ico) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef ICON_H 15 | #define ICON_H 16 | 17 | #include "il_internal.h" 18 | 19 | #ifdef _WIN32 20 | #pragma pack(push, ico_struct, 1) 21 | #endif 22 | typedef struct ICODIR 23 | { 24 | ILshort Reserved; // Reserved (must be 0) 25 | ILshort Type; // Type (1 for icons, 2 for cursors) 26 | ILshort Count; // How many different images? 27 | } IL_PACKSTRUCT ICODIR; 28 | 29 | typedef struct ICODIRENTRY 30 | { 31 | ILubyte Width; // Width, in pixels 32 | ILubyte Height; // Height, in pixels 33 | ILubyte NumColours; // Number of colors in image (0 if >=8bpp) 34 | ILubyte Reserved; // Reserved (must be 0) 35 | ILshort Planes; // Colour planes 36 | ILshort Bpp; // Bits per pixel 37 | ILuint SizeOfData; // How many bytes in this resource? 38 | ILuint Offset; // Offset from beginning of the file 39 | } IL_PACKSTRUCT ICODIRENTRY; 40 | 41 | typedef struct INFOHEAD 42 | { 43 | ILint Size; 44 | ILint Width; 45 | ILint Height; 46 | ILshort Planes; 47 | ILshort BitCount; 48 | ILint Compression; 49 | ILint SizeImage; 50 | ILint XPixPerMeter; 51 | ILint YPixPerMeter; 52 | ILint ColourUsed; 53 | ILint ColourImportant; 54 | } IL_PACKSTRUCT INFOHEAD; 55 | 56 | typedef struct ICOIMAGE 57 | { 58 | INFOHEAD Head; 59 | ILubyte *Pal; // Palette 60 | ILubyte *Data; // XOR mask 61 | ILubyte *AND; // AND mask 62 | } ICOIMAGE; 63 | #ifdef _WIN32 64 | #pragma pack(pop, ico_struct) 65 | #endif 66 | 67 | ILboolean iLoadIconInternal(); 68 | ILboolean iLoadIconPNG(ICOIMAGE *Icon); 69 | 70 | #endif//ICON_H 71 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_jp2.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 08/24/2008 6 | // 7 | // Filename: src-IL/src/il_jp2.h 8 | // 9 | // Description: Jpeg-2000 (.jp2) functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef JP2_H 14 | #define JP2_H 15 | 16 | #include "il_internal.h" 17 | 18 | ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image); 19 | ILboolean iSaveJp2Internal(); 20 | jas_stream_t *iJp2ReadStream(); 21 | 22 | #endif//JP2_H 23 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_jpeg.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 03/07/2009 6 | // 7 | // Filename: src-IL/include/il_jpeg.h 8 | // 9 | // Description: Jpeg (.jpg) functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef JPEG_H 14 | #define JPEG_H 15 | 16 | #include "il_internal.h" 17 | 18 | ILboolean iCheckJpg(ILubyte Header[2]); 19 | ILboolean iIsValidJpg(void); 20 | 21 | #ifndef IL_USE_IJL 22 | ILboolean iLoadJpegInternal(void); 23 | ILboolean iSaveJpegInternal(void); 24 | #else 25 | ILboolean iLoadJpegInternal(ILconst_string FileName, ILvoid *Lump, ILuint Size); 26 | ILboolean iSaveJpegInternal(ILconst_string FileName, ILvoid *Lump, ILuint Size); 27 | #endif 28 | 29 | #endif//JPEG_H 30 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_lif.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2001 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_lif.c 8 | // 9 | // Description: Reads a Homeworld image. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef LIF_H 15 | #define LIF_H 16 | 17 | #include "il_internal.h" 18 | 19 | typedef struct LIF_HEAD 20 | { 21 | char Id[8]; //"Willy 7" 22 | ILuint Version; // Version Number (260) 23 | ILuint Flags; // Usually 50 24 | ILuint Width; 25 | ILuint Height; 26 | ILuint PaletteCRC; // CRC of palettes for fast comparison. 27 | ILuint ImageCRC; // CRC of the image. 28 | ILuint PalOffset; // Offset to the palette (not used). 29 | ILuint TeamEffect0; // Team effect offset 0 30 | ILuint TeamEffect1; // Team effect offset 1 31 | } LIF_HEAD; 32 | 33 | ILboolean iIsValidLif(void); 34 | ILboolean iCheckLif(LIF_HEAD *Header); 35 | ILboolean iLoadLifInternal(void); 36 | 37 | #endif//LIF_H 38 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_manip.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2001-2002 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_manip.h 8 | // 9 | // Description: Image manipulation 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef MANIP_H 14 | #define MANIP_H 15 | 16 | #ifdef _cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | ILboolean ilFlipImage(void); 21 | ILboolean ilMirrorImage(void); //@JASON New routine created 03/28/2001 22 | 23 | 24 | //----------------------------------------------- 25 | // Overflow handler for float-to-half conversion; 26 | // generates a hardware floating-point overflow, 27 | // which may be trapped by the operating system. 28 | //----------------------------------------------- 29 | 30 | #ifndef NOINLINE 31 | #define INLINE 32 | 33 | #if defined(_MSC_VER) 34 | #pragma warning(push) 35 | #pragma warning(disable : 4756) // Disables 'named type definition in parentheses' warning 36 | #endif 37 | 38 | ILfloat /*ILAPIENTRY*/ ilFloatToHalfOverflow(); 39 | ILushort ILAPIENTRY ilFloatToHalf(ILuint i); 40 | ILuint ILAPIENTRY ilHalfToFloat(ILushort y); 41 | 42 | #if defined(_MSC_VER) 43 | #pragma warning(pop) 44 | #endif 45 | 46 | //----------------------------------------------------- 47 | // Float-to-half conversion -- general case, including 48 | // zeroes, denormalized numbers and exponent overflows. 49 | //----------------------------------------------------- 50 | ILushort ILAPIENTRY ilFloatToHalf(ILuint i); 51 | 52 | #endif //NOINLINE 53 | 54 | #ifdef _cplusplus 55 | } 56 | #endif 57 | 58 | #endif//MANIP_H 59 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_mdl.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_mdl.h 8 | // 9 | // Description: Reads a Half-Life model file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef MD2_H 15 | #define MD2_H 16 | 17 | #include "il_internal.h" 18 | 19 | typedef struct TEX_HEAD 20 | { 21 | char Name[64]; 22 | ILuint Flags; 23 | ILuint Width; 24 | ILuint Height; 25 | ILuint Offset; 26 | } TEX_HEAD; 27 | 28 | #endif//MD2_H 29 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_pal.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_pal.h 8 | // 9 | // Description: Loads palettes from different file formats 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef IL_PAL_H 15 | #define IL_PAL_H 16 | 17 | #include "il_internal.h" 18 | 19 | #define BUFFLEN 256 20 | #define PALBPP 3 21 | 22 | #ifdef _MSC_VER 23 | #pragma pack(push, packed_struct, 1) 24 | #endif 25 | typedef struct HALOHEAD 26 | { 27 | ILushort Id; // 'AH' 28 | ILshort Version; 29 | ILshort Size; 30 | ILbyte Filetype; 31 | ILbyte Subtype; 32 | //ILshort Brdid, Grmode; 33 | ILint Ignored; 34 | ILushort MaxIndex; // Colors = maxindex + 1 35 | ILushort MaxRed; 36 | ILushort MaxGreen; 37 | ILushort MaxBlue; 38 | /*ILbyte Signature[8]; 39 | ILbyte Filler[12];*/ 40 | ILbyte Filler[20]; // Always 0 by PSP 4 41 | } IL_PACKSTRUCT HALOHEAD; 42 | #ifdef _MSC_VER 43 | #pragma pack(pop, packed_struct) 44 | #endif 45 | 46 | ILboolean ilLoadJascPal(ILconst_string FileName); 47 | ILboolean ilSaveJascPal(ILconst_string FileName); 48 | char *iFgetw(ILubyte *Buff, ILint MaxLen, FILE *File); 49 | ILboolean ilLoadHaloPal(ILconst_string FileName); 50 | ILboolean ilLoadColPal(ILconst_string FileName); 51 | ILboolean ilLoadActPal(ILconst_string FileName); 52 | ILboolean ilLoadPltPal(ILconst_string FileName); 53 | 54 | #endif//IL_PAL_H 55 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_pcx.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_pcx.h 8 | // 9 | // Description: Reads and writes from/to a .pcx file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef PCX_H 15 | #define PCX_H 16 | 17 | #include "il_internal.h" 18 | 19 | 20 | #ifdef _WIN32 21 | #pragma pack(push, packed_struct, 1) 22 | #endif 23 | typedef struct PCXHEAD 24 | { 25 | ILubyte Manufacturer; 26 | ILubyte Version; 27 | ILubyte Encoding; 28 | ILubyte Bpp; 29 | ILushort Xmin, Ymin, Xmax, Ymax; 30 | ILushort HDpi; 31 | ILushort VDpi; 32 | ILubyte ColMap[48]; 33 | ILubyte Reserved; 34 | ILubyte NumPlanes; 35 | ILushort Bps; 36 | ILushort PaletteInfo; 37 | ILushort HScreenSize; 38 | ILushort VScreenSize; 39 | ILubyte Filler[54]; 40 | } IL_PACKSTRUCT PCXHEAD; 41 | #ifdef _WIN32 42 | #pragma pack(pop, packed_struct) 43 | #endif 44 | 45 | // For checking and reading 46 | ILboolean iIsValidPcx(void); 47 | ILboolean iCheckPcx(PCXHEAD *Header); 48 | ILboolean iLoadPcxInternal(void); 49 | ILboolean iSavePcxInternal(void); 50 | ILboolean iUncompressPcx(PCXHEAD *Header); 51 | ILboolean iUncompressSmall(PCXHEAD *Header); 52 | 53 | // For writing 54 | ILuint encput(ILubyte byt, ILubyte cnt); 55 | ILuint encLine(ILubyte *inBuff, ILint inLen, ILubyte Stride); 56 | 57 | 58 | #endif//PCX_H 59 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_pic.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/21/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_pic.h 8 | // 9 | // Description: Softimage Pic (.pic) functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef PIC_H 15 | #define PIC_H 16 | 17 | #include "il_internal.h" 18 | 19 | #ifdef _MSC_VER 20 | #pragma pack(push, packed_struct, 1) 21 | #endif 22 | typedef struct PIC_HEAD 23 | { 24 | ILint Magic; // PIC_MAGIC_NUMBER 25 | ILfloat Version; // Version of format 26 | ILbyte Comment[80]; // Prototype description 27 | ILbyte Id[4]; // 'PICT' 28 | ILshort Width; // Image width, in pixels 29 | ILshort Height; // Image height, in pixels 30 | ILfloat Ratio; // Pixel aspect ratio 31 | ILshort Fields; // Picture field type 32 | ILshort Padding; // Unused 33 | } IL_PACKSTRUCT PIC_HEAD; 34 | 35 | typedef struct CHANNEL 36 | { 37 | ILubyte Size; 38 | ILubyte Type; 39 | ILubyte Chan; 40 | void *Next; 41 | } CHANNEL; 42 | #ifdef _MSC_VER 43 | #pragma pack(pop, packed_struct) 44 | #endif 45 | 46 | 47 | // Data type 48 | #define PIC_UNSIGNED_INTEGER 0x00 49 | #define PIC_SIGNED_INTEGER 0x10 // XXX: Not implemented 50 | #define PIC_SIGNED_FLOAT 0x20 // XXX: Not implemented 51 | 52 | 53 | // Compression type 54 | #define PIC_UNCOMPRESSED 0x00 55 | #define PIC_PURE_RUN_LENGTH 0x01 56 | #define PIC_MIXED_RUN_LENGTH 0x02 57 | 58 | // CHANNEL types (OR'd) 59 | #define PIC_RED_CHANNEL 0x80 60 | #define PIC_GREEN_CHANNEL 0x40 61 | #define PIC_BLUE_CHANNEL 0x20 62 | #define PIC_ALPHA_CHANNEL 0x10 63 | #define PIC_SHADOW_CHANNEL 0x08 // XXX: Not implemented 64 | #define PIC_DEPTH_CHANNEL 0x04 // XXX: Not implemented 65 | #define PIC_AUXILIARY_1_CHANNEL 0x02 // XXX: Not implemented 66 | #define PIC_AUXILIARY_2_CHANNEL 0x01 // XXX: Not implemented 67 | 68 | ILboolean iIsValidPic(void); 69 | ILboolean iCheckPic(PIC_HEAD *Header); 70 | ILboolean iLoadPicInternal(void); 71 | ILboolean readScanlines(ILuint *image, ILint width, ILint height, CHANNEL *channel, ILuint alpha); 72 | ILuint readScanline(ILubyte *scan, ILint width, CHANNEL *channel, ILint bytes); 73 | ILboolean channelReadRaw(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes); 74 | ILboolean channelReadPure(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes); 75 | ILboolean channelReadMixed(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes); 76 | 77 | 78 | 79 | #endif//PIC_H 80 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_pnm.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_pnm.h 8 | // 9 | // Description: Reads/writes to/from pbm/pgm/ppm formats 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef PPMPGM_H 15 | #define PPMPGM_H 16 | 17 | #include "il_internal.h" 18 | #include 19 | 20 | using namespace std; 21 | 22 | 23 | #define IL_PBM_ASCII 0x0001 24 | #define IL_PGM_ASCII 0x0002 25 | #define IL_PPM_ASCII 0x0003 26 | #define IL_PBM_BINARY 0x0004 27 | #define IL_PGM_BINARY 0x0005 28 | #define IL_PPM_BINARY 0x0006 29 | #define IL_PAM 0x0007 30 | 31 | enum PamTuples { PAM_BW = 1, PAM_GRAY, PAM_RGB, PAM_BW_ALPHA, PAM_GRAY_ALPHA, PAM_RGB_ALPHA }; 32 | 33 | typedef struct PPMINFO 34 | { 35 | ILenum Type; 36 | ILuint Width; 37 | ILuint Height; 38 | ILuint Depth; 39 | ILuint MaxColour; 40 | ILubyte Bpp; 41 | ILubyte TuplType; 42 | } PPMINFO; 43 | 44 | ILboolean iIsValidPnm(void); 45 | ILboolean iCheckPnm(char Header[2]); 46 | ILboolean iLoadPnmInternal(void); 47 | ILboolean iSavePnmInternal(void); 48 | ILimage *ilReadAsciiPpm(PPMINFO *Info); 49 | ILimage *ilReadBinaryPpm(PPMINFO *Info); 50 | ILimage *ilReadBitPbm(PPMINFO *Info); 51 | ILboolean ilReadPam(void); 52 | ILboolean iGetWord(ILboolean); 53 | void PbmMaximize(ILimage *Image); 54 | ILint DecodeTupleType(string &TupleStr); 55 | 56 | 57 | #endif//PPMPGM_H 58 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_psd.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2001 by Denton Woods 5 | // Last modified: 01/23/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_il_psd.c 8 | // 9 | // Description: Reads from a PhotoShop (.psd) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef PSD_H 15 | #define PSD_H 16 | 17 | #include "il_internal.h" 18 | 19 | #ifdef _MSC_VER 20 | #pragma pack(push, packed_struct, 1) 21 | #endif 22 | typedef struct PSDHEAD 23 | { 24 | ILubyte Signature[4]; 25 | ILushort Version; 26 | ILubyte Reserved[6]; 27 | ILushort Channels; 28 | ILuint Height; 29 | ILuint Width; 30 | ILushort Depth; 31 | ILushort Mode; 32 | } IL_PACKSTRUCT PSDHEAD; 33 | 34 | #ifdef _MSC_VER 35 | #pragma pack(pop, packed_struct) 36 | #endif 37 | 38 | ILushort ChannelNum; 39 | 40 | ILboolean iIsValidPsd(void); 41 | ILboolean iCheckPsd(PSDHEAD *Header); 42 | ILboolean iLoadPsdInternal(void); 43 | ILboolean ReadPsd(PSDHEAD *Head); 44 | ILboolean ReadGrey(PSDHEAD *Head); 45 | ILboolean ReadIndexed(PSDHEAD *Head); 46 | ILboolean ReadRGB(PSDHEAD *Head); 47 | ILboolean ReadCMYK(PSDHEAD *Head); 48 | ILuint *GetCompChanLen(PSDHEAD *Head); 49 | ILboolean PsdGetData(PSDHEAD *Head, void *Buffer, ILboolean Compressed); 50 | ILboolean ParseResources(ILuint ResourceSize, ILubyte *Resources); 51 | ILboolean GetSingleChannel(PSDHEAD *Head, ILubyte *Buffer, ILboolean Compressed); 52 | ILboolean iSavePsdInternal(void); 53 | 54 | 55 | 56 | #endif//PSD_H 57 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_register.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_register.h 8 | // 9 | // Description: Allows the caller to specify user-defined callback functions 10 | // to open files DevIL does not support, to parse files 11 | // differently, or anything else a person can think up. 12 | // 13 | //----------------------------------------------------------------------------- 14 | 15 | 16 | #ifndef REGISTER_H 17 | #define REGISTER_H 18 | 19 | #include "il_internal.h" 20 | 21 | typedef struct iFormatL 22 | { 23 | ILstring Ext; 24 | IL_LOADPROC Load; 25 | struct iFormatL *Next; 26 | } iFormatL; 27 | 28 | typedef struct iFormatS 29 | { 30 | ILstring Ext; 31 | IL_SAVEPROC Save; 32 | struct iFormatS *Next; 33 | } iFormatS; 34 | 35 | #define I_LOAD_FUNC 0 36 | #define I_SAVE_FUNC 1 37 | 38 | ILboolean iRegisterLoad(ILconst_string FileName); 39 | ILboolean iRegisterSave(ILconst_string FileName); 40 | 41 | #endif//REGISTER_H 42 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_rle.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_rle.h 8 | // 9 | // Description: Functions for run-length encoding 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef RLE_H 14 | #define RLE_H 15 | 16 | #include "il_internal.h" 17 | 18 | #define TGA_MAX_RUN 128 19 | #define SGI_MAX_RUN 127 20 | #define BMP_MAX_RUN 127 21 | 22 | #ifdef IL_RLE_C 23 | #undef NOINLINE 24 | #undef INLINE 25 | #define INLINE 26 | #endif 27 | 28 | #ifndef NOINLINE 29 | INLINE ILuint GetPix(ILubyte *p, ILuint bpp) { 30 | ILuint Pixel; 31 | Pixel = (ILuint)*p++; 32 | 33 | while( bpp-- > 1 ) { 34 | Pixel <<= 8; 35 | Pixel |= (ILuint)*p++; 36 | } 37 | return Pixel; 38 | } 39 | 40 | INLINE ILint CountDiffPixels(ILubyte *p, ILuint bpp, ILuint pixCnt) { 41 | ILuint pixel; 42 | ILuint nextPixel = 0; 43 | ILint n; 44 | 45 | n = 0; 46 | if (pixCnt == 1) 47 | return pixCnt; 48 | pixel = GetPix(p, bpp); 49 | 50 | while (pixCnt > 1) { 51 | p += bpp; 52 | nextPixel = GetPix(p, bpp); 53 | if (nextPixel == pixel) 54 | break; 55 | pixel = nextPixel; 56 | ++n; 57 | --pixCnt; 58 | } 59 | 60 | if (nextPixel == pixel) 61 | return n; 62 | return n + 1; 63 | } 64 | 65 | 66 | INLINE ILint CountSamePixels(ILubyte *p, ILuint bpp, ILuint pixCnt) { 67 | ILuint pixel; 68 | ILuint nextPixel; 69 | ILint n; 70 | 71 | n = 1; 72 | pixel = GetPix(p, bpp); 73 | pixCnt--; 74 | 75 | while (pixCnt > 0) { 76 | p += bpp; 77 | nextPixel = GetPix(p, bpp); 78 | if (nextPixel != pixel) 79 | break; 80 | ++n; 81 | --pixCnt; 82 | } 83 | 84 | return n; 85 | } 86 | #endif 87 | 88 | ILuint GetPix(ILubyte *p, ILuint bpp); 89 | ILint CountDiffPixels(ILubyte *p, ILuint bpp, ILuint pixCnt); 90 | ILint CountSamePixels(ILubyte *p, ILuint bpp, ILuint pixCnt); 91 | 92 | #endif//RLE_H 93 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_sgi.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/sgi.h 8 | // 9 | // Description: Reads from and writes to SGI graphics files. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef SGI_H 15 | #define SGI_H 16 | 17 | #include "il_internal.h" 18 | 19 | typedef struct iSgiHeader 20 | { 21 | ILshort MagicNum; // IRIS image file magic number 22 | ILbyte Storage; // Storage format 23 | ILbyte Bpc; // Number of bytes per pixel channel 24 | ILushort Dim; // Number of dimensions 25 | // 1: single channel, 1 row with XSize pixels 26 | // 2: single channel, XSize*YSize pixels 27 | // 3: ZSize channels, XSize*YSize pixels 28 | 29 | ILushort XSize; // X size in pixels 30 | ILushort YSize; // Y size in pixels 31 | ILushort ZSize; // Number of channels 32 | ILint PixMin; // Minimum pixel value 33 | ILint PixMax; // Maximum pixel value 34 | ILint Dummy1; // Ignored 35 | ILbyte Name[80]; // Image name 36 | ILint ColMap; // Colormap ID 37 | ILbyte Dummy[404]; // Ignored 38 | } IL_PACKSTRUCT iSgiHeader; 39 | 40 | // Sgi format #define's 41 | #define SGI_VERBATIM 0 42 | #define SGI_RLE 1 43 | #define SGI_MAGICNUM 474 44 | 45 | // Sgi colormap types 46 | #define SGI_COLMAP_NORMAL 0 47 | #define SGI_COLMAP_DITHERED 1 48 | #define SGI_COLMAP_SCREEN 2 49 | #define SGI_COLMAP_COLMAP 3 50 | 51 | 52 | // Internal functions 53 | ILboolean iIsValidSgi(void); 54 | ILboolean iCheckSgi(iSgiHeader *Header); 55 | ILboolean iLoadSgiInternal(void); 56 | ILboolean iSaveSgiInternal(void); 57 | void iExpandScanLine(ILubyte *Dest, ILubyte *Src, ILuint Bpc); 58 | ILint iGetScanLine(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length); 59 | ILint iGetScanLineFast(ILubyte *ScanLine, iSgiHeader *Head, ILuint Length, ILubyte*); 60 | void sgiSwitchData(ILubyte *Data, ILuint SizeOfData); 61 | ILboolean iNewSgi(iSgiHeader *Head); 62 | ILboolean iReadNonRleSgi(iSgiHeader *Head); 63 | ILboolean iReadRleSgi(iSgiHeader *Head); 64 | ILboolean iSaveRleSgi(ILubyte *Data, ILuint w, ILuint h, ILuint numChannels, ILuint bps); 65 | 66 | #endif//SGI_H 67 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_stack.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-IL/include/il_stack.h 8 | // 9 | // Description: The main image stack 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef IMAGESTACK_H 14 | #define IMAGESTACK_H 15 | 16 | #include "il_internal.h" 17 | 18 | 19 | 20 | // the currently-bound image 21 | extern ILuint CurName; 22 | 23 | #endif//IMAGESTACK_H 24 | -------------------------------------------------------------------------------- /DevIL/src-IL/include/il_utx.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 03/02/2009 6 | // 7 | // Filename: src-IL/include/il_utx.h 8 | // 9 | // Description: Reads from an Unreal and Unreal Tournament Texture (.utx) file. 10 | // Specifications can be found at 11 | // http://wiki.beyondunreal.com/Legacy:Package_File_Format. 12 | // 13 | //----------------------------------------------------------------------------- 14 | 15 | 16 | #ifndef UTX_H 17 | #define UTX_H 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #include "il_internal.h" 24 | #include "il_dds.h" 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | 31 | #include 32 | #include 33 | #include 34 | using namespace std; 35 | 36 | 37 | typedef struct UTXHEADER 38 | { 39 | ILuint Signature; 40 | ILushort Version; 41 | ILushort LicenseMode; 42 | ILuint Flags; 43 | ILuint NameCount; 44 | ILuint NameOffset; 45 | ILuint ExportCount; 46 | ILuint ExportOffset; 47 | ILuint ImportCount; 48 | ILuint ImportOffset; 49 | } UTXHEADER; 50 | 51 | typedef struct UTXENTRYNAME 52 | { 53 | //char *Name; 54 | string Name; 55 | ILuint Flags; 56 | } UTXENTRYNAME; 57 | 58 | typedef struct UTXEXPORTTABLE 59 | { 60 | ILint Class; 61 | ILint Super; 62 | ILint Group; 63 | ILint ObjectName; 64 | ILuint ObjectFlags; 65 | ILint SerialSize; 66 | ILint SerialOffset; 67 | 68 | ILboolean ClassImported; 69 | ILboolean SuperImported; 70 | ILboolean GroupImported; 71 | } UTXEXPORTTABLE; 72 | 73 | typedef struct UTXIMPORTTABLE 74 | { 75 | ILint ClassPackage; 76 | ILint ClassName; 77 | ILint Package; 78 | ILint ObjectName; 79 | 80 | ILboolean PackageImported; 81 | } UTXIMPORTTABLE; 82 | 83 | class UTXPALETTE 84 | { 85 | public: 86 | UTXPALETTE() { Pal = NULL; } 87 | ~UTXPALETTE() { delete [] Pal; } 88 | 89 | ILubyte *Pal; 90 | ILuint Count; 91 | ILuint Name; 92 | }; 93 | 94 | // Data formats 95 | #define UTX_P8 0x00 96 | #define UTX_DXT1 0x03 97 | 98 | ILboolean iLoadUtxInternal(void); 99 | 100 | #endif//UTX_H 101 | -------------------------------------------------------------------------------- /DevIL/src-IL/msvc/IL Unicode.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc/IL Unicode.rc -------------------------------------------------------------------------------- /DevIL/src-IL/msvc/IL.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc/IL.rc -------------------------------------------------------------------------------- /DevIL/src-IL/msvc/resources/IL Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc/resources/IL Logo.ico -------------------------------------------------------------------------------- /DevIL/src-IL/msvc8/IL Unicode.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc8/IL Unicode.rc -------------------------------------------------------------------------------- /DevIL/src-IL/msvc8/IL.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc8/IL.rc -------------------------------------------------------------------------------- /DevIL/src-IL/msvc9/IL Unicode.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc9/IL Unicode.rc -------------------------------------------------------------------------------- /DevIL/src-IL/msvc9/IL.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/msvc9/IL.rc -------------------------------------------------------------------------------- /DevIL/src-IL/pkgconfig/IL.pc.cmake.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=${prefix}/include 4 | libdir=${exec_prefix}/lib 5 | 6 | Name: IL 7 | Description: Developer's Image Library - IL part (just image load/save) 8 | Version: @VERSION@ 9 | URL: http://openil.sourceforge.net 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lIL 12 | 13 | -------------------------------------------------------------------------------- /DevIL/src-IL/pkgconfig/README: -------------------------------------------------------------------------------- 1 | IL.pc.cmake.in is the template file for building IL.pc, which 2 | provides pkg-config support for IL. 3 | 4 | -------------------------------------------------------------------------------- /DevIL/src-IL/src/altivec_common.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Last modified: 17/04/2005 5 | // by Meloni Dario 6 | // 7 | // Description: Common altivec function. 8 | // 9 | //----------------------------------------------------------------------------- 10 | 11 | #ifdef HAVE_CONFIG_H 12 | #include 13 | #endif //HAVE_CONFIG_H 14 | 15 | #ifdef ALTIVEC_GCC 16 | #include "altivec_common.h" 17 | 18 | // from http://developer.apple.com/hardware/ve/alignment.html 19 | /*vector unsigned char load_unaligned( unsigned char *buffer ) { 20 | vector unsigned char MSQ, LSQ; 21 | vector unsigned char mask; 22 | MSQ = vec_ld(0, buffer); // most significant quadword 23 | LSQ = vec_ld(15, buffer); // least significant quadword 24 | mask = vec_lvsl(0, buffer); // create the permute mask 25 | return vec_perm(MSQ, LSQ, mask);// align the data 26 | }*/ 27 | 28 | vector float fill_vector_f( float value ) { 29 | vector_t vec; 30 | vec.sf[0] = value; 31 | vector float temp = vec_ld(0,vec.sf); 32 | return vec_splat(temp,0); 33 | } 34 | 35 | inline unsigned int round16( unsigned int v ) { 36 | return ((int)((v/16)*10)%10) > 0 ? (v/16) : (v/16)+1; 37 | } 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /DevIL/src-IL/src/il_error.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 06/02/2007 6 | // 7 | // Filename: src-IL/src/il_error.cpp 8 | // 9 | // Description: The error functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "il_internal.h" 15 | 16 | 17 | #define IL_ERROR_STACK_SIZE 32 // Needed elsewhere? 18 | 19 | 20 | ILenum ilErrorNum[IL_ERROR_STACK_SIZE]; 21 | ILint ilErrorPlace = (-1); 22 | 23 | 24 | // Sets the current error 25 | // If you go past the stack size for this, it cycles the errors, almost like a LRU algo. 26 | ILAPI void ILAPIENTRY ilSetError(ILenum Error) 27 | { 28 | ILuint i; 29 | 30 | ilErrorPlace++; 31 | if (ilErrorPlace >= IL_ERROR_STACK_SIZE) { 32 | for (i = 0; i < IL_ERROR_STACK_SIZE - 2; i++) { 33 | ilErrorNum[i] = ilErrorNum[i+1]; 34 | } 35 | ilErrorPlace = IL_ERROR_STACK_SIZE - 1; 36 | } 37 | ilErrorNum[ilErrorPlace] = Error; 38 | 39 | return; 40 | } 41 | 42 | 43 | //! Gets the last error on the error stack 44 | ILenum ILAPIENTRY ilGetError(void) 45 | { 46 | ILenum ilReturn; 47 | 48 | if (ilErrorPlace >= 0) { 49 | ilReturn = ilErrorNum[ilErrorPlace]; 50 | ilErrorPlace--; 51 | } 52 | else 53 | ilReturn = IL_NO_ERROR; 54 | 55 | return ilReturn; 56 | } 57 | -------------------------------------------------------------------------------- /DevIL/src-IL/src/il_ftx.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/12/2009 6 | // 7 | // Filename: src-IL/src/il_ftx.cpp 8 | // 9 | // Description: Reads from a Heavy Metal: FAKK2 (.ftx) file. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #include "il_internal.h" 14 | #ifndef IL_NO_FTX 15 | 16 | ILboolean iLoadFtxInternal(void); 17 | 18 | 19 | //! Reads a FTX file 20 | ILboolean ilLoadFtx(ILconst_string FileName) 21 | { 22 | ILHANDLE FtxFile; 23 | ILboolean bFtx = IL_FALSE; 24 | 25 | FtxFile = iopenr(FileName); 26 | if (FtxFile == NULL) { 27 | ilSetError(IL_COULD_NOT_OPEN_FILE); 28 | return bFtx; 29 | } 30 | 31 | bFtx = ilLoadFtxF(FtxFile); 32 | icloser(FtxFile); 33 | 34 | return bFtx; 35 | } 36 | 37 | 38 | //! Reads an already-opened FTX file 39 | ILboolean ilLoadFtxF(ILHANDLE File) 40 | { 41 | ILuint FirstPos; 42 | ILboolean bRet; 43 | 44 | iSetInputFile(File); 45 | FirstPos = itell(); 46 | bRet = iLoadFtxInternal(); 47 | iseek(FirstPos, IL_SEEK_SET); 48 | 49 | return bRet; 50 | } 51 | 52 | 53 | //! Reads from a memory "lump" that contains a FTX 54 | ILboolean ilLoadFtxL(const void *Lump, ILuint Size) 55 | { 56 | iSetInputLump(Lump, Size); 57 | return iLoadFtxInternal(); 58 | } 59 | 60 | 61 | // Internal function used to load the FTX. 62 | ILboolean iLoadFtxInternal(void) 63 | { 64 | ILuint Width, Height, HasAlpha; 65 | 66 | if (iCurImage == NULL) { 67 | ilSetError(IL_ILLEGAL_OPERATION); 68 | return IL_FALSE; 69 | } 70 | 71 | Width = GetLittleUInt(); 72 | Height = GetLittleUInt(); 73 | HasAlpha = GetLittleUInt(); // Kind of backwards from what I would think... 74 | 75 | //@TODO: Right now, it appears that all images are in RGBA format. See if I can find specs otherwise 76 | // or images that load incorrectly like this. 77 | //if (HasAlpha == 0) { // RGBA format 78 | if (!ilTexImage(Width, Height, 1, 4, IL_RGBA, IL_UNSIGNED_BYTE, NULL)) 79 | return IL_FALSE; 80 | //} 81 | //else if (HasAlpha == 1) { // RGB format 82 | // if (!ilTexImage(Width, Height, 1, 3, IL_RGB, IL_UNSIGNED_BYTE, NULL)) 83 | // return IL_FALSE; 84 | //} 85 | //else { // Unknown format 86 | // ilSetError(IL_INVALID_FILE_HEADER); 87 | // return IL_FALSE; 88 | //} 89 | 90 | // The origin will always be in the upper left. 91 | iCurImage->Origin = IL_ORIGIN_UPPER_LEFT; 92 | 93 | // All we have to do for this format is read the raw, uncompressed data. 94 | if (iread(iCurImage->Data, 1, iCurImage->SizeOfData) != iCurImage->SizeOfData) 95 | return IL_FALSE; 96 | 97 | return ilFixImage(); 98 | } 99 | 100 | #endif//IL_NO_FTX 101 | 102 | -------------------------------------------------------------------------------- /DevIL/src-IL/src/il_ktx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-IL/src/il_ktx.cpp -------------------------------------------------------------------------------- /DevIL/src-IL/src/il_main.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/16/2002 6 | // 7 | // Filename: src-IL/src/il_main.cpp 8 | // 9 | // Description: Startup function 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "il_internal.h" 15 | 16 | /* Only needed for MSVC++ unless extended to actually do something =) */ 17 | #if defined(_WIN32) && defined(_MSC_VER) 18 | BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 19 | { 20 | hModule; ul_reason_for_call; lpReserved; 21 | 22 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 23 | //ilInit(); 24 | } 25 | 26 | return TRUE; 27 | } 28 | #endif 29 | 30 | 31 | -------------------------------------------------------------------------------- /DevIL/src-IL/src/il_squish.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 01/15/2009 6 | // 7 | // Filename: src-IL/src/il_squish.cpp 8 | // 9 | // Description: Implements access to the Squish library. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "il_internal.h" 15 | /*#include "il_dds.h" 16 | #include "il_manip.h" 17 | #include */ 18 | 19 | 20 | #ifdef IL_USE_DXTC_SQUISH 21 | #include 22 | 23 | #if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS) 24 | #if defined(_MSC_VER) || defined(__BORLANDC__) 25 | #ifndef _DEBUG 26 | #pragma comment(lib, "squish.lib") 27 | #else 28 | #pragma comment(lib, "squish-d.lib") 29 | #endif 30 | #endif 31 | #endif 32 | 33 | 34 | //! Compresses data to a DXT format using libsquish. 35 | // The data must be in unsigned byte RGBA format. The alpha channel will be ignored if DxtType is IL_DXT1. 36 | // DxtSize is used to return the size in bytes of the DXTC data returned. 37 | ILAPI ILubyte* ILAPIENTRY ilSquishCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize) 38 | { 39 | ILuint Size; //@TODO: Support larger than 32-bit data? 40 | ILint Flags; 41 | ILubyte *DxtcData; 42 | 43 | if (Data == NULL) { // We cannot operate on a null pointer. 44 | ilSetError(IL_INVALID_PARAM); 45 | return NULL; 46 | } 47 | 48 | // The nVidia Texture Tools library does not support volume textures yet. 49 | if (Depth != 1) { 50 | ilSetError(IL_INVALID_PARAM); 51 | return NULL; 52 | } 53 | 54 | switch (DxtFormat) 55 | { 56 | case IL_DXT1: // Should these two be 57 | case IL_DXT1A: // any different? 58 | Flags = squish::kDxt1; 59 | break; 60 | case IL_DXT3: 61 | Flags = squish::kDxt3; 62 | break; 63 | case IL_DXT5: 64 | Flags = squish::kDxt5; 65 | break; 66 | default: // Does not support DXT2 or DXT4. 67 | ilSetError(IL_INVALID_PARAM); 68 | break; 69 | } 70 | 71 | Size = squish::GetStorageRequirements(Width, Height, Flags); 72 | DxtcData = (ILubyte*)ialloc(Size); 73 | if (DxtcData == NULL) 74 | return NULL; 75 | 76 | squish::CompressImage(Data, Width, Height, DxtcData, Flags); 77 | 78 | *DxtSize = Size; 79 | return DxtcData; 80 | } 81 | 82 | #else 83 | // Let's have this so that the function is always created and exported, even if it does nothing. 84 | ILAPI ILubyte* ILAPIENTRY ilSquishCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DxtFormat, ILuint *DxtSize) 85 | { 86 | //@TODO: Do we need to set an error message? 87 | return NULL; 88 | } 89 | 90 | #endif//IL_NO_DXTC_SQUISH 91 | -------------------------------------------------------------------------------- /DevIL/src-IL/src/il_texture.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/16/2009 6 | // 7 | // Filename: src-IL/src/il_texture.cpp 8 | // 9 | // Description: Reads from a Medieval II: Total War (by Creative Assembly) 10 | // Texture (.texture) file. 11 | // 12 | //----------------------------------------------------------------------------- 13 | 14 | #include "il_internal.h" 15 | #ifndef IL_NO_TEXTURE 16 | 17 | 18 | //! Reads a TEXTURE file 19 | ILboolean ilLoadTexture(ILconst_string FileName) 20 | { 21 | ILHANDLE TextureFile; 22 | ILboolean bTexture = IL_FALSE; 23 | 24 | TextureFile = iopenr(FileName); 25 | if (TextureFile == NULL) { 26 | ilSetError(IL_COULD_NOT_OPEN_FILE); 27 | return bTexture; 28 | } 29 | 30 | bTexture = ilLoadTextureF(TextureFile); 31 | icloser(TextureFile); 32 | 33 | return bTexture; 34 | } 35 | 36 | 37 | //! Reads an already-opened TEXTURE file 38 | ILboolean ilLoadTextureF(ILHANDLE File) 39 | { 40 | ILuint FirstPos; 41 | ILboolean bRet; 42 | 43 | iSetInputFile(File); 44 | FirstPos = itell(); 45 | // From http://forums.totalwar.org/vb/showthread.php?t=70886, all that needs to be done 46 | // is to strip out the first 48 bytes, and then it is DDS data. 47 | iseek(48, IL_SEEK_CUR); 48 | bRet = ilLoadDdsF(File); 49 | iseek(FirstPos, IL_SEEK_SET); 50 | 51 | return bRet; 52 | } 53 | 54 | 55 | //! Reads from a memory "lump" that contains a TEXTURE 56 | ILboolean ilLoadTextureL(const void *Lump, ILuint Size) 57 | { 58 | iSetInputLump(Lump, Size); 59 | // From http://forums.totalwar.org/vb/showthread.php?t=70886, all that needs to be done 60 | // is to strip out the first 48 bytes, and then it is DDS data. 61 | iseek(48, IL_SEEK_CUR); 62 | return ilLoadDdsL(Lump, Size); 63 | } 64 | 65 | #endif//IL_NO_TEXTURE 66 | 67 | -------------------------------------------------------------------------------- /DevIL/src-ILU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | project(ILU) 4 | 5 | file(GLOB ILU_SRCS src/*.cpp) 6 | file(GLOB ILU_INC include/*.h ../include/IL/devil_internal_exports.h ../include/IL/ilu.h) 7 | file(GLOB ILU_RSRC) 8 | 9 | # From http://stackoverflow.com/questions/17317350/compiling-32-and-64-bit 10 | MESSAGE(" ") 11 | if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) 12 | MESSAGE( "64 bit compiler detected" ) 13 | SET( EX_PLATFORM 64 ) 14 | SET( EX_PLATFORM_NAME "x64" ) 15 | else( CMAKE_SIZEOF_VOID_P EQUAL 8 ) 16 | MESSAGE( "32 bit compiler detected" ) 17 | SET( EX_PLATFORM 32 ) 18 | SET( EX_PLATFORM_NAME "x86" ) 19 | endif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) 20 | 21 | include_directories( include ../include ) 22 | 23 | # for windows add the .def and .rc files to the source list 24 | if(WIN32) 25 | #add_definitions(-DIL_USE_PRAGMA_LIBS) 26 | if(BUILD_SHARED_LIBS) 27 | add_definitions(-DILU_DLL) 28 | set(ILU_SRCS ${ILU_SRCS} msvc/ilu.def) 29 | if(UNICODE) 30 | set(ILU_RSRC ${ILU_RSRC} "msvc/resources/IL Logo.ico" "msvc/ILU Unicode.rc") 31 | else(UNICODE) 32 | set(ILU_RSRC ${ILU_RSRC} "msvc/resources/IL Logo.ico" "msvc/ILU.rc") 33 | endif(UNICODE) 34 | set(CMAKE_C_FLAGS_RELEASE "/MT /O2") 35 | else(BUILD_SHARED_LIBS) 36 | add_definitions(-DIL_STATIC_LIB) 37 | endif(BUILD_SHARED_LIBS) 38 | endif(WIN32) 39 | 40 | 41 | source_group("Source Files" FILES src/*.cpp) 42 | source_group("Header Files" FILES ${ILU_INC} ) 43 | source_group("Resource Files" FILES ${ILU_RSRC} ) 44 | 45 | # Remove SHARED to create a static library 46 | add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) 47 | set_target_properties(ILU PROPERTIES SOVERSION 1) 48 | 49 | 50 | ## ILU requires IL 51 | target_link_libraries(ILU 52 | IL 53 | ) 54 | 55 | # generate pkg-config file 56 | # TODO: add Requires.private or Libs.private 57 | # (needed to support static linking?) 58 | configure_file( pkgconfig/ILU.pc.cmake.in 59 | ${CMAKE_CURRENT_BINARY_DIR}/ILU.pc @ONLY) 60 | 61 | # Sets the output folders 62 | set(LIBDIR "../lib/") 63 | set(LIBDIR "${LIBDIR}${EX_PLATFORM_NAME}") 64 | if(UNICODE) 65 | set(LIBDIR "${LIBDIR}/unicode") 66 | endif(UNICODE) 67 | set_target_properties(ILU PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${LIBDIR}) 68 | set_target_properties(ILU PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${LIBDIR}) 69 | set_target_properties(ILU PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${LIBDIR}) 70 | 71 | if(UNICODE) 72 | MESSAGE("Compiling ILU Unicode") 73 | add_definitions(-DUNICODE -D_UNICODE) 74 | endif(UNICODE) 75 | 76 | # Installation 77 | install (TARGETS ILU 78 | ARCHIVE DESTINATION lib 79 | LIBRARY DESTINATION lib 80 | RUNTIME DESTINATION bin 81 | ) 82 | install (FILES ../include/IL/ilu.h DESTINATION include/IL) 83 | 84 | install(FILES 85 | ${CMAKE_CURRENT_BINARY_DIR}/ILU.pc 86 | DESTINATION lib/pkgconfig 87 | ) 88 | 89 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_alloc.h: -------------------------------------------------------------------------------- 1 | #ifndef ALLOC_H 2 | #define ALLOC_H 3 | 4 | #if defined(_WIN32) && defined(_MEM_DEBUG) 5 | void *c_alloc(unsigned long size, unsigned long num, const char *file, unsigned long line); 6 | void *m_alloc(unsigned long size, const char *file, unsigned long line); 7 | void f_ree(void *ptr); 8 | 9 | #ifdef malloc 10 | #undef malloc 11 | #endif 12 | 13 | #ifdef calloc 14 | #undef calloc 15 | #endif 16 | 17 | #ifdef free 18 | #undef free 19 | #endif 20 | 21 | 22 | #define malloc(size) m_alloc(size, __FILE__, __LINE__) 23 | #define calloc(size, num) c_alloc(size, num, __FILE__, __LINE__) 24 | #define free(addr) f_ree(addr) 25 | #endif//defined(_WIN32) && defined(_MEM_DEBUG) 26 | 27 | #endif//ALLOC_H 28 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-arabic.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2008 by Denton Woods 5 | // Last modified: 11/10/2008 6 | // 7 | // Filename: src-ILU/include/ilu_error/ilu_err-arabic.h 8 | // 9 | // Description: Error functions in Arabic, translated by Abdullah Alshammari 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef IL_ERR_ARABIC_H 15 | #define IL_ERR_ARABIC_H 16 | 17 | #include "ilu_internal.h" 18 | 19 | ILconst_string iluErrorStringsArabic[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { 20 | IL_TEXT("enumerant خاطئ"), 21 | IL_TEXT("خارج حدود الذاكرة"), 22 | IL_TEXT("نسق الصورة غير مدعوم"), 23 | IL_TEXT("خطأ داخلي"), 24 | IL_TEXT("قيمة خاطئة"), 25 | IL_TEXT("عملية غير شرعية"), 26 | IL_TEXT("رقم (قيمة) الملف غير شرعي"), 27 | IL_TEXT("رأس الملف خاطئ"), 28 | IL_TEXT("البارمتر(المعامل) خاطئ"), 29 | IL_TEXT("لايمكن فتح الملف"), 30 | IL_TEXT("امتداد الملف خاطئ"), 31 | IL_TEXT("الملف موجود"), 32 | IL_TEXT("out format equivalent"), 33 | IL_TEXT("المكدس(الستاك) ممتلئ"), 34 | IL_TEXT("المكدس (الستاك) فارغ"), 35 | IL_TEXT("تحويل خاطئ"), 36 | IL_TEXT("أبعاد خاطئة"), 37 | IL_TEXT("حدث خطأ أثناء قراءة الملف") 38 | }; 39 | 40 | ILconst_string iluLibErrorStringsArabic[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { 41 | IL_TEXT("خطأ في مكتبة gif"), 42 | IL_TEXT("خطأ في مكتبة jpeg"), 43 | IL_TEXT("خطأ في مكتبة png"), 44 | IL_TEXT("خطأ في مكتبة tiff"), 45 | IL_TEXT("خطأ في مكتبة mng"), 46 | IL_TEXT("خطأ في مكتبة jp2"), 47 | IL_TEXT("خطأ في مكتبة exr") 48 | }; 49 | 50 | ILconst_string iluMiscErrorStringsArabic[2] = { 51 | IL_TEXT("لايوجد خطأ"), 52 | IL_TEXT("خطأ غير معروف") 53 | }; 54 | 55 | #endif//IL_ERR_ARABIC_H 56 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-dutch.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2008 by Denton Woods 5 | // Last modified: 11/08/2008 6 | // 7 | // Filename: src-ILU/include/ilu_error/ilu_err_dutch.h 8 | // 9 | // Description: Error functions in Dutch, translated by Bart De Lathouwer 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef ILU_ERR_DUTCH_H 15 | #define ILU_ERR_DUTCH_H 16 | 17 | #include "ilu_internal.h" 18 | 19 | ILconst_string iluErrorStringsDutch[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { 20 | IL_TEXT("Ongeldige enumerant"), 21 | IL_TEXT("Geen vrij geheugen meer"), 22 | IL_TEXT("Format wordt nog niet ondersteund"), 23 | IL_TEXT("Interne fout"), 24 | IL_TEXT("Ongeldige waarde"), 25 | IL_TEXT("Foute bewerking"), 26 | IL_TEXT("Foute bestandswaarde"), 27 | IL_TEXT("Foute bestandsbegin"), 28 | IL_TEXT("Ongeldige parameter"), 29 | IL_TEXT("Kan het bestand niet openen"), 30 | IL_TEXT("ongeldige"), 31 | IL_TEXT("Bestand bestaat reeds"), 32 | IL_TEXT("uitgaand formaat equivalent"), 33 | IL_TEXT("stapel overstroming"), 34 | IL_TEXT("stapel onderstroming"), 35 | IL_TEXT("ongeldige omzetting"), 36 | IL_TEXT("slechte afmetingen"), 37 | IL_TEXT("Leesfout in bestand") 38 | }; 39 | 40 | ILconst_string iluLibErrorStringsDutch[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { 41 | IL_TEXT("fout in gif bibliotheek"), 42 | IL_TEXT("fout in jpeg bibliotheek"), 43 | IL_TEXT("fout in png bibliotheek"), 44 | IL_TEXT("fout in tiff bibliotheek"), 45 | IL_TEXT("fout in mng bibliotheek"), 46 | IL_TEXT("fout in jp2 bibliotheek"), 47 | IL_TEXT("fout in exr bibliotheek") 48 | }; 49 | 50 | ILconst_string iluMiscErrorStringsDutch[2] = { 51 | IL_TEXT("geen fout"), 52 | IL_TEXT("onbekende fout") 53 | }; 54 | 55 | #endif//ILU_ERR_DUTCH_H 56 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-english.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2008 by Denton Woods 5 | // Last modified: 11/08/2008 6 | // 7 | // Filename: src-ILU/include/ilu_error/ilu_err_english.h 8 | // 9 | // Description: Error functions in English. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef ILU_ERR_ENGLISH_H 15 | #define ILU_ERR_ENGLISH_H 16 | 17 | #include "ilu_internal.h" 18 | 19 | ILconst_string iluErrorStringsEnglish[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { 20 | IL_TEXT("invalid enumerant"), 21 | IL_TEXT("out of memory"), 22 | IL_TEXT("format not supported yet"), 23 | IL_TEXT("internal error"), 24 | IL_TEXT("invalid value"), 25 | IL_TEXT("illegal operation"), 26 | IL_TEXT("illegal file value"), 27 | IL_TEXT("invalid file header"), 28 | IL_TEXT("invalid parameter"), 29 | IL_TEXT("could not open file"), 30 | IL_TEXT("invalid extension"), 31 | IL_TEXT("file already exists"), 32 | IL_TEXT("out format equivalent"), 33 | IL_TEXT("stack overflow"), 34 | IL_TEXT("stack underflow"), 35 | IL_TEXT("invalid conversion"), 36 | IL_TEXT("bad dimensions"), 37 | IL_TEXT("file read error") 38 | }; 39 | 40 | ILconst_string iluLibErrorStringsEnglish[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { 41 | IL_TEXT("gif library error"), 42 | IL_TEXT("jpeg library error"), 43 | IL_TEXT("png library error"), 44 | IL_TEXT("tiff library error"), 45 | IL_TEXT("mng library error"), 46 | IL_TEXT("jp2 library error"), 47 | IL_TEXT("exr library error") 48 | }; 49 | 50 | ILconst_string iluMiscErrorStringsEnglish[2] = { 51 | IL_TEXT("no error"), 52 | IL_TEXT("unknown error") 53 | }; 54 | 55 | #endif//ILU_ERR_ENGLISH_H 56 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-french.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/include/ilu_error/ilu_err-french.h -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-german.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/include/ilu_error/ilu_err-german.h -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-italian.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-japanese.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2008 by Denton Woods 5 | // Last modified: 11/10/2008 6 | // 7 | // Filename: src-ILU/include/ilu_error/ilu_err-japanese.h 8 | // 9 | // Description: Error functions in Japanese, translated by Osamu Ohara 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef ILU_ERR_JAPANESE_H 15 | #define ILU_ERR_JAPANESE_H 16 | 17 | #include "ilu_internal.h" 18 | 19 | ILconst_string iluErrorStringsJapanese[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { 20 | IL_TEXT("無効な列挙値"), //"invalid enumerant"), 21 | IL_TEXT("メモリ不足"), //"out of memory"), 22 | IL_TEXT("まだサポートされていないフォーマット"), //"format not supported yet"), 23 | IL_TEXT("内部エラー"), //"internal error"), 24 | IL_TEXT("無効な値"), //"invalid value"), 25 | IL_TEXT("不正なオペレーション"), //"illegal operation"), 26 | IL_TEXT("不正なファイルの値"), //"illegal file value"), 27 | IL_TEXT("無効なファイルヘッダ"), //"invalid file header"), 28 | IL_TEXT("無効なパラメタ"), //"invalid parameter"), 29 | IL_TEXT("ファイルが開けません"), //"could not open file"), 30 | IL_TEXT("無効な拡張子"), //"invalid extension"), 31 | IL_TEXT("ファイルは既に存在しています"), //"file already exists"), 32 | IL_TEXT("等価フォーマット外"), //"out format equivalent"), 33 | IL_TEXT("スタックオーバーフロー"), //"stack overflow"), 34 | IL_TEXT("スタックアンダーフロー"), //"stack underflow"), 35 | IL_TEXT("無効な変換"), //"invalid conversion"), 36 | IL_TEXT("不正なサイズ"), //"bad dimensions"), 37 | IL_TEXT("ファイル読み込みエラー") //"file read error" 38 | }; 39 | 40 | ILconst_string iluLibErrorStringsJapanese[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { 41 | IL_TEXT("gifライブラリエラー"), //"gif library error"), 42 | IL_TEXT("jpegライブラリエラー"), //"jpeg library error"), 43 | IL_TEXT("pngライブラリエラー"), //"png library error"), 44 | IL_TEXT("tiffライブラリエラー"), //"tiff library error"), 45 | IL_TEXT("mngライブラリエラー"), //"mng library error" 46 | IL_TEXT("jp2ライブラリエラー"), //"jp2 library error" 47 | IL_TEXT("exrライブラリエラー") //"exr library error" 48 | }; 49 | 50 | ILconst_string iluMiscErrorStringsJapanese[2] = { 51 | IL_TEXT("エラー無し"), 52 | IL_TEXT("不明なエラー") 53 | }; 54 | 55 | #endif//ILU_ERR_JAPANESE_H 56 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_filter.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/28/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILU/include/ilu_filter.h 8 | // 9 | // Description: Applies filters to an image. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef FILTER_H 15 | #define FILTER_H 16 | 17 | #include "ilu_internal.h" 18 | 19 | 20 | static const ILint filter_average_scale = 9; 21 | static const ILint filter_average_bias = 1; 22 | static const ILint filter_average[] = 23 | { 1, 1, 1, 24 | 1, 1, 1, 25 | 1, 1, 1 }; 26 | 27 | 28 | static const ILint filter_gaussian_scale = 16; 29 | static const ILint filter_gaussian_bias = 1; 30 | static const ILint filter_gaussian[] = 31 | { 1, 2, 1, 32 | 2, 4, 2, 33 | 1, 2, 1 }; 34 | 35 | 36 | static const ILint filter_h_sobel_scale = 1; 37 | static const ILint filter_h_sobel_bias = 0; 38 | static const ILint filter_h_sobel[] = 39 | { 1, 2, 1, 40 | 0, 0, 0, 41 | -1, -2, -1 }; 42 | 43 | 44 | static const ILint filter_v_sobel_scale = 1; 45 | static const ILint filter_v_sobel_bias = 0; 46 | static const ILint filter_v_sobel[] = 47 | { 1, 0, -1, 48 | 2, 0, -2, 49 | 1, 0, -1 }; 50 | 51 | 52 | static const ILint filter_h_prewitt_scale = 1; 53 | static const ILint filter_h_prewitt_bias = 0; 54 | static const ILint filter_h_prewitt[] = 55 | { 1, 1, 1, 56 | 0, 0, 0, 57 | -1, -1, -1 }; 58 | 59 | 60 | static const ILint filter_v_prewitt_scale = 1; 61 | static const ILint filter_v_prewitt_bias = 0; 62 | static const ILint filter_v_prewitt[] = 63 | { 1, 0, -1, 64 | 1, 0, -1, 65 | 1, 0, -1 }; 66 | 67 | static const ILint filter_emboss_scale = 1; 68 | static const ILint filter_emboss_bias = 128; 69 | static const ILint filter_emboss[] = 70 | { -1, 0, 1, 71 | -1, 0, 1, 72 | -1, 0, 1 }; 73 | 74 | static const ILint filter_embossedge_scale = 1; 75 | static const ILint filter_embossedge_bias = 0; 76 | static const ILint filter_embossedge[] = 77 | { -1, 0, 1, 78 | -1, 0, 1, 79 | -1, 0, 1 }; 80 | 81 | #endif//FILTER_H 82 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_internal.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef INTERNAL_H 3 | #define INTERNAL_H 4 | 5 | #include 6 | 7 | #ifdef _MSC_VER 8 | #if _MSC_VER > 1000 9 | #pragma once 10 | #pragma intrinsic(memcpy) 11 | #pragma intrinsic(memset) 12 | //pragma comment(linker, "/NODEFAULTLIB:libc") 13 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #ifdef _DEBUG 16 | #define _CRTDBG_MAP_ALLOC 17 | #include 18 | #ifndef _WIN32_WCE 19 | #include 20 | #endif 21 | #endif 22 | #endif // _MSC_VER > 1000 23 | #endif 24 | 25 | #define _IL_BUILD_LIBRARY 26 | #define _ILU_BUILD_LIBRARY 27 | 28 | // Standard headers 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | // Local headers 35 | #define _IL_BUILD_LIBRARY 36 | #define _ILU_BUILD_LIBRARY 37 | 38 | #include 39 | #include 40 | 41 | 42 | // From DevIL's internal.h: 43 | #ifdef _WIN32_WCE 44 | #include 45 | #define IL_TEXT(s) ((char*)TEXT(s)) 46 | #elif _WIN32 47 | #include 48 | #define IL_TEXT(s) TEXT(s) 49 | #else 50 | #define IL_TEXT(s) s 51 | #define TEXT(s) s 52 | #endif 53 | 54 | extern ILimage *iluCurImage; 55 | 56 | 57 | // Useful global variables 58 | extern const ILdouble IL_PI; 59 | extern const ILdouble IL_DEGCONV; 60 | 61 | 62 | #ifdef ILU_INTERNAL_C 63 | #undef NOINLINE 64 | #undef INLINE 65 | #define INLINE 66 | #endif 67 | 68 | // Internal functions 69 | ILfloat ilCos(ILfloat Angle); 70 | ILfloat ilSin(ILfloat Angle); 71 | ILint ilRound(ILfloat Num); 72 | 73 | /*#ifndef NOINLINE 74 | ILfloat ilCos(ILfloat Angle); 75 | ILfloat ilSin(ILfloat Angle); 76 | ILint ilRound(ILfloat Num); 77 | #endif*/ 78 | 79 | 80 | 81 | ILuint iluScaleAdvanced(ILuint Width, ILuint Height, ILenum Filter); 82 | ILubyte *iScanFill(void); 83 | 84 | 85 | #endif//INTERNAL_H 86 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_region.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 07/09/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILU/src/ilu_region.h 8 | // 9 | // Description: Creates an image region. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef ILU_REGION_H 14 | #define ILU_REGION_H 15 | 16 | #include "ilu_internal.h" 17 | 18 | 19 | typedef struct Edge 20 | { 21 | ILint yUpper; 22 | ILfloat xIntersect, dxPerScan; 23 | struct Edge *next; 24 | } Edge; 25 | 26 | 27 | #endif//ILU_REGION_H 28 | 29 | -------------------------------------------------------------------------------- /DevIL/src-ILU/include/ilu_states.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/28/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILU/include/ilu_states.h 8 | // 9 | // Description: The state machine 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef STATES_H 15 | #define STATES_H 16 | 17 | extern ILenum iluFilter; 18 | extern ILenum iluPlacement; 19 | 20 | #endif//STATES_H 21 | -------------------------------------------------------------------------------- /DevIL/src-ILU/msvc/ILU Unicode.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/msvc/ILU Unicode.rc -------------------------------------------------------------------------------- /DevIL/src-ILU/msvc/ILU.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/msvc/ILU.rc -------------------------------------------------------------------------------- /DevIL/src-ILU/msvc/ilu.def: -------------------------------------------------------------------------------- 1 | ; To remove an export, add a semicolon at the beginning of the line to comment it out. 2 | 3 | EXPORTS 4 | iluAlienify 5 | iluBlurAvg 6 | iluBlurGaussian 7 | iluBuildMipmaps 8 | iluColoursUsed 9 | iluConvolution 10 | iluCompareImage 11 | iluContrast 12 | iluCrop 13 | iluDeleteImage 14 | iluEdgeDetectE 15 | iluEdgeDetectP 16 | iluEdgeDetectS 17 | iluEmboss 18 | iluEnlargeCanvas 19 | iluEnlargeImage 20 | iluEqualize 21 | iluEqualize2 22 | iluErrorString 23 | iluFlipImage 24 | iluGenImage 25 | iluGetImageInfo 26 | iluGetString 27 | iluGammaCorrect 28 | iluGetInteger 29 | iluGetIntegerv 30 | iluImageParameter 31 | iluInit 32 | iluInvertAlpha 33 | iluLoadImage 34 | iluMirror 35 | iluNegative 36 | iluNoisify 37 | iluPixelize 38 | iluRegionfv 39 | iluRegioniv 40 | iluReplaceColour 41 | iluRotate 42 | iluRotate3D 43 | iluSaturate1f 44 | iluSaturate4f 45 | iluScaleColours 46 | iluScale 47 | iluScaleAlpha 48 | iluSepia 49 | iluSetLanguage 50 | iluSharpen 51 | iluSwapColours 52 | iluWave 53 | 54 | 55 | ; Internal but exported functions 56 | iluRotate_ 57 | iluRotate3D_ 58 | iluScale_ 59 | -------------------------------------------------------------------------------- /DevIL/src-ILU/msvc/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ILU Unicode.rc 4 | // 5 | #define IDC_OPENILU 109 6 | #define IDI_ICON1 155 7 | 8 | // Next default values for new objects 9 | // 10 | #ifdef APSTUDIO_INVOKED 11 | #ifndef APSTUDIO_READONLY_SYMBOLS 12 | #define _APS_NEXT_RESOURCE_VALUE 101 13 | #define _APS_NEXT_COMMAND_VALUE 40001 14 | #define _APS_NEXT_CONTROL_VALUE 1000 15 | #define _APS_NEXT_SYMED_VALUE 101 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /DevIL/src-ILU/msvc/resources/IL Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILU/msvc/resources/IL Logo.ico -------------------------------------------------------------------------------- /DevIL/src-ILU/pkgconfig/ILU.pc.cmake.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=${prefix}/include 4 | libdir=${exec_prefix}/lib 5 | 6 | Name: ILU 7 | Description: Developer's Image Library - ILU part (image library utilities) 8 | Version: @VERSION@ 9 | URL: http://openil.sourceforge.net 10 | Requires: IL 11 | Cflags: -I${includedir} 12 | Libs: -L${libdir} -lILU 13 | Libs.private: -lIL 14 | -------------------------------------------------------------------------------- /DevIL/src-ILU/pkgconfig/README: -------------------------------------------------------------------------------- 1 | ILU.pc.cmake.in is the template file for building ILU.pc, which 2 | provides pkg-config support for ILU. 3 | 4 | -------------------------------------------------------------------------------- /DevIL/src-ILU/src/ilu_internal.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define ILU_INTERNAL_C 3 | 4 | #include "ilu_internal.h" 5 | 6 | const ILdouble IL_PI = 3.1415926535897932384626; 7 | const ILdouble IL_DEGCONV = 0.0174532925199432957692; 8 | ILimage *iluCurImage = NULL; 9 | 10 | ILfloat ilCos(ILfloat Angle) { 11 | return (ILfloat)(cos(Angle * IL_DEGCONV)); 12 | } 13 | 14 | ILfloat ilSin(ILfloat Angle) { 15 | return (ILfloat)(sin(Angle * IL_DEGCONV)); 16 | } 17 | 18 | 19 | ILint ilRound(ILfloat Num) { 20 | return (ILint)(Num + 0.5); // this is truncating in away-from-0, not rounding 21 | } 22 | -------------------------------------------------------------------------------- /DevIL/src-ILU/src/ilu_main.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/20/2001 6 | // 7 | // Filename: src-ILU/src/ilu_main.cpp 8 | // 9 | // Description: Startup functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "ilu_internal.h" 15 | #include "ilu_states.h" 16 | #ifdef _WIN32 17 | #define WIN32_LEAN_AND_MEAN 18 | #include 19 | #endif//_WIN32 20 | 21 | #ifdef _WIN32 22 | #if (defined(IL_USE_PRAGMA_LIBS)) 23 | #if defined(_MSC_VER) || defined(__BORLANDC__) 24 | #pragma comment(lib, "DevIL.lib") 25 | #endif 26 | #endif 27 | #endif 28 | 29 | /* Only needed for MSVC++ unless extended to actually do something =) */ 30 | #if defined(_WIN32) && defined(_MSC_VER) 31 | 32 | #ifndef IL_STATIC_LIB 33 | BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 34 | { 35 | hModule; ul_reason_for_call; lpReserved; 36 | 37 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 38 | //iluInit(); 39 | } 40 | 41 | return TRUE; 42 | } 43 | 44 | #endif 45 | #endif 46 | 47 | void ILAPIENTRY iluInit() 48 | { 49 | // Used mostly for rotations 50 | //IL_PI = 4 * atan(1); // precomputed value of pi 51 | //IL_DEGCONV = IL_PI / 180; // division is slow on some computers 52 | 53 | iluSetLanguage(ILU_ENGLISH); 54 | return; 55 | } 56 | 57 | 58 | //#ifndef _WIN32_WCE 59 | ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName) 60 | { 61 | ILuint Id; 62 | ilGenImages(1, &Id); 63 | if (Id == 0) 64 | return 0; 65 | if (!ilLoadImage(FileName)) { 66 | ilDeleteImages(1, &Id); 67 | return 0; 68 | } 69 | return Id; 70 | } 71 | //#endif//_WIN32_WCE 72 | -------------------------------------------------------------------------------- /DevIL/src-ILU/src/ilu_mipmap.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/21/2009 6 | // 7 | // Filename: src-ILU/src/ilu_mipmap.cpp 8 | // 9 | // Description: Generates mipmaps for the current image. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "ilu_internal.h" 15 | //#include "ilu_mipmap.h" 16 | //#include "ilu_states.h" 17 | 18 | 19 | ILboolean iBuildMipmaps(ILimage *Parent, ILuint Width, ILuint Height, ILuint Depth) 20 | { 21 | ILuint x1 = 0, x2 = 0, y1 = 0, y2 = 0; 22 | 23 | if (Parent->Width == 1 && Parent->Height == 1 && Parent->Depth == 1) { // Already at the last mipmap 24 | return IL_TRUE; 25 | } 26 | 27 | if (Width == 0) 28 | Width = 1; 29 | if (Height == 0) 30 | Height = 1; 31 | if (Depth == 0) 32 | Depth = 1; 33 | 34 | Parent->Mipmaps = iluScale_(Parent, Width, Height, Depth); 35 | if (Parent->Mipmaps == NULL) 36 | return IL_FALSE; 37 | 38 | iBuildMipmaps(Parent->Mipmaps, Parent->Mipmaps->Width >> 1, Parent->Mipmaps->Height >> 1, Parent->Mipmaps->Depth >> 1); 39 | 40 | return IL_TRUE; 41 | } 42 | 43 | 44 | // Note: No longer changes all textures to powers of 2. 45 | ILboolean ILAPIENTRY iluBuildMipmaps() 46 | { 47 | iluCurImage = ilGetCurImage(); 48 | if (iluCurImage == NULL) { 49 | ilSetError(ILU_ILLEGAL_OPERATION); 50 | return IL_FALSE; 51 | } 52 | 53 | // Get rid of any existing mipmaps. 54 | if (iluCurImage->Mipmaps) { 55 | ilCloseImage(iluCurImage->Mipmaps); 56 | iluCurImage->Mipmaps = NULL; 57 | } 58 | 59 | return iBuildMipmaps(iluCurImage, iluCurImage->Width >> 1, iluCurImage->Height >> 1, iluCurImage->Depth >> 1); 60 | } 61 | -------------------------------------------------------------------------------- /DevIL/src-ILU/src/ilu_states.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 03/07/2009 6 | // 7 | // Filename: src-ILU/src/ilu_states.cpp 8 | // 9 | // Description: The state machine 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "ilu_internal.h" 15 | #include "ilu_states.h" 16 | 17 | 18 | ILconst_string _iluVendor = IL_TEXT("Abysmal Software"); 19 | ILconst_string _iluVersion = IL_TEXT("Developer's Image Library Utilities (ILU) 1.8.0");// IL_TEXT(__DATE__)); 20 | 21 | 22 | ILstring ILAPIENTRY iluGetString(ILenum StringName) 23 | { 24 | switch (StringName) 25 | { 26 | case ILU_VENDOR: 27 | return (ILstring)_iluVendor; 28 | //changed 2003-09-04 29 | case ILU_VERSION_NUM: 30 | return (ILstring)_iluVersion; 31 | default: 32 | ilSetError(ILU_INVALID_PARAM); 33 | break; 34 | } 35 | return NULL; 36 | } 37 | 38 | 39 | void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param) 40 | { 41 | switch (Mode) 42 | { 43 | case ILU_VERSION_NUM: 44 | *Param = ILU_VERSION; 45 | break; 46 | 47 | case ILU_FILTER: 48 | *Param = iluFilter; 49 | break; 50 | 51 | default: 52 | ilSetError(ILU_INVALID_ENUM); 53 | } 54 | return; 55 | } 56 | 57 | 58 | ILint ILAPIENTRY iluGetInteger(ILenum Mode) 59 | { 60 | ILint Temp; 61 | Temp = 0; 62 | iluGetIntegerv(Mode, &Temp); 63 | return Temp; 64 | } 65 | 66 | 67 | ILenum iluFilter = ILU_NEAREST; 68 | ILenum iluPlacement = ILU_CENTER; 69 | 70 | void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param) 71 | { 72 | switch (PName) 73 | { 74 | case ILU_FILTER: 75 | switch (Param) 76 | { 77 | case ILU_NEAREST: 78 | case ILU_LINEAR: 79 | case ILU_BILINEAR: 80 | case ILU_SCALE_BOX: 81 | case ILU_SCALE_TRIANGLE: 82 | case ILU_SCALE_BELL: 83 | case ILU_SCALE_BSPLINE: 84 | case ILU_SCALE_LANCZOS3: 85 | case ILU_SCALE_MITCHELL: 86 | iluFilter = Param; 87 | break; 88 | default: 89 | ilSetError(ILU_INVALID_ENUM); 90 | return; 91 | } 92 | break; 93 | 94 | case ILU_PLACEMENT: 95 | switch (Param) 96 | { 97 | case ILU_LOWER_LEFT: 98 | case ILU_LOWER_RIGHT: 99 | case ILU_UPPER_LEFT: 100 | case ILU_UPPER_RIGHT: 101 | case ILU_CENTER: 102 | iluPlacement = Param; 103 | break; 104 | default: 105 | ilSetError(ILU_INVALID_ENUM); 106 | return; 107 | } 108 | break; 109 | 110 | default: 111 | ilSetError(ILU_INVALID_ENUM); 112 | return; 113 | } 114 | return; 115 | } 116 | -------------------------------------------------------------------------------- /DevIL/src-ILU/src/ilu_utilities.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/25/2001 6 | // 7 | // Filename: src-ILU/src/ilu_utilities.cpp 8 | // 9 | // Description: Utility functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "ilu_internal.h" 15 | 16 | 17 | void ILAPIENTRY iluDeleteImage(ILuint Id) 18 | { 19 | ilDeleteImages(1, &Id); 20 | return; 21 | } 22 | 23 | 24 | ILuint ILAPIENTRY iluGenImage() 25 | { 26 | ILuint Id; 27 | ilGenImages(1, &Id); 28 | ilBindImage(Id); 29 | return Id; 30 | } 31 | 32 | 33 | //! Retrieves information about the current bound image. 34 | void ILAPIENTRY iluGetImageInfo(ILinfo *Info) 35 | { 36 | iluCurImage = ilGetCurImage(); 37 | if (iluCurImage == NULL || Info == NULL) { 38 | ilSetError(ILU_ILLEGAL_OPERATION); 39 | return; 40 | } 41 | 42 | Info->Id = ilGetCurName(); 43 | Info->Data = ilGetData(); 44 | Info->Width = iluCurImage->Width; 45 | Info->Height = iluCurImage->Height; 46 | Info->Depth = iluCurImage->Depth; 47 | Info->Bpp = iluCurImage->Bpp; 48 | Info->SizeOfData = iluCurImage->SizeOfData; 49 | Info->Format = iluCurImage->Format; 50 | Info->Type = iluCurImage->Type; 51 | Info->Origin = iluCurImage->Origin; 52 | Info->Palette = iluCurImage->Pal.Palette; 53 | Info->PalType = iluCurImage->Pal.PalType; 54 | Info->PalSize = iluCurImage->Pal.PalSize; 55 | iGetIntegervImage(iluCurImage, IL_NUM_IMAGES, 56 | (ILint*)&Info->NumNext); 57 | iGetIntegervImage(iluCurImage, IL_NUM_MIPMAPS, 58 | (ILint*)&Info->NumMips); 59 | iGetIntegervImage(iluCurImage, IL_NUM_LAYERS, 60 | (ILint*)&Info->NumLayers); 61 | 62 | return; 63 | } 64 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/include/ilut_allegro.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Toolkit Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 04/20/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILUT/include/ilut_alleg.h (Don't want to conflict with allegro.h) 8 | // 9 | // Description: 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | // xxxxAllegro.h has to be included before il/il.h!xxx 14 | //#ifdef ALLEGRO_VERSION // Check to make sure Allegro is present 15 | #ifdef ILUT_USE_ALLEGRO 16 | 17 | #ifndef ILUT_ALLEG_H 18 | #define ILUT_ALLEG_H 19 | 20 | #include 21 | 22 | 23 | 24 | #endif//ILUT_ALLEG_H 25 | #endif//ILUT_USE_ALLEGRO 26 | //#endif//ALLEGRO_VERSION 27 | 28 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/include/ilut_internal.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Toolkit Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 02/07/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILUT/include/ilut_internal.h 8 | // 9 | // Description: Internal stuff for ILUT 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #ifndef INTERNAL_H 15 | #define INTERNAL_H 16 | 17 | #define _IL_BUILD_LIBRARY 18 | #define _ILU_BUILD_LIBRARY 19 | #define _ILUT_BUILD_LIBRARY 20 | 21 | //#define WIN32_LEAN_AND_MEAN 22 | 23 | #include 24 | 25 | #ifdef _WIN32 26 | #ifdef _MSC_VER 27 | #if _MSC_VER > 1000 28 | #pragma warning(disable: 4996) // "The POSIX name for this item is deprecated." AND "This function or variable may be unsafe." 29 | #endif // _MSC_VER > 1000 30 | #endif 31 | #endif 32 | 33 | /* 34 | #ifdef _MSC_VER 35 | #if _MSC_VER > 1000 36 | pragma once 37 | pragma intrinsic(memcpy) 38 | pragma intrinsic(memset) 39 | #endif // _MSC_VER > 1000 40 | #endif 41 | */ 42 | 43 | #include 44 | #include 45 | 46 | #include 47 | 48 | extern ILimage *ilutCurImage; 49 | 50 | void ilutDefaultStates(void); 51 | 52 | 53 | #ifdef _UNICODE 54 | #define IL_TEXT(s) L##s 55 | #else 56 | #define IL_TEXT(s) (s) 57 | #endif 58 | 59 | 60 | // ImageLib Utility Toolkit's OpenGL Functions 61 | #ifdef ILUT_USE_OPENGL 62 | ILboolean ilutGLInit(); 63 | #endif 64 | 65 | // ImageLib Utility Toolkit's Win32 Functions 66 | #ifdef ILUT_USE_WIN32 67 | ILboolean ilutWin32Init(); 68 | #endif 69 | 70 | // ImageLib Utility Toolkit's Win32 Functions 71 | #ifdef ILUT_USE_DIRECTX8 72 | ILboolean ilutD3D8Init(); 73 | #endif 74 | 75 | #ifdef ILUT_USE_DIRECTX9 76 | ILboolean ilutD3D9Init(); 77 | #endif 78 | 79 | #ifdef ILUT_USE_DIRECTX10 80 | ILboolean ilutD3D10Init(); 81 | #endif 82 | 83 | #define CUBEMAP_SIDES 6 84 | #ifndef SAFE_RELEASE 85 | #define SAFE_RELEASE(p) {if((p)!=NULL){(p)->lpVtbl->Release(p);(p)=NULL;}} 86 | #endif 87 | 88 | 89 | #endif//INTERNAL_H 90 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/include/ilut_opengl.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Toolkit Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 01/09/2009 6 | // 7 | // Filename: src-ILUT/include/ilut_opengl.h 8 | // 9 | // Description: OpenGL functions for images 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef ILUT_OPENGL_H 14 | #define ILUT_OPENGL_H 15 | 16 | #include "ilut_internal.h" 17 | 18 | #ifndef min 19 | #define min(a, b) (((a) < (b)) ? (a) : (b)) 20 | #endif 21 | 22 | #ifdef ILUT_USE_OPENGL 23 | ILenum ilutGLFormat(ILenum, ILubyte); 24 | ILimage* MakeGLCompliant2D(ILimage *Src); 25 | ILimage* MakeGLCompliant3D(ILimage *Src); 26 | ILboolean IsExtensionSupported(const char *extension); 27 | 28 | 29 | #ifdef _WIN32 30 | #include 31 | #include 32 | #elif linux 33 | #include 34 | #include // patch #1504388. X86_64 Problems by Hans de Goede 35 | #elif defined __APPLE__ 36 | #include 37 | void* aglGetProcAddress (const GLubyte *name); 38 | #endif 39 | 40 | typedef void (ILAPIENTRY * ILGLTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *data); 41 | typedef void (ILAPIENTRY * ILGLTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *data); 42 | typedef void (ILAPIENTRY * ILGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); 43 | typedef void (ILAPIENTRY * ILGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); 44 | 45 | 46 | #endif //ILUT_USE_OPENGL 47 | #endif //ILUT_OPENGL_H 48 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/include/ilut_states.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Toolkit Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/28/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILUT/include/ilut_states.h 8 | // 9 | // Description: State machine 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef STATES_H 14 | #define STATES_H 15 | 16 | #include "ilut_internal.h" 17 | 18 | 19 | ILboolean ilutAble(ILenum Mode, ILboolean Flag); 20 | 21 | 22 | #define ILUT_ATTRIB_STACK_MAX 32 23 | 24 | ILuint ilutCurrentPos = 0; // Which position on the stack 25 | 26 | // 27 | // Various states 28 | // 29 | 30 | typedef struct ILUT_STATES 31 | { 32 | 33 | // ILUT states 34 | ILboolean ilutUsePalettes; 35 | ILboolean ilutOglConv; 36 | ILboolean ilutForceIntegerFormat; 37 | ILenum ilutDXTCFormat; 38 | 39 | // GL states 40 | ILboolean ilutUseS3TC; 41 | ILboolean ilutGenS3TC; 42 | ILboolean ilutAutodetectTextureTarget; 43 | ILint MaxTexW; 44 | ILint MaxTexH; 45 | ILint MaxTexD; 46 | 47 | // D3D states 48 | ILuint D3DMipLevels; 49 | ILenum D3DPool; 50 | ILint D3DAlphaKeyColor; // 0x00rrggbb format , -1 for none 51 | 52 | } ILUT_STATES; 53 | 54 | ILUT_STATES ilutStates[ILUT_ATTRIB_STACK_MAX]; 55 | 56 | 57 | #endif//STATES_H 58 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/msvc/ILUT Unicode.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILUT/msvc/ILUT Unicode.rc -------------------------------------------------------------------------------- /DevIL/src-ILUT/msvc/ILUT.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILUT/msvc/ILUT.rc -------------------------------------------------------------------------------- /DevIL/src-ILUT/msvc/ilut.def: -------------------------------------------------------------------------------- 1 | ; To remove an export, add a semicolon at the beginning of the line to comment it out. 2 | 3 | EXPORTS 4 | ilutConvertToHBitmap 5 | 6 | ilutConvertSliceToHBitmap 7 | ;ilutConvertToSDLSurface 8 | ;ilutSDLSurfaceFromBitmap 9 | ;ilutSDLSurfaceLoadImage 10 | ;ilutD3D8LoadSurface 11 | ;ilutD3D8MipFunc 12 | ;ilutD3D8Texture 13 | ;ilutD3D8TexFromFile 14 | ;ilutD3D8VolumeTexture 15 | ;ilutD3D8VolTexFromFile 16 | ;ilutD3D8TexFromFileInMemory 17 | ;ilutD3D8VolTexFromFileInMemory 18 | ;ilutD3D8TexFromFileHandle 19 | ;ilutD3D8VolTexFromFileHandle 20 | ;ilutD3D8TexFromResource 21 | ;ilutD3D8VolTexFromResource 22 | ;ilutD3D9LoadSurface 23 | ;ilutD3D9MipFunc 24 | ;ilutD3D9Texture 25 | ;ilutD3D9TexFromFile 26 | ;ilutD3D9VolumeTexture 27 | ;ilutD3D9VolTexFromFile 28 | ;ilutD3D9TexFromFileInMemory 29 | ;ilutD3D9VolTexFromFileInMemory 30 | ;ilutD3D9TexFromFileHandle 31 | ;ilutD3D9VolTexFromFileHandle 32 | ;ilutD3D9TexFromResource 33 | ;ilutD3D9VolTexFromResource 34 | ilutDisable 35 | ilutEnable 36 | ilutFreePaddedData 37 | ilutGetBmpInfo 38 | ilutGetBoolean 39 | ilutGetBooleanv 40 | ilutGetHPal 41 | ilutGetInteger 42 | ilutGetIntegerv 43 | ilutGetPaddedData 44 | ilutGetString 45 | ilutGetWinClipboard 46 | ilutInit 47 | ilutIsDisabled 48 | ilutIsEnabled 49 | ilutLoadResource 50 | ilutGLBindMipmaps 51 | ilutGLBindTexImage 52 | ilutGLBuildMipmaps 53 | ilutGLLoadImage 54 | ilutGLSaveImage 55 | ilutGLScreen 56 | ilutGLScreenie 57 | ilutGLSetTex 58 | ilutGLSubTex 59 | ilutGLTexImage 60 | ilutPopAttrib 61 | ilutPushAttrib 62 | ilutRenderer 63 | ilutSetHBitmap 64 | ilutSetHPal 65 | ilutSetInteger 66 | ilutSetWinClipboard 67 | ilutWinLoadImage 68 | ilutWinLoadUrl 69 | ilutWinPrint 70 | ilutWinSaveImage 71 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/msvc/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ILUT Unicode.rc 4 | // 5 | #define IDC_OPENILUT 109 6 | #define IDI_ICON1 155 7 | 8 | // Next default values for new objects 9 | // 10 | #ifdef APSTUDIO_INVOKED 11 | #ifndef APSTUDIO_READONLY_SYMBOLS 12 | #define _APS_NEXT_RESOURCE_VALUE 102 13 | #define _APS_NEXT_COMMAND_VALUE 40001 14 | #define _APS_NEXT_CONTROL_VALUE 1000 15 | #define _APS_NEXT_SYMED_VALUE 101 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/msvc/resources/IL Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/src-ILUT/msvc/resources/IL Logo.ico -------------------------------------------------------------------------------- /DevIL/src-ILUT/pkgconfig/ILUT.pc.cmake.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=${prefix}/include 4 | libdir=${exec_prefix}/lib 5 | 6 | Name: ILUT 7 | Description: Developer's Image Library - ILUT part (connection to higher level libraries) 8 | Version: @VERSION@ 9 | URL: http://openil.sourceforge.net 10 | Requires: IL ILU 11 | Cflags: -I${includedir} 12 | Libs: -L${libdir} -lILUT 13 | Libs.private: -lIL -lILU 14 | 15 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/pkgconfig/README: -------------------------------------------------------------------------------- 1 | ILU.pc.cmake.in is the template file for building ILU.pc, which 2 | provides pkg-config support for ILU. 3 | 4 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/src/ilut_internal.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Toolkit Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/15/2002 6 | // 7 | // Filename: src-ILUT/src/ilut_internal.cpp 8 | // 9 | // Description: Internal stuff for ILUT 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "ilut_internal.h" 15 | 16 | //#if !defined(__APPLE__) 17 | ILimage *ilutCurImage = NULL; 18 | //#endif 19 | -------------------------------------------------------------------------------- /DevIL/src-ILUT/src/ilut_main.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Toolkit Sources 4 | // Copyright (C) 2000-2017 by Denton Woods 5 | // Last modified: 05/28/2001 6 | // 7 | // Filename: src-ILUT/src/ilut_main.cpp 8 | // 9 | // Description: Startup functions 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | 14 | #include "ilut_internal.h" 15 | 16 | #ifdef _WIN32 17 | #ifndef IL_STATIC_LIB 18 | //#define WIN32_LEAN_AND_MEAN 19 | #include 20 | 21 | 22 | #ifdef _WIN32 23 | #if (defined(IL_USE_PRAGMA_LIBS)) 24 | #if defined(_MSC_VER) || defined(__BORLANDC__) 25 | #pragma comment(lib, "ILU.lib") 26 | #endif 27 | #endif 28 | #endif 29 | 30 | 31 | 32 | BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 33 | { 34 | hModule; lpReserved; 35 | 36 | // only initialize when attached to a new process. setup can cause errors in OpenIL 37 | // when called on a per thread basis 38 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 39 | //ilutInit(); 40 | } 41 | 42 | return TRUE; 43 | } 44 | #endif 45 | 46 | #else // Should check if gcc? 47 | 48 | // Should be able to condense this... 49 | static void GccMain() __attribute__((constructor)); 50 | static void GccMain() 51 | { 52 | //ilutInit(); 53 | } 54 | 55 | #endif 56 | 57 | 58 | void ILAPIENTRY ilutInit() 59 | { 60 | ilutDefaultStates(); // Set states to their defaults 61 | // Can cause crashes if DevIL is not initialized yet 62 | 63 | #ifdef ILUT_USE_OPENGL 64 | ilutGLInit(); // default renderer is OpenGL 65 | #endif 66 | 67 | #ifdef ILUT_USE_DIRECTX8 68 | ilutD3D8Init(); 69 | #endif 70 | 71 | #ifdef ILUT_USE_DIRECTX9 72 | ilutD3D9Init(); 73 | #endif 74 | 75 | return; 76 | } 77 | -------------------------------------------------------------------------------- /DevIL/test/Benchmark/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(benchmark EXCLUDE_FROM_ALL benchmark.c) 2 | target_link_libraries(benchmark IL ILU) 3 | target_include_directories(benchmark PRIVATE ${DevIL_SOURCE_DIR}/../include) 4 | 5 | -------------------------------------------------------------------------------- /DevIL/test/Benchmark/Makefile: -------------------------------------------------------------------------------- 1 | # Unix Makefile 2 | 3 | CC = gcc 4 | CFLAGS = -Wall 5 | LIBS = -lIL -lILU 6 | 7 | SRC = benchmark.c 8 | OBJECTS = $(SRC:%.c=.objects/%.o) 9 | DEPENDS = $(SRC:%.c=.depends/%.d) 10 | TARGET = benchmark 11 | 12 | all: $(TARGET) 13 | 14 | $(TARGET): $(OBJECTS) 15 | $(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -o $@ $^ 16 | 17 | .objects/%.o: %.c 18 | @@if [ ! -d $(@D) ]; then mkdir -p $(@D); fi 19 | $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< 20 | 21 | .depends/%.d: %.c 22 | @@if [ ! -d $(@D) ]; then mkdir -p $(@D); fi 23 | $(CC) $(INCLUDES) -MM -MG $< -MT '.objects/$(@F:%.d=%.o)' > $@ 24 | 25 | clean: 26 | rm -rf $(DEPENDS) $(OBJECTS) $(TARGET) 27 | 28 | -include $(DEPENDS) 29 | 30 | -------------------------------------------------------------------------------- /DevIL/test/Benchmark/benchmark.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Benchmark Source 4 | // Copyright (C) 2000 by Denton Woods 5 | // Last modified: 08/21/2001 <--Y2K Compliant! =] 6 | // 7 | // Filename: testil/benchmark/benchmark.c 8 | // 9 | // Description: Performs benchmarking of DevIL and ILU. 10 | // This requires the Simple DirectMedia Layer library, 11 | // available at http://www.libsdl.org 12 | // 13 | //----------------------------------------------------------------------------- 14 | 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | 22 | #ifdef _WIN32 23 | #ifdef _DEBUG 24 | #pragma comment(linker, "/NODEFAULTLIB:msvcrt.lib") 25 | #endif//_DEBUG 26 | #endif 27 | 28 | 29 | int main(int argc, char **argv) 30 | { 31 | ILuint id, Error; 32 | ILuint i; 33 | ILdouble avgtime, curtime, last_elapsed, cur_elapsed; 34 | 35 | if (argc < 2) { 36 | printf("Please specify a filename.\n"); 37 | return 1; 38 | } 39 | 40 | if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION || 41 | ilGetInteger(ILU_VERSION_NUM) < ILU_VERSION) { 42 | printf("DevIL version is different...exiting!\n"); 43 | return 2; 44 | } 45 | 46 | ilInit(); 47 | 48 | 49 | ilGenImages(1, &id); 50 | ilBindImage(id); 51 | 52 | last_elapsed = cur_elapsed = time(NULL); 53 | 54 | 55 | ilHint(IL_MEM_SPEED_HINT, IL_FASTEST); 56 | printf("Using IL_FASTEST\n"); 57 | avgtime = 0.0; 58 | 59 | for (i = 0; i < 10; i++) { 60 | ilLoadImage(argv[1]); 61 | cur_elapsed = time(NULL); 62 | curtime = cur_elapsed - last_elapsed; 63 | last_elapsed = cur_elapsed; 64 | avgtime += curtime; 65 | printf("%g\n", curtime); 66 | } 67 | 68 | printf("Average time: %g\n", avgtime / 10.0); 69 | 70 | 71 | ilHint(IL_MEM_SPEED_HINT, IL_LESS_MEM); 72 | printf("Using IL_LESS_MEM\n"); 73 | avgtime = 0.0; 74 | 75 | 76 | last_elapsed = cur_elapsed = time(NULL); 77 | 78 | for (i = 0; i < 10; i++) { 79 | ilLoadImage(argv[1]); 80 | cur_elapsed = time(NULL); 81 | curtime = cur_elapsed - last_elapsed; 82 | last_elapsed = cur_elapsed; 83 | avgtime += curtime; 84 | printf("%g\n", curtime); 85 | } 86 | printf("Average time: %g\n", avgtime / 10.0); 87 | 88 | 89 | ilDeleteImages(1, &id); 90 | 91 | while ((Error = ilGetError())) { 92 | printf("Error: %s\n", iluErrorString(Error)); 93 | } 94 | 95 | return 0; 96 | } 97 | -------------------------------------------------------------------------------- /DevIL/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(Benchmark) 2 | add_subdirectory(UnitTest) 3 | # TODO 4 | #add_subdirectory(DDrawTest) 5 | #add_subdirectory(Fltk) 6 | #add_subdirectory(format_test) 7 | #add_subdirectory(MdiTest) 8 | #add_subdirectory(old) 9 | #add_subdirectory(Stress) 10 | #add_subdirectory(Unzip) 11 | #add_subdirectory(URar) 12 | #add_subdirectory(VolTex) 13 | -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/SOURCE/DirectX.cpp: -------------------------------------------------------------------------------- 1 | //============================================================// 2 | // File: DirectX.cpp 3 | // 4 | // Date: 10-19-2000 5 | //============================================================// 6 | #include "../header/Render2DCore.h" 7 | 8 | void dxutil_InitStructure(DDPIXELFORMAT& structure) 9 | { 10 | ZeroMemory(&structure, sizeof(structure)); 11 | structure.dwSize = sizeof(structure); 12 | } 13 | 14 | void dxutil_InitStructure(DDSURFACEDESC& structure) 15 | { 16 | ZeroMemory(&structure, sizeof(structure)); 17 | structure.dwSize = sizeof(structure); 18 | structure.ddpfPixelFormat.dwSize = sizeof(structure); 19 | } 20 | 21 | void dxutil_InitStructure(DDSURFACEDESC2& structure) 22 | { 23 | ZeroMemory(&structure, sizeof(structure)); 24 | structure.dwSize = sizeof(structure); 25 | structure.ddpfPixelFormat.dwSize = sizeof(structure); 26 | } 27 | -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/header/Render2DCore.h: -------------------------------------------------------------------------------- 1 | //============================================================// 2 | // File: Render2DCore.h 3 | // 4 | // Date: 10-19-2000 5 | //============================================================// 6 | #ifndef RENDER2DCORE_H 7 | #define RENDER2DCORE_H 8 | 9 | #include 10 | #include 11 | 12 | #include "beTypes.h" 13 | #include "beScreen.h" 14 | #include "beSurface.h" 15 | 16 | #endif -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/header/beScreen.h: -------------------------------------------------------------------------------- 1 | //============================================================// 2 | // File: beScreen.h 3 | // 4 | // Date: 10-19-2000 5 | //============================================================// 6 | #ifndef BESCREEN_H 7 | #define BESCREEN_H 8 | 9 | #define BE_SCREENFLAGS_FULLSCREEN 0x00000000 10 | #define BE_SCREENFLAGS_WINDOWED 0x00000001 11 | #define BE_SCREENFLAGS_BACKBUFFERS 0x00000002 12 | 13 | struct beScreenParams 14 | { 15 | long m_Flags; // BE_SCREENFLAGS_xxxx 16 | 17 | unsigned int m_iScreenWidth; // x-resolution 18 | unsigned int m_iScreenHeight; // y-resolution 19 | unsigned int m_iScreenBitCount; // color resolution (ignored in windowed mode) 20 | 21 | unsigned int m_iBackBufferCount; // number of back-buffers (max 1 in windowed mode) 22 | 23 | HWND m_OwnerWnd; // handle of owner window 24 | 25 | long m_sclFlags; // additional cooperative flags 26 | }; 27 | 28 | class beScreen 29 | { 30 | 31 | public: 32 | 33 | beScreen(); 34 | ~beScreen(); 35 | 36 | bool Initialize(beScreenParams sparam); 37 | void Delete(); 38 | 39 | bool Flip(); 40 | 41 | void Move(); 42 | 43 | beDirectDrawSurface * GetPrimarySurface() { return m_pddsPrimary; }; 44 | beDirectDrawSurface * GetBackBufferSurface() { return m_pddsBackBuffer; }; 45 | beDirectDraw * GetDirectDraw() { return m_pDDraw; }; 46 | beScreenParams GetScreenParams() { return m_ScreenParams; }; 47 | 48 | RECT GetScreenRect() { return m_rcScreen; }; 49 | RECT GetViewportRect() { return m_rcViewport; }; 50 | 51 | // Pixel-Plotting 52 | WORD GetRBits() { return m_wRBits; }; 53 | WORD GetGBits() { return m_wGBits; }; 54 | WORD GetBBits() { return m_wBBits; }; 55 | WORD GetRPos() { return m_wRPos; }; 56 | WORD GetGPos() { return m_wGPos; }; 57 | WORD GetBPos() { return m_wBPos; }; 58 | 59 | protected: 60 | 61 | bool InitializeSurfaces(); 62 | void InitializeMask(); 63 | 64 | private: 65 | 66 | RECT m_rcViewport; // Pos. & size to blt from 67 | RECT m_rcScreen; // Screen pos. for blt 68 | 69 | beDirectDraw * m_pDDraw; 70 | beDirectDrawSurface * m_pddsPrimary; 71 | beDirectDrawSurface * m_pddsBackBuffer; 72 | 73 | beScreenParams m_ScreenParams; 74 | 75 | // Pixel-Plotting 76 | WORD m_wRBits; 77 | WORD m_wGBits; 78 | WORD m_wBBits; 79 | WORD m_wRPos; 80 | WORD m_wGPos; 81 | WORD m_wBPos; 82 | }; 83 | 84 | #endif -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/header/beSurface.h: -------------------------------------------------------------------------------- 1 | //============================================================// 2 | // File: beScreen.h 3 | // 4 | // Date: 10-19-2000 5 | //============================================================// 6 | #ifndef BESURFACE_H 7 | #define BESURFACE_H 8 | 9 | class beSurface 10 | { 11 | 12 | public: 13 | 14 | beSurface(beScreen *pScreen); 15 | ~beSurface(); 16 | 17 | void Release(); 18 | 19 | bool Lock(DDSURFACEDESC2& ddsd); 20 | bool Unlock(); 21 | 22 | bool CreateSurface(int iWidth, int iHeight, bool bSystemMemory); 23 | bool LoadImage(HBITMAP image, bool bSystemMemory); 24 | 25 | beDirectDrawSurface * GetSurface() { return m_pSurface; }; 26 | int GetWidth() { return m_iWidth; }; 27 | int GetHeight() { return m_iHeight; }; 28 | 29 | bool BltFast(DWORD dwX,DWORD dwY,beSurface* pSurface,LPRECT lpSrcRect,DWORD dwTrans); 30 | bool Blt(LPRECT lpDestRect,beSurface* pSurface,LPRECT lpSrcRect,DWORD dwFlags,LPDDBLTFX lpDDBltFx); 31 | 32 | void PlotPixel( int x, int y, int r, int g, int b, DDSURFACEDESC2 *ddsd); 33 | 34 | protected: 35 | void PlotPixel16( int x, int y, int r, int g, int b, DDSURFACEDESC2 *ddsd); 36 | void PlotPixel32( int x, int y, int r, int g, int b, DDSURFACEDESC2 *ddsd); 37 | 38 | private: 39 | int m_iWidth; 40 | int m_iHeight; 41 | 42 | beScreen * m_pScreen; 43 | beDirectDrawSurface * m_pSurface; 44 | 45 | 46 | }; 47 | 48 | #endif -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/header/beTypes.h: -------------------------------------------------------------------------------- 1 | //============================================================// 2 | // File: beTypes.h 3 | // 4 | // Date: 10-19-2000 5 | //============================================================// 6 | #ifndef BETYPES_H 7 | #define BETYPES_H 8 | 9 | #define beDirectDraw IDirectDraw7 10 | #define beDirectDrawIID IID_IDirectDraw7 11 | #define beDirectDrawSurface IDirectDrawSurface7 12 | #define beDirectDrawSurfaceIID IID_IDirectDrawSurface7 13 | 14 | #define beSafeRelease(ptr) if ((ptr) != NULL) { (ptr)->Release(); (ptr) = NULL; } 15 | 16 | void dxutil_InitStructure(DDPIXELFORMAT& structure); 17 | void dxutil_InitStructure(DDSURFACEDESC& structure); 18 | void dxutil_InitStructure(DDSURFACEDESC2& structure); 19 | 20 | 21 | #endif -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/3d.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/3d.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/OpenIL Address Bar Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/OpenIL Address Bar Logo.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/bmp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/bmp.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/gif.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/gif.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/graphic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/graphic.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/jpg.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/jpg.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/psd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/psd.ico -------------------------------------------------------------------------------- /DevIL/test/DDrawTest/test_window/resources/rt_targa.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/DDrawTest/test_window/resources/rt_targa.bin -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/3d.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/3d.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/OpenIL Address Bar Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/OpenIL Address Bar Logo.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/OpenIL Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/OpenIL Logo.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/bmp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/bmp.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/gif.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/gif.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/graphic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/graphic.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/jpg.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/jpg.ico -------------------------------------------------------------------------------- /DevIL/test/MdiTest/resources/psd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/MdiTest/resources/psd.ico -------------------------------------------------------------------------------- /DevIL/test/Stress/nommgr.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------------------------------------------------------------- 2 | // _ 3 | // | | 4 | // _ __ ___ _ __ ___ _ __ ___ __ _ _ __ | |__ 5 | // | '_ \ / _ \| '_ ` _ \| '_ ` _ \ / _` | '__| | '_ \ 6 | // | | | | (_) | | | | | | | | | | | (_| | | _ | | | | 7 | // |_| |_|\___/|_| |_| |_|_| |_| |_|\__, |_| (_)|_| |_| 8 | // __/ | 9 | // |___/ 10 | // 11 | // Memory manager & tracking software 12 | // 13 | // Best viewed with 8-character tabs and (at least) 132 columns 14 | // 15 | // --------------------------------------------------------------------------------------------------------------------------------- 16 | // 17 | // Restrictions & freedoms pertaining to usage and redistribution of this software: 18 | // 19 | // * This software is 100% free 20 | // * If you use this software (in part or in whole) you must credit the author. 21 | // * This software may not be re-distributed (in part or in whole) in a modified 22 | // form without clear documentation on how to obtain a copy of the original work. 23 | // * You may not use this software to directly or indirectly cause harm to others. 24 | // * This software is provided as-is and without warrantee. Use at your own risk. 25 | // 26 | // For more information, visit HTTP://www.FluidStudios.com 27 | // 28 | // --------------------------------------------------------------------------------------------------------------------------------- 29 | // Originally created on 12/22/2000 by Paul Nettle 30 | // 31 | // Copyright 2000, Fluid Studios, Inc., all rights reserved. 32 | // --------------------------------------------------------------------------------------------------------------------------------- 33 | 34 | #ifdef new 35 | #undef new 36 | #endif 37 | 38 | #ifdef delete 39 | #undef delete 40 | #endif 41 | 42 | #ifdef malloc 43 | #undef malloc 44 | #endif 45 | 46 | #ifdef calloc 47 | #undef calloc 48 | #endif 49 | 50 | #ifdef realloc 51 | #undef realloc 52 | #endif 53 | 54 | #ifdef free 55 | #undef free 56 | #endif 57 | 58 | // --------------------------------------------------------------------------------------------------------------------------------- 59 | // nommgr.h - End of file 60 | // --------------------------------------------------------------------------------------------------------------------------------- 61 | -------------------------------------------------------------------------------- /DevIL/test/URar/test.c: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // UniquE's RAR File Library test 4 | // 5 | // Just a quick test I threw together to see how well URar and DevIL coexist. 6 | // For more info on URar, go to http://www.mountpoint.ch/unique/project/urarfilelib 7 | // 8 | // 9 | 10 | 11 | // Required include files. 12 | #include 13 | #include 14 | #include "urarlib.h" 15 | 16 | 17 | int main(int argc, char **argv) 18 | { 19 | ILuint ImgId; 20 | ILenum Error; 21 | char *Data; 22 | long Size; 23 | 24 | // We use the filename specified in the first argument of the command-line. 25 | if (argc < 3) { 26 | printf("Please specify a .rar file and file inside to open.\n"); 27 | return 1; 28 | } 29 | 30 | // Check if the shared lib's version matches the executable's version. 31 | if (ilGetInteger(IL_VERSION_NUM) < IL_VERSION || 32 | iluGetInteger(ILU_VERSION_NUM) < ILU_VERSION) { 33 | printf("DevIL version is different...exiting!\n"); 34 | return 2; 35 | } 36 | 37 | // Initialize DevIL. 38 | ilInit(); 39 | // Generate the main image name to use. 40 | ilGenImages(1, &ImgId); 41 | // Bind this image name. 42 | ilBindImage(ImgId); 43 | 44 | if (!urarlib_get(&Data, &Size, argv[2], argv[1], "none")) { 45 | printf("Error loading .rar file.\n"); 46 | return 3; 47 | } 48 | 49 | // Loads the image specified by File into the image named by ImgId. 50 | ilLoadL(IL_TGA, Data, Size); 51 | 52 | // Display the image's dimensions to the end user. 53 | printf("Width: %d Height: %d Depth: %d Bpp: %d\n", ilGetInteger(IL_IMAGE_WIDTH), 54 | ilGetInteger(IL_IMAGE_HEIGHT), ilGetInteger(IL_IMAGE_DEPTH), ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL)); 55 | 56 | // Enable this to let us overwrite the destination file if it already exists. 57 | ilEnable(IL_FILE_OVERWRITE); 58 | 59 | // If argv[2] is present, we save to this filename, else we save to test.tga. 60 | if (argc > 2) 61 | ilSaveImage(argv[3]); 62 | else 63 | ilSaveImage("test.tga"); 64 | 65 | // We're done with the image, so let's delete it. 66 | ilDeleteImages(1, &ImgId); 67 | 68 | // Simple Error detection loop that displays the Error to the user in a human-readable form. 69 | while ((Error = ilGetError())) { 70 | printf("Error: %s\n", iluErrorString(Error)); 71 | } 72 | 73 | return 0; 74 | } 75 | -------------------------------------------------------------------------------- /DevIL/test/URar/test.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "test"=.\test.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /DevIL/test/UnitTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") 3 | 4 | find_package(cppunit) 5 | 6 | if(CPPUNIT_FOUND) 7 | add_executable(UnitTest EXCLUDE_FROM_ALL ILTest.cpp ILUTest.cpp UnitTest.cpp) 8 | target_include_directories(UnitTest PRIVATE ${cppunit_INCLUDE_DIRECTORIES}) 9 | target_link_libraries(UnitTest IL ILU ${CPPUNIT_LIBRARIES}) 10 | target_include_directories(UnitTest PRIVATE ${DevIL_SOURCE_DIR}/../include) 11 | else() 12 | Message(STATUS "UnitTest disabled, cppunit wasn't found!") 13 | endif() 14 | -------------------------------------------------------------------------------- /DevIL/test/UnitTest/Data/Cardinal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/UnitTest/Data/Cardinal.gif -------------------------------------------------------------------------------- /DevIL/test/UnitTest/Data/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DentonW/DevIL/6f3d5e9bc5d173f56060fc8e14bed35c8edcfdcc/DevIL/test/UnitTest/Data/Logo.png -------------------------------------------------------------------------------- /DevIL/test/UnitTest/ILTest.h: -------------------------------------------------------------------------------- 1 | //ILTest.h 2 | #ifndef ILTEST_H 3 | #define ILTEST_H 4 | 5 | #include 6 | 7 | class ILTest : public CPPUNIT_NS::TestFixture 8 | { 9 | CPPUNIT_TEST_SUITE( ILTest ); 10 | CPPUNIT_TEST( TestilActiveImage ); 11 | //CPPUNIT_TEST( TestilActiveLayer ); 12 | //CPPUNIT_TEST( TestilActiveMipMap ); 13 | //CPPUNIT_TEST( TestilApplyProfile ); 14 | CPPUNIT_TEST( TestilBindImage ); 15 | CPPUNIT_TEST( TestilClearColour ); 16 | CPPUNIT_TEST( TestilClearImage ); 17 | CPPUNIT_TEST( TestilCloneImage ); 18 | CPPUNIT_TEST( TestilConvertImage ); 19 | CPPUNIT_TEST( TestilSaveF ); 20 | CPPUNIT_TEST_SUITE_END(); 21 | 22 | public: 23 | void setUp(); 24 | void tearDown(); 25 | 26 | void TestilActiveImage(); 27 | void TestilBindImage(); 28 | void TestilClearColour(); 29 | void TestilClearImage(); 30 | void TestilCloneImage(); 31 | void TestilConvertImage(); 32 | void TestilSaveF(); 33 | 34 | }; 35 | 36 | #endif // ILTEST_H 37 | -------------------------------------------------------------------------------- /DevIL/test/UnitTest/ILUTest.cpp: -------------------------------------------------------------------------------- 1 | // MoneyTest.cpp 2 | 3 | #include "ILUTest.h" 4 | #include 5 | #include 6 | 7 | // Registers the fixture into the 'registry' 8 | CPPUNIT_TEST_SUITE_REGISTRATION( ILUTest ); 9 | 10 | 11 | void ILUTest::setUp() 12 | { 13 | ilInit(); 14 | iluInit(); 15 | } 16 | 17 | 18 | void ILUTest::tearDown() 19 | { 20 | const ILenum lResult = ilGetError(); 21 | 22 | while (ilGetError() != IL_NO_ERROR) {;} 23 | 24 | ilResetMemory(); 25 | CPPUNIT_ASSERT(ilGetError() == IL_NO_ERROR); 26 | 27 | CPPUNIT_ASSERT_MESSAGE("Received Error from ilGetError", lResult == IL_NO_ERROR); 28 | } 29 | 30 | 31 | void ILUTest::LoadStandardImage() 32 | { 33 | ilLoadImage(".\\Data\\Logo.png"); 34 | } 35 | 36 | void ILUTest::TestiluSaturate4f() 37 | { 38 | ILuint MainImage = 0; 39 | 40 | FILE * lBuffer = fopen(".\\results\\result.bmp", "wb"); 41 | ilGenImages(1, &MainImage); 42 | ilBindImage(MainImage); 43 | LoadStandardImage(); 44 | ilConvertImage(IL_RGB,IL_BYTE); 45 | iluSaturate4f(-1.0, 0.0, 0.0, -1.0); 46 | iluMirror(); 47 | iluBlurAvg(3); 48 | ilSaveF(IL_BMP,lBuffer); 49 | fclose(lBuffer); 50 | } 51 | 52 | void ILUTest::TestiluReplaceColour() 53 | { 54 | ILuint MainImage = 0; 55 | 56 | FILE * lBuffer = fopen(".\\results\\result.bmp", "wb"); 57 | ilGenImages(1, &MainImage); 58 | ilBindImage(MainImage); 59 | LoadStandardImage(); 60 | ilConvertImage(IL_RGB,IL_BYTE); 61 | iluReplaceColour(1.0, 0.0, 0.0, 0.0); 62 | ilSaveF(IL_BMP,lBuffer); 63 | fclose(lBuffer); 64 | } -------------------------------------------------------------------------------- /DevIL/test/UnitTest/ILUTest.h: -------------------------------------------------------------------------------- 1 | //ILTest.h 2 | #ifndef ILUTEST_H 3 | #define ILUTEST_H 4 | 5 | #include 6 | 7 | class ILUTest : public CPPUNIT_NS::TestFixture 8 | { 9 | CPPUNIT_TEST_SUITE( ILUTest ); 10 | CPPUNIT_TEST( TestiluSaturate4f ); 11 | CPPUNIT_TEST( TestiluReplaceColour ); 12 | CPPUNIT_TEST_SUITE_END(); 13 | 14 | public: 15 | void setUp(); 16 | void tearDown(); 17 | 18 | void TestiluSaturate4f(); 19 | void TestiluReplaceColour(); 20 | 21 | private: 22 | void LoadStandardImage(); 23 | }; 24 | 25 | #endif // ILUTEST_H 26 | -------------------------------------------------------------------------------- /DevIL/test/UnitTest/Results/Readme.txt: -------------------------------------------------------------------------------- 1 | This is where the results of the pictures go when the UnitTest is running. -------------------------------------------------------------------------------- /DevIL/test/UnitTest/UnitTest.cpp: -------------------------------------------------------------------------------- 1 | // UnitTest.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | void TestGenerate() 13 | { 14 | 15 | ILuint lImages[5]; 16 | ilInit(); 17 | iluInit(); 18 | 19 | ilGenImages(5, lImages); 20 | ilBindImage(lImages[3]); 21 | ilLoadImage("D:\\rgbrle4.bmp"); 22 | 23 | 24 | ilBindImage(lImages[4]); 25 | ilLoadImage("D:\\rgbrle4.bmp"); 26 | iluMirror(); 27 | 28 | 29 | ilBindImage(lImages[0]); 30 | ilSaveImage("D:\\Image0.bmp"); 31 | 32 | ilBindImage(lImages[1]); 33 | ilSaveImage("D:\\Image1.bmp"); 34 | 35 | ilBindImage(lImages[2]); 36 | ilSaveImage("D:\\Image2.bmp"); 37 | 38 | ilBindImage(lImages[3]); 39 | ilSaveImage("D:\\Image3.bmp"); 40 | 41 | ilBindImage(lImages[4]); 42 | ilSaveImage("D:\\Image4.bmp"); 43 | 44 | } 45 | 46 | void TestClipboard() 47 | { 48 | ilInit(); 49 | iluInit(); 50 | 51 | FILE * lBuffer = fopen("D:\\result.bmp", "wb"); 52 | // ilutGetWinClipboard(); 53 | ilSaveF(IL_BMP,lBuffer); 54 | assert(ilGetError() == IL_NO_ERROR); 55 | fclose(lBuffer); 56 | } 57 | 58 | 59 | int main(int argc, char* argv[]) 60 | { 61 | // Get the top level suite from the registry 62 | CPPUNIT_NS::Test *suite = CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest(); 63 | 64 | // Adds the test to the list of test to run 65 | CPPUNIT_NS::TextUi::TestRunner runner; 66 | runner.addTest( suite ); 67 | 68 | // Change the default outputter to a compiler error format outputter 69 | runner.setOutputter( new CPPUNIT_NS::CompilerOutputter( &runner.result(), 70 | std::cerr ) ); 71 | // Run the test. 72 | bool wasSucessful = runner.run(); 73 | 74 | // Return error code 1 if the one of test failed. 75 | return wasSucessful ? 0 : 1; 76 | } 77 | -------------------------------------------------------------------------------- /DevIL/test/UnitTest/cmake/Findcppunit.cmake: -------------------------------------------------------------------------------- 1 | # - try to find cppunit library 2 | # 3 | # Cache Variables: (probably not for direct use in your scripts) 4 | # CPPUNIT_INCLUDE_DIR 5 | # CPPUNIT_LIBRARY 6 | # 7 | # Non-cache variables you might use in your CMakeLists.txt: 8 | # CPPUNIT_FOUND 9 | # CPPUNIT_INCLUDE_DIRS 10 | # CPPUNIT_LIBRARIES 11 | # 12 | # Requires these CMake modules: 13 | # SelectLibraryConfigurations (included with CMake >= 2.8.0) 14 | # FindPackageHandleStandardArgs (known included with CMake >=2.6.2) 15 | # 16 | # Original Author: 17 | # 2009-2011 Ryan Pavlik 18 | # http://academic.cleardefinition.com 19 | # Iowa State University HCI Graduate Program/VRAC 20 | # 21 | # Copyright Iowa State University 2009-2011. 22 | # Distributed under the Boost Software License, Version 1.0. 23 | # (See accompanying file LICENSE_1_0.txt or copy at 24 | # http://www.boost.org/LICENSE_1_0.txt) 25 | 26 | set(CPPUNIT_ROOT_DIR 27 | "${CPPUNIT_ROOT_DIR}" 28 | CACHE 29 | PATH 30 | "Directory to search") 31 | 32 | find_library(CPPUNIT_LIBRARY_RELEASE 33 | NAMES 34 | cppunit 35 | HINTS 36 | "${CPPUNIT_ROOT_DIR}") 37 | 38 | find_library(CPPUNIT_LIBRARY_DEBUG 39 | NAMES 40 | cppunitd 41 | HINTS 42 | "${CPPUNIT_ROOT_DIR}") 43 | 44 | include(SelectLibraryConfigurations) 45 | select_library_configurations(CPPUNIT) 46 | 47 | # Might want to look close to the library first for the includes. 48 | get_filename_component(_libdir "${CPPUNIT_LIBRARY_RELEASE}" PATH) 49 | 50 | find_path(CPPUNIT_INCLUDE_DIR 51 | NAMES 52 | cppunit/TestCase.h 53 | HINTS 54 | "${_libdir}/.." 55 | PATHS 56 | "${CPPUNIT_ROOT_DIR}" 57 | PATH_SUFFIXES 58 | include/) 59 | 60 | 61 | include(FindPackageHandleStandardArgs) 62 | find_package_handle_standard_args(cppunit 63 | DEFAULT_MSG 64 | CPPUNIT_LIBRARY 65 | CPPUNIT_INCLUDE_DIR) 66 | 67 | if(CPPUNIT_FOUND) 68 | set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS}) 69 | set(CPPUNIT_INCLUDE_DIRS "${CPPUNIT_INCLUDE_DIR}") 70 | mark_as_advanced(CPPUNIT_ROOT_DIR) 71 | endif() 72 | 73 | mark_as_advanced(CPPUNIT_INCLUDE_DIR 74 | CPPUNIT_LIBRARY_RELEASE 75 | CPPUNIT_LIBRARY_DEBUG) 76 | -------------------------------------------------------------------------------- /DevIL/test/Unzip/NV_UNZIP.H: -------------------------------------------------------------------------------- 1 | /*********************************************************************NVMH1**** 2 | File: 3 | nv_unzip.h 4 | 5 | Copyright (C) 1999, 2000 NVIDIA Corporation 6 | This file is provided without support, instruction, or implied warranty of any 7 | kind. NVIDIA makes no guarantee of its fitness for a particular purpose and is 8 | not liable under any circumstances for any damages or loss whatsoever arising 9 | from the use or inability to use this file or items derived from it. 10 | 11 | Comments: 12 | 13 | 14 | ******************************************************************************/ 15 | 16 | #ifndef __nv_unzip_h__ 17 | #define __nv_unzip_h__ 18 | 19 | namespace unzip 20 | { 21 | extern unsigned char * open(const char * filename, const char * inzipfile, unsigned int * size); 22 | } 23 | 24 | #endif /* __nv_unzip_h__ */ -------------------------------------------------------------------------------- /DevIL/test/format_test/format_checks.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERBOSE="" # set VERBOSE="v" for verbose mode 4 | # that @expression@ will be substituted by the 'confgure' script 5 | EXTENSIONS="@SUPPORTED_FORMATS@" 6 | # Here are the extensions that should support saving according to docs 7 | #CAN_SAVE=" BMP DDS HDR ICO JPG PCX PNG PPM PSD RAW SGI TGA TIF XPM " RAW and XPM are problematic... 8 | CAN_SAVE="BMP DDS EXR HDR ICO JP2 JPG PCX PNG PPM PSD SGI TGA TIF VTF" 9 | # List of formats that we don't test since they are problematic 10 | PROBLEMATIC="RAW VTF WBMP XPM" 11 | 12 | echo 13 | echo "Running saving and loading consistency test..." 14 | 15 | FAILED_FORMATS="" 16 | PASSED_FORMATS="" 17 | 18 | # if using Wine makes sense, use it... 19 | if [ "x@build_os@" != "x@host_os@" ] 20 | then 21 | if [ "x@PLATFORM@" = "xMINGW32" -o "x@PLATFORM@" = "xCYGWIN" ] 22 | then 23 | test $(which wine 2> /dev/null) && WINE="wine" 24 | echo "Warning: Using wine to test executables (not 100% reliable)" 25 | fi 26 | fi 27 | 28 | for EXTENSION in $EXTENSIONS 29 | do 30 | #echo expr match "' $CAN_SAVE '" '.*\s'$EXTENSION'\s.*' 31 | if [ $(expr match "' $CAN_SAVE '" '.*\s'$EXTENSION'\s.*') -eq 0 -o $(expr match "' $PROBLEMATIC '" '.*\s'$EXTENSION'\s.*') -ne 0 ] 32 | then # This extension is not considered as supported... 33 | continue; 34 | fi 35 | test -n "$VERBOSE" && echo $WINE ./testil@EXEEXT@ -e $EXTENSION 36 | # EXEEXT comes in when one compiles on platforms that append extensions to executables (testil.exe) 37 | $WINE ./testil@EXEEXT@ -e$VERBOSE $EXTENSION 38 | 39 | # We have to capture whether the test has failed or not 40 | if [ ! $? -eq 0 ] 41 | then # we have an error here... 42 | FAILED_FORMATS="$FAILED_FORMATS $EXTENSION" 43 | FAILED="$?" 44 | else #no error... 45 | PASSED_FORMATS="$PASSED_FORMATS $EXTENSION" 46 | fi 47 | done 48 | 49 | #let's tell something to the user as well: 50 | if [ "x$FAILED" = "x" ] 51 | then #everything went fine 52 | echo "All examined formats were OK:$PASSED_FORMATS" 53 | else #something went wrong 54 | echo "Errors were encountered during the test :-(" 55 | echo "Formats that were OK:$PASSED_FORMATS" 56 | echo "Failed formats: $FAILED_FORMATS" 57 | FAILED="1" 58 | fi # end of something went wrong 59 | echo "Problematic (untested) formats: $PROBLEMATIC" 60 | 61 | # And we have to tell the result to the shell, too... 62 | exit $FAILED 63 | -------------------------------------------------------------------------------- /DevIL/test/format_test/ilu_checks.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | REF_IMAGES_DIR=../docs/images 3 | TESTDIR=ilu_test 4 | if test -f $TESTDIR 5 | then 6 | echo "The directory '$TESTDIR', where we plan to dump test files, already exists." 7 | echo "This may be dangerous, bailing out..." 8 | exit 9 | fi 10 | 11 | echo 12 | echo "Running ILU manipulation test..." 13 | 14 | mkdir $TESTDIR 15 | # Generate the images that should be +- in the docs... 16 | sh $REF_IMAGES_DIR/../generate-images.sh "$REF_IMAGES_DIR/small_stairway.jpg" "$TESTDIR" 17 | OUR_FILES=$(ls $TESTDIR) 18 | 19 | # if using Wine makes sense, use it... 20 | if [ "x@build_os@" != "x@host_os@" ] 21 | then 22 | if [ "x@PLATFORM@" = "xMINGW32" -o "x@PLATFORM@" = "xCYGWIN" ] 23 | then 24 | test $(which wine 2> /dev/null) && WINE="wine" 25 | echo "Warning: Using wine to test executables (not 100% reliable)" 26 | fi 27 | fi 28 | 29 | FAILED_MANIPULATIONS="" 30 | PASSED_MANIPULATIONS="" 31 | #manipulations that may fail 32 | PROBLEMATIC="noisify" 33 | 34 | for image in $OUR_FILES 35 | do 36 | MANIPULATION_NAME=$(echo $image | sed -e 's/.*_\([a-z][a-zA-Z0-9]*\)[_\.].*/\1/') 37 | if [ $(expr match "' $PROBLEMATIC '" '.*\s'$MANIPULATION_NAME'\s*') -ne 0 ] 38 | then # This manipulation is not considered as supported... 39 | continue 40 | fi 41 | $WINE ./testil@EXEEXT@ -sp $TESTDIR/$image,$REF_IMAGES_DIR/$image 42 | # We have to capture whether the test has failed or not 43 | if [ ! $? -eq 0 ] 44 | then # we have an error here... 45 | FAILED_MANIPULATIONS="$FAILED_MANIPULATIONS $MANIPULATION_NAME" 46 | FAILED="yes" 47 | else #no error... 48 | PASSED_MANIPULATIONS="$PASSED_MANIPULATIONS $MANIPULATION_NAME" 49 | fi 50 | done 51 | 52 | #clean the mess 53 | rm -rf $TESTDIR 54 | 55 | #let's tell something to the user as well: 56 | if [ "x$FAILED" = "x" ] 57 | then #everything went fine 58 | echo "All examined manipulations were OK:$PASSED_MANIPULATIONS" 59 | else #something went wrong 60 | echo "Errors were encountered during the test :-(" 61 | echo "Manipulations that were OK:$PASSED_MANIPULATIONS" 62 | echo "Failed manipulations: $FAILED_MANIPULATIONS" 63 | FAILED="1" 64 | fi # end of something went wrong 65 | echo "Problematic (untested) manipulations: $PROBLEMATIC" 66 | 67 | # And we have to tell the result to the shell, too... 68 | exit $FAILED 69 | -------------------------------------------------------------------------------- /DevIL/test/old/doom.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | 5 | 6 | 7 | typedef struct WADHEAD 8 | 9 | { 10 | 11 | GLbyte Type[4]; // either 'IWAD' or 'PWAD' 12 | 13 | GLuint NumLumps; 14 | 15 | GLuint DirOffset; 16 | 17 | } WADHEAD; 18 | 19 | 20 | 21 | typedef struct DIRENT 22 | 23 | { 24 | 25 | GLuint Offset; 26 | 27 | GLuint Length; 28 | 29 | GLbyte Name[8]; 30 | 31 | } DIRENT; 32 | 33 | 34 | 35 | 36 | 37 | FILE *Wad; 38 | 39 | WADHEAD WadHead; 40 | 41 | GLuint OrigPos; 42 | 43 | 44 | 45 | FILE *TestOpenWad(char *WadName) 46 | 47 | { 48 | 49 | Wad = fopen(WadName, "rb"); 50 | 51 | fread(&WadHead, sizeof(WADHEAD), 1, Wad); 52 | 53 | fseek(Wad, WadHead.DirOffset, SEEK_SET); 54 | 55 | OrigPos = WadHead.DirOffset; 56 | 57 | return Wad; 58 | 59 | } 60 | 61 | 62 | 63 | 64 | 65 | GLboolean TestLocateLump(char *LumpName) 66 | 67 | { 68 | 69 | DIRENT DirEnt; 70 | 71 | GLboolean NotFound = true; 72 | 73 | GLuint DirsRead = 0; 74 | 75 | 76 | 77 | 78 | 79 | fseek(Wad, OrigPos, SEEK_SET); 80 | 81 | 82 | 83 | while (NotFound && DirsRead < WadHead.NumLumps) { 84 | 85 | fread(&DirEnt, sizeof(DIRENT), 1, Wad); 86 | 87 | if (!strnicmp(DirEnt.Name, LumpName, 8)) { 88 | 89 | fseek(Wad, DirEnt.Offset, SEEK_SET); 90 | 91 | return true; 92 | 93 | } 94 | 95 | DirsRead++; 96 | 97 | } 98 | 99 | 100 | 101 | return false; 102 | 103 | } 104 | 105 | 106 | 107 | 108 | 109 | GLvoid TestCloseWad() 110 | 111 | { 112 | 113 | if (Wad) 114 | 115 | fclose(Wad); 116 | 117 | Wad = NULL; 118 | 119 | } 120 | 121 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DevIL 2 | ===== 3 | 4 | Developer's Image Library (DevIL) is a cross-platform image library utilizing a simple syntax to load, save, convert, manipulate, filter, and display a variety of images with ease. It is highly portable and has been ported to several platforms. 5 | --------------------------------------------------------------------------------