Commit Graph

88 Commits

Author SHA1 Message Date
Pavel Krajcevski
fb7805d875 Bring CMake integration up to date.
- Add a way to generate a FasTCConfig.cmake file so that you can
use cmake without having to install it.
- Add install paths for users that want to install it.
- Hide all public headers in FasTC/ qualified include path, this way we
know what files are public directly from the source. Also, it lets us
define build-tree and install-tree include directories a lot easier.
2014-11-18 17:07:26 -05:00
Pavel Krajcevski
072b74f7b3 Flatten indices properly 2014-11-05 18:04:40 -05:00
Pavel Krajcevski
a303bd4844 Some small aesthetic fixes 2014-11-05 17:24:28 -05:00
Pavel Krajcevski
ff1181e12a Lots of QOL fixes:
1. Avoid the need for multiple-of-four input textures. If you don't pass
a multiple of four then we'll do our best to pad the image.

2. Fix a bunch of bugs where we didn't accurately report why we couldn't
compress a texture and just crashed instead.

3. Some code refactoring to make certain if statements more readable.
2014-11-03 18:24:19 -05:00
Pavel Krajcevski
6f82ab8941 Don't crash when you can't open a file that doesn't exist 2014-11-03 15:57:34 -05:00
Pavel Krajcevski
e4919e75e6 Add bracket guards around ifs 2014-10-31 17:38:22 -04:00
Pavel Krajcevski
f47c880198 Make sure to use the proper delete 2014-04-22 19:28:49 -04:00
Pavel Krajcevski
8660b24ffe Fix multithreaded npot bug.
There was a bug where certain blocks were not being written due to
improper iterating over non power-of-two textures depending on the
thread that got split across a newline of blocks. This should now
be fixed.

The offending command line arguments looked something like:

CLTool/tc -q 0 -t 32 -j 32 /path/to/npot-texture.png
2014-04-10 13:39:04 -04:00
Pavel Krajcevski
ea1c61913a Small patch to fix loading of non-multiple-of-four images 2014-04-02 13:59:08 -04:00
Pavel Krajcevski
640b098af7 Small formatting change 2014-04-02 13:57:17 -04:00
Pavel Krajcevski
f951dda449 Fix bug caught by clang 2014-03-23 19:52:51 -04:00
Pavel Krajcevski
aba347778e Fix a few compiler warnings 2014-03-23 17:48:17 -04:00
Pavel Krajcevski
0cac0c5c0a Add .astc file loader 2014-03-12 19:26:39 -04:00
Pavel Krajcevski
6738df64f4 Add ASTC values to KTX loader 2014-03-12 18:43:48 -04:00
Pavel Krajcevski
7ee0df9a5a Add 2bpp PVRTC compression format 2014-03-12 14:01:31 -04:00
Pavel Krajcevski
0a4726bfe2 Merge branch 'master' into DecompressASTC 2014-03-12 13:29:17 -04:00
Pavel Krajcevski
a51e63f5c0 Fix some KTX IO bugs 2014-03-12 13:18:43 -04:00
Pavel Krajcevski
865239542a Cast our strlens to uint32 to avoid compiler warnings. 2014-03-12 12:13:16 -04:00
Pavel Krajcevski
479ba8e76d Fix a bunch of MSVC compiler warnings and errors.
Most notably, we need to actually fix a bug in MSVC that doesn't know how to properly instantiate
enums in partial template specialization. There are more details outlined here:

http://stackoverflow.com/questions/15466594/why-does-msvc-fail-to-compile-this-template-function

The fix in this commit closes #10

