Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cginternals/glraw
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3
Choose a base ref
...
head repository: cginternals/glraw
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 2,531 additions and 1,820 deletions.
  1. +8 −2 .gitignore
  2. +12 −2 AUTHORS
  3. +124 −134 CMakeLists.txt
  4. +1 −1 LICENSE
  5. +15 −3 README.md
  6. +148 −0 cmake/CompileOptions.cmake
  7. +6 −0 cmake/ComponentInstall.cmake
  8. +46 −92 cmake/Custom.cmake
  9. +125 −116 cmake/GetGitRevisionDescription.cmake
  10. +37 −37 cmake/GetGitRevisionDescription.cmake.in
  11. +0 −23 cmake/GitRevision.cmake
  12. +0 −56 cmake/PlatformLinuxGCC.cmake
  13. +0 −35 cmake/PlatformMacOS.cmake
  14. +0 −52 cmake/PlatformWindowsGCC.cmake
  15. +0 −105 cmake/PlatformWindowsMSVC.cmake
  16. +19 −0 cmake/RuntimeDependencies.cmake
  17. +126 −0 configure
  18. +30 −0 deploy/CMakeLists.txt
  19. 0 {packages → deploy/files}/GLRawFile.cpp
  20. 0 {packages → deploy/files}/GLRawFile.h
  21. 0 {packages → deploy/files}/RawFile.cpp
  22. 0 {packages → deploy/files}/RawFile.h
  23. 0 {packages → deploy/files}/glraw.rb.template
  24. 0 {packages → deploy/files}/qt.conf
  25. BIN deploy/images/nsis.bmp
  26. BIN deploy/images/win.bmp
  27. +251 −0 deploy/packages/pack-glraw.cmake
  28. +11 −37 docs/CMakeLists.txt
  29. +71 −0 docs/api-docs/CMakeLists.txt
  30. +10 −0 docs/api-docs/bootstrap.min.css
  31. +12 −0 docs/api-docs/bootstrap.min.js
  32. +125 −0 docs/api-docs/doxy-boot.js
  33. +182 −156 docs/{ → api-docs}/doxyfile.in
  34. +38 −0 docs/api-docs/doxygen.css
  35. +26 −0 docs/api-docs/footer.html
  36. +65 −0 docs/api-docs/header.html
  37. +3 −0 docs/api-docs/include/mainpage.html
  38. +4 −0 docs/api-docs/mainpage.h
  39. +8 −0 docs/api-docs/namespacedocumentation.h
  40. +0 −1 docs/extra.css
  41. +0 −194 docs/layout.xml
  42. BIN docs/logo.png
  43. 0 docs/namespacedocumentation.h
  44. +28 −112 glraw-config.cmake
  45. BIN glraw-logo.png
  46. +28 −0 glraw-logo.svg
  47. +0 −10 packages/CMakeLists.txt
  48. BIN packages/glraw-logo.png
  49. +0 −10 packages/glraw-logo.svg
  50. +0 −193 packages/pack-glraw.cmake
  51. +17 −27 source/CMakeLists.txt
  52. +1 −1 source/glraw-cmd/Application.cpp
  53. +29 −7 source/glraw-cmd/Builder.cpp
  54. +1 −0 source/glraw-cmd/Builder.h
  55. +102 −60 source/glraw-cmd/CMakeLists.txt
  56. +0 −16 source/glraw-version.h.in
  57. +1 −1 source/glraw-viewer/Application.cpp
  58. +100 −64 source/glraw-viewer/CMakeLists.txt
  59. +133 −48 source/glraw-viewer/Canvas.cpp
  60. +12 −6 source/glraw-viewer/Canvas.h
  61. +2 −1 source/glraw-viewer/DropFix.cpp
  62. +1 −1 source/glraw-viewer/Viewer.h
  63. +167 −70 source/glraw/CMakeLists.txt
  64. +1 −1 source/glraw/include/glraw/AbstractConverter.h
  65. +1 −1 source/glraw/include/glraw/AssetInformation.h
  66. +1 −1 source/glraw/include/glraw/Canvas.h
  67. +1 −1 source/glraw/include/glraw/CompressionConverter.h
  68. +4 −2 source/glraw/include/glraw/ConvertManager.h
  69. +1 −0 source/glraw/include/glraw/Converter.h
  70. +83 −0 source/glraw/include/glraw/FileNameSuffix.h
  71. +17 −13 source/glraw/include/glraw/FileWriter.h
  72. +2 −2 source/glraw/include/glraw/ImageEditorInterface.h
  73. +1 −0 source/glraw/include/glraw/MirrorEditor.h
  74. +10 −9 source/glraw/include/glraw/RawFile.h
  75. +0 −1 source/glraw/include/glraw/S3TCExtensions.h
  76. +1 −1 source/glraw/include/glraw/ScaleEditor.h
  77. +1 −0 source/glraw/source/AbstractConverter.cpp
  78. +1 −0 source/glraw/source/AssetInformation.cpp
  79. +1 −0 source/glraw/source/Canvas.cpp
  80. +1 −0 source/glraw/source/CompressionConverter.cpp
  81. +1 −0 source/glraw/source/ConvertManager.cpp
  82. +1 −0 source/glraw/source/Converter.cpp
  83. +189 −0 source/glraw/source/FileNameSuffix.cpp
  84. +50 −86 source/glraw/source/FileWriter.cpp
  85. +2 −1 source/glraw/source/MirrorEditor.cpp
  86. +19 −15 source/glraw/source/RawFile.cpp
  87. +1 −0 source/glraw/source/ScaleEditor.cpp
  88. +1 −0 source/glraw/source/UniformParser.h
  89. +15 −0 source/version.h.in
  90. +0 −13 version.h.in
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -17,12 +17,18 @@
*.glraw

