Skip to content

Commit

Permalink
Add initial ZFP compression scheme(W.I.P.).
Browse files Browse the repository at this point in the history
  • Loading branch information
syoyo committed May 3, 2016
1 parent 2303114 commit 79ef837
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 52 deletions.
2 changes: 1 addition & 1 deletion config-msvc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exe = "test.exe"
exe = "test_tinyexr.exe"

# "gnu" or "msvc" are provided as predefined toolchain
toolchain = "msvc"
Expand Down
45 changes: 45 additions & 0 deletions premake4.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
newoption {
trigger = "with-zfp",
description = "Build with ZFP support."
}

sources = {
"tinyexr.h",
"test_tinyexr.cc",
}

zfp_sources = {
"./deps/ZFP/src/*.c"
}

-- premake4.lua
solution "TinyEXRSolution"
configurations { "Release", "Debug" }

if (os.is("windows")) then
platforms { "x32", "x64" }
else
platforms { "native", "x32", "x64" }
end

if _OPTIONS["with-zfp"] then
includedirs { "./deps/ZFP/inc" }
defines { "TINYEXR_USE_ZFP=1" }
files { zfp_sources }
end

-- A project defines one build target
project "tinyexrtest"
kind "ConsoleApp"
language "C++"
files { sources }

configuration "Debug"
defines { "DEBUG" } -- -DDEBUG
flags { "Symbols" }
targetname "test_tinyexr_debug"

configuration "Release"
-- defines { "NDEBUG" } -- -NDEBUG
flags { "Symbols", "Optimize" }
targetname "test_tinyexr"
2 changes: 1 addition & 1 deletion test_tinyexr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ main(int argc, char** argv)
for (size_t i = 0; i < static_cast<size_t>(num_exr_headers); i++) {
const EXRHeader &exr_header = *(exr_headers[i]);

printf("Part: %lu\n", i);
printf("Part: %lu\n", static_cast<unsigned long>(i));

printf("dataWindow = %d, %d, %d, %d\n",
exr_header.data_window[0],
Expand Down
Loading

0 comments on commit 79ef837

Please sign in to comment.