Also in this commit is a hacky way to allow GL defines. Apparently "LoadImage" is defined as a
macro even with WIN32_LEAN_AND_MEAN. This means that we have to #undef the code that includes
it, meaning that we also need to make sure not to actually mix GLDefines.h with any file that needs
to use the functions from Windows.h
2014-03-12 02:43:09 -04:00
Pavel Krajcevski
ebfd8f8f81 Override LoadImage for ktx files 2014-03-11 18:27:37 -04:00
Pavel Krajcevski
41a7abcdbb Let the image loader return the actual image pointer instead of having the data be constructed 2014-03-11 18:04:26 -04:00
Pavel Krajcevski
8acd89cbc5 Add virtual destructor 2014-03-11 17:26:55 -04:00
Pavel Krajcevski
272e753006 Add OpenGL defines for ASTC 2014-03-11 17:26:32 -04:00
Pavel Krajcevski
a530ae937e Fix a few bugs. 2014-02-04 12:55:47 -05:00
Pavel Krajcevski
bf7ef5cd9e Merge branch 'master' of git.cs.unc.edu:pavel/FasTC 2014-01-29 14:38:09 -05:00
Pavel Krajcevski
211bc5aece Add PVRTC support to KTX writer 2014-01-29 14:37:19 -05:00
Pavel Krajcevski
4601cf00c7 Small bugfix 2014-01-29 14:37:04 -05:00
Pavel Krajcevski
aa7e73c4b3 Add growable buffer to support dynamic ktx file sizes. 2014-01-29 14:04:08 -05:00
Pavel Krajcevski
95ec307380 Fix delete to delete [] 2014-01-29 14:03:34 -05:00
Pavel Krajcevski
1b5b8c3900 Add hooks to support filenames with .ktx extension 2014-01-24 14:00:14 -05:00
Pavel Krajcevski
552b8440b1 Add KTX writer. 2014-01-23 18:24:21 -05:00
Pavel Krajcevski
95e86cbf0d Add KTX loaders 2014-01-23 14:43:05 -05:00
Pavel Krajcevski
64747eb828 Constify 2014-01-23 14:42:28 -05:00
Pavel Krajcevski
955fe204ad Add OpenGL discovery to read/write KTX files 2014-01-23 14:33:37 -05:00
Pavel Krajcevski
f64c2d57a2 Merge branch 'master' into MinGW 2014-01-21 16:25:49 -05:00
Pavel Krajcevski
5d93d4d7e9 Add option to flip image along Y-axis to accomodate different image formats. 2013-11-19 15:01:54 -05:00
Pavel Krajcevski
baced12633 Add tga filename detection. 2013-11-19 14:56:21 -05:00
Pavel Krajcevski
325b04847e Remove some compiler cruft with our TGA loader. 2013-11-19 14:56:10 -05:00
Pavel Krajcevski
e780560d1e Move default bit depth definitions to abstracted pixel buffer loading function. 2013-11-19 14:55:41 -05:00
Pavel Krajcevski
b6fde9c3f5 Add TGA image loaders 2013-11-19 14:22:26 -05:00
Pavel Krajcevski
cf4868fdb1 Abstract away generic function to read from 32-bit pixel buffer. 2013-11-19 14:21:54 -05:00
Pavel Krajcevski
eeb4a995fc Hold on to the raw file data once its been loaded. 2013-11-19 14:07:03 -05:00
Pavel Krajcevski
ba202c6ce9 Fix assert to not cause warning in release and do some sane things... 2013-11-19 12:00:12 -05:00
Pavel Krajcevski
9a7813b732 Make sure MSVC is still OK with our MINGW changes 2013-11-11 18:54:29 -05:00
Pavel Krajcevski
6dd43cde4f Fix compiler problems on MinGW 2013-11-11 18:45:09 -05:00
Pavel Krajcevski
8e76d149ba Remove a bunch of code that assumes that we get our pixel data in block stream order... 2013-11-06 18:23:19 -05:00
Pavel Krajcevski
0ecd678a58 Support loading paletted PNG images. 2013-10-14 20:56:55 -04:00
Pavel Krajcevski
e2be925265 Fix bug where we were writing ARGB instead of RGBA, again a victim of stupid block stream ordering. 2013-10-11 20:53:22 -04:00
Pavel Krajcevski
4baf2ce311 Combine image functionality from PVRTCEncoder into Base library. 2013-10-04 18:35:18 -04:00
Pavel Krajcevski
baab69dc99 Fix some MSVC compiler snafus 2013-09-28 22:21:31 -04:00