/build
/build-debug
/_configure.bat
/_open-project.bat
/_start-cmake-gui.bat
/_start-console.bat

# QtCreator
# Project files
CMakeLists.txt.user
CMakeLists.txt.user.*
*.autosave
*.autosave
*.sublime-project
*.sublime-workspace

# Local config
.localconfig
14 changes: 12 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
Daniel Limberger <daniel.limberger@hpi.uni-potsdam.de>, <cg.costume@gmail.com>
Max Jendruk <max.jendruk@student.hpi.uni-potsdam.de>

Daniel Limberger <daniel.limberger@hpi.de>

Special thanks to

Willy Scheibel <willy.scheibel@hpi.de>
Stefan Buschmann <buschmann@cginternals.com>
Max Jendruk <max.jendruk@student.hpi.de>
Roland Lux


Thanks to all Contributors
258 changes: 124 additions & 134 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,177 +1,167 @@

# Test for minimum required CMake version 2.8.12
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
#
# CMake options
#

# CMake version
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)

# Include cmake modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(GenerateExportHeader)
include(ExternalProject)
include(cmake/GetGitRevisionDescription.cmake)
include(cmake/Custom.cmake)

# Set policies
set_policy(CMP0028 NEW) # ENABLE CMP0028: Double colon in target name means ALIAS or IMPORTED target.
set_policy(CMP0054 NEW) # ENABLE CMP0054: Only interpret if() arguments as variables or keywords when unquoted.
set_policy(CMP0042 NEW) # ENABLE CMP0042: MACOSX_RPATH is enabled by default.
set_policy(CMP0063 NEW) # ENABLE CMP0063: Honor visibility properties for all target types.


#
#
# Project description and (meta) information
#
#

# Get git revision
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV)

# Meta information about the project
set(META_PROJECT_NAME "glraw")
set(META_PROJECT_DESCRIPTION "Converts images to OpenGL compatible raw files")
set(META_AUTHOR_ORGANIZATION "CG Internals GmbH")
set(META_AUTHOR_DOMAIN "https://github.com/cginternals/cmake-init/")
set(META_AUTHOR_MAINTAINER "opensource@cginternals.com")
set(META_VERSION_MAJOR "1")
set(META_VERSION_MINOR "0")
set(META_VERSION_PATCH "3")
set(META_VERSION_PATCH "4")
set(META_VERSION_REVISION "${GIT_REV}")
set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}")
set(META_AUTHOR_ORGANIZATION "hpicgs group")
set(META_AUTHOR_DOMAIN "https://github.com/hpicgs/glraw")
set(META_AUTHOR_MAINTAINER "daniel.limberger@hpi.de")

string(TOUPPER ${META_PROJECT_NAME} META_PROJECT_NAME_UPPER)


# Limit supported configuration types
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Limited Configs" FORCE)

# Set project name and type (C/C++)
project(${META_PROJECT_NAME} C CXX)

set(META_NAME_VERSION "${META_PROJECT_NAME} v${META_VERSION} (${META_VERSION_REVISION})")



#
# Configuration options
#

option(OPTION_PORTABLE_INSTALL "Install into a self-contained directory." OFF)
option(OPTION_BUILD_STATIC "Build static libraries." OFF)
option(OPTION_BUILD_TESTS "Build tests (if gmock and gtest are found)." ON)


if(OPTION_BUILD_STATIC)
set(BUILD_SHARED_LIBS OFF)
message("Note: ${META_PROJECT_NAME_UPPER}_STATIC needs to be defined for static linking.")
else()
set(BUILD_SHARED_LIBS ON)
endif()


#
# CMake configuration:
#
# Project configuration options
#

# Append the path to the custom cmake modules from this project to the CMAKE_MODULE_PATH.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Project options
option(BUILD_SHARED_LIBS "Build shared instead of static libraries." ON)
option(OPTION_SELF_CONTAINED "Create a self-contained install with all dependencies." OFF)
option(OPTION_BUILD_TESTS "Build tests." ON)
option(OPTION_BUILD_DOCS "Build documentation." OFF)

# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

#
# Declare project
#

# Generate folders for IDE targets (e.g., VisualStudio solutions)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

# Put projects in root folder by default
set(IDE_FOLDER "")

# Include custom cmake functions
include(cmake/Custom.cmake)
include(cmake/GitRevision.cmake)




#
# Platform and architecture setup
#
# Declare project
project(${META_PROJECT_NAME} C CXX)

# Architecture (32/64 bit)
set(X64 OFF)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(X64 ON)
endif()
# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})

# Setup platform specifics (compile flags, etc., ...)
# Create version file
file(WRITE "${PROJECT_BINARY_DIR}/VERSION" "${META_NAME_VERSION}")

# This policy was introduced in 3.0.0 and does not allow for COMPILER_DEFINITIONS_<Config>,
# anymore, but instead requires generator expressions like $<CONFIG:Debug> ...
# For now the current compile-flag, -definitions, and linker-flags setup shall remain as is.
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()

if(MSVC)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/PlatformWindowsMSVC.cmake)
elseif(WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/PlatformWindowsGCC.cmake)
elseif(APPLE)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/PlatformMacOS.cmake)
elseif(UNIX)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/PlatformLinuxGCC.cmake)
else()
message(WARNING "Unsupported platform/compiler combination")
endif()

#
# Compiler settings and options
#

include(cmake/CompileOptions.cmake)


#
#
# Deployment/installation setup
#
#

# Get project name
set(project ${META_PROJECT_NAME})
if(WIN32)
set(INSTALL_ROOT ".") # C:\Programme\<project>
set(INSTALL_DATA "bin") # C:\Programme\<project>
set(INSTALL_BIN "bin") # C:\Programme\<project>
set(INSTALL_SHARED ".") # C:\Programme\<project>
set(INSTALL_LIB "lib") # C:\Programme\<project>\lib
set(INSTALL_INCLUDE "include") # C:\Programme\<project>\include
set(INSTALL_DOC "doc") # C:\Programme\<project>\doc
set(INSTALL_SHORTCUTS ".") # Not available under Windows
set(INSTALL_ICONS ".") # Not available under Windows
set(INSTALL_INIT ".") # Not available under Windows

# Check for system dir install
set(SYSTEM_DIR_INSTALL FALSE)
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
set(SYSTEM_DIR_INSTALL TRUE)
endif()

# Installation paths
if(UNIX AND SYSTEM_DIR_INSTALL)
# Install into the system (/usr/bin or /usr/local/bin)
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_BIN "bin") # /usr/[local]/bin
set(INSTALL_SHARED "lib") # /usr/[local]/lib
set(INSTALL_LIB "lib") # /usr/[local]/lib
set(INSTALL_INCLUDE "include") # /usr/[local]/include
set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/<project>
set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications
set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps
set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts)
else()
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_BIN "bin") # /usr/[local]/bin
set(INSTALL_SHARED "lib") # /usr/[local]/lib
set(INSTALL_LIB "lib") # /usr/[local]/lib
set(INSTALL_INCLUDE "include") # /usr/[local]/include
set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/<project>
set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications
set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps
set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts)

# Adjust target paths for portable installs
if(OPTION_PORTABLE_INSTALL)
# Put binaries in root directory and keep data directory name
set(INSTALL_ROOT ".") # /<INSTALL_PREFIX>
set(INSTALL_DATA ".") # /<INSTALL_PREFIX>
set(INSTALL_BIN ".") # /<INSTALL_PREFIX>

# We have to change the RPATH of binaries to achieve a usable local install.
# [TODO] For binaries, "$ORIGIN/lib" is right, so that libraries are found in ./lib.
# However, I have not yet tested what happens when libraries use other libraries.
# In that case, they might need the rpath $ORIGIN instead ...
set(CMAKE_SKIP_BUILD_RPATH FALSE) # Use automatic rpath for build
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # Use specific rpath for INSTALL
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) # NO automatic rpath for INSTALL
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") # Libraries are relative to binary
# Install into local directory
set(INSTALL_ROOT ".") # ./
set(INSTALL_CMAKE "cmake") # ./cmake
set(INSTALL_EXAMPLES ".") # ./
set(INSTALL_DATA ".") # ./
set(INSTALL_BIN ".") # ./
set(INSTALL_SHARED "lib") # ./lib
set(INSTALL_LIB "lib") # ./lib
set(INSTALL_INCLUDE "include") # ./include
set(INSTALL_DOC "doc") # ./doc
set(INSTALL_SHORTCUTS "misc") # ./misc
set(INSTALL_ICONS "misc") # ./misc
set(INSTALL_INIT "misc") # ./misc
endif()

# Set runtime path
set(CMAKE_SKIP_BUILD_RPATH FALSE) # Add absolute path to all dependencies for BUILD
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # Use CMAKE_INSTALL_RPATH for INSTALL
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) # Do NOT add path to dependencies for INSTALL

if(NOT SYSTEM_DIR_INSTALL)
# Find libraries relative to binary
if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/../../../${INSTALL_LIB}")
else()
set(CMAKE_INSTALL_RPATH "$ORIGIN/${INSTALL_LIB}")
endif()
endif()

# Install the project meta files
install(FILES glraw-config.cmake DESTINATION ${INSTALL_ROOT})
install(FILES AUTHORS DESTINATION ${INSTALL_ROOT})
install(FILES LICENSE DESTINATION ${INSTALL_ROOT})

# Install the data directory including the data files it contains.
install(DIRECTORY ${CMAKE_SOURCE_DIR}/data DESTINATION ${INSTALL_DATA})
#
# Project modules
#

add_subdirectory(source)
add_subdirectory(docs)
add_subdirectory(deploy)

# Add a revision file containing the git-head tag for cpack and install. The function
# "create_revision_file (...)" is defined in cmake/GitRevision.cmake
create_revision_file(${CMAKE_BINARY_DIR}/revision ${INSTALL_ROOT})

#
# Deployment (global project files)
#

# Install version file
install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime)

# Install cmake find script for the project
install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev)

#
# Include subdirectories that contain project sources, documentation files, and packaging scripts
#
# Install the project meta files
install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
install(FILES LICENSE DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
install(FILES README.md DESTINATION ${INSTALL_ROOT} COMPONENT runtime)

add_subdirectory(source)
add_subdirectory(docs)
add_subdirectory(packages)
# Install runtime data
install(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION ${INSTALL_DATA} COMPONENT runtime)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Copyright (c) 2012-2014 Computer Graphics Systems Group at the Hasso-Plattner-Institute, Germany.
Copyright (c) 2012-2016 Computer Graphics Systems Group at the Hasso-Plattner-Institute, Germany.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
<!--![glraw](https://raw.github.com/hpicgs/glraw/master/packages/glraw-logo.png)-->
![glraw logo](glraw-logo.png "glraw")

# glraw
*glraw* is an utility that converts Qt-supported images into an OpenGL-compatible raw format. *glraw* reduces the process of loading textures at run-time to a minimum: A file-content dump into GPU memory. *glraw* is a cross-platform library licenced under the [MIT license](http://opensource.org/licenses/MIT).

*glraw* is an utility that converts Qt-supported images into an OpenGL-compatible raw format. *glraw* reduces the process of loading textures at run-time to a minimum: A file-content dump into GPU memory.
The latest release is [glraw-1.0.3](https://github.com/hpicgs/glraw/releases/tag/v1.0.3).

## Project Health (master)

| Service | System | Compiler | Targets | Status |
| ------- | ------ | -------- | ------- | ------ |
| Jenkins | Ubuntu 14.04 | GCC 4.8 | all | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-linux-gcc4.8)](http://jenkins.hpi3d.de/job/glraw-linux-gcc4.8)|
| Jenkins | Ubuntu 14.04 | GCC 4.9 | all | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-linux-gcc4.9)](http://jenkins.hpi3d.de/job/glraw-linux-gcc4.9)|
| Jenkins | Ubuntu 14.04 | GCC 5.3 | all | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-linux-gcc5.3)](http://jenkins.hpi3d.de/job/glraw-linux-gcc5.3)|
| Jenkins | Ubuntu 14.04 | Clang 3.5 | all | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-linux-clang3.5)](http://jenkins.hpi3d.de/job/glraw-linux-clang3.5) |
| Jenkins | OS X 10.10 | Clang 3.5 | - | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-osx-clang3.5)](http://jenkins.hpi3d.de/job/glraw-osx-clang3.5) |
| Jenkins | Windows 8.1 | MSVC 2013 Update 5 | all, install | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-windows-msvc2013)](http://jenkins.hpi3d.de/job/glraw-windows-msvc2013) |
| Jenkins | Windows 8.1 | MSVC 2015 Update 1 | all, install | [![Build Status](http://jenkins.hpi3d.de/buildStatus/icon?job=glraw-windows-msvc2015)](http://jenkins.hpi3d.de/job/glraw-windows-msvc2015) |

## Features

Loading