textureviewer

所属分类:图形图像处理
开发工具:C++
文件大小:1605KB
下载次数:0
上传日期:2020-03-03 21:54:47
上 传 者sh-1993
说明:  用于加载纹理的Qt API的PoC
(A PoC of the Qt API for loading textures)

文件列表:
.travis.yml (497, 2020-03-04)
LICENSE (7651, 2020-03-04)
doc (0, 2020-03-04)
doc\src (0, 2020-03-04)
doc\src\mainpage.dox (512, 2020-03-04)
doc\src\snippets (0, 2020-03-04)
doc\src\snippets\texture (0, 2020-03-04)
doc\src\snippets\texture\texture.cpp (865, 2020-03-04)
include (0, 2020-03-04)
include\Expected (357, 2020-03-04)
include\HalfFloat (230, 2020-03-04)
include\ObserverPointer (503, 2020-03-04)
include\OptionalType (564, 2020-03-04)
include\TextureLib (0, 2020-03-04)
include\TextureLib\ColorVariant (52, 2020-03-04)
include\TextureLib\Rgba128 (49, 2020-03-04)
include\TextureLib\Rgba32Signed (49, 2020-03-04)
include\TextureLib\Rgba64Float (49, 2020-03-04)
include\TextureLib\Rgba64Signed (49, 2020-03-04)
include\TextureLib\RgbaGeneric (49, 2020-03-04)
include\TextureLib\RgbaTypes (49, 2020-03-04)
include\TextureLib\Texture (47, 2020-03-04)
include\TextureLib\TextureFormat (53, 2020-03-04)
include\TextureLib\TextureFormatInfo (57, 2020-03-04)
include\TextureLib\TextureIO (49, 2020-03-04)
include\TextureLib\TextureIOHandler (56, 2020-03-04)
include\TextureLib\TextureIOHandlerPlugin (62, 2020-03-04)
include\TextureLib\TextureIOResult (55, 2020-03-04)
include\TextureLib\TextureModel (52, 2020-03-04)
include\TextureLib\Utils (45, 2020-03-04)
include\TextureLib\private (0, 2020-03-04)
include\TextureLib\private\TextureIOHandlerDatabase (67, 2020-03-04)
include\TextureViewCoreLib (0, 2020-03-04)
include\TextureViewCoreLib\TextureControl (59, 2020-03-04)
include\TextureViewCoreLib\TextureDocument (60, 2020-03-04)
include\TextureViewCoreLib\TextureFormatsModel (64, 2020-03-04)
include\TextureViewCoreLib\TextureItemModel (61, 2020-03-04)
... ...

# Texture Viewer Currently, there is no viewer program itself, however, simple texture can be loaded using a [bind_texture](https://github.com/ABBAPOH/textureviewer/blob/master/tests/manual/bind_texture) test. Also, there is also a [texturetool](https://github.com/ABBAPOH/textureviewer/blob/master/src/apps/texturetool) that can convert between texture formats. However, it's capabilities are very limited at the moment - only saving DDS and PKM is supported and no other formats other than textures (i.e. png, jpg are not supported for now). ## License This program is distributed under the [GNU LGPL](https://github.com/ABBAPOH/textureviewer/blob/master/LICENSE) ## Formats Below is the list of formats supported by the API. * [DDS](https://github.com/ABBAPOH/textureviewer/blob/master/src/plugins/dds/FORMAT.md) (Direct Draw Surface) * [PKM](https://github.com/ABBAPOH/textureviewer/blob/master/src/plugins/pkm/FORMAT.md) (PKM Texture Format) * [KTX](https://github.com/ABBAPOH/textureviewer/blob/master/src/plugins/ktx/FORMAT.md) (Khronos Texture) * [VTF](https://github.com/ABBAPOH/textureviewer/blob/master/src/plugins/vtf/FORMAT.md) (Valve Texture Format) ## Building from source ### Build requirements Windows - Microsoft Visual Studio 17 or higher - Qt 5.11.0 (maybe earlier versions will work too) - Qbs 1.11.1 (packed with Qt Creator) Mac OS - XCode 9.4.1 or higher - Qt 5.11.0 (maybe earlier versions will work too) - Qbs 1.11.1 (packed with Qt Creator) Linux - opengl headers - GCC-6/G++-6 or higher - Qt 5.11.0 (maybe earlier versions will work too) - Qbs 1.11.1 On debian-based systems the required packages can be installed using command apt-get install gcc-6 g++6 libgl1-mesa-dev ### Building in Qt Creator Open the [textureviewer.qbs](https://github.com/ABBAPOH/textureviewer/blob/master/./textureviewer.qbs) file in a Qt Creator and press "Build" ### Building from command line #### Configuring QBS First, you need to configure QBS. Skip this step if you already did that for an other project or if you are already using qbs and it is properly configured. The first step is to setup the compilers. ```bash $ qbs setup-toolchains --detect Trying to detect gcc... Profile 'gcc' created for '/usr/bin/gcc'. Trying to detect clang... Profile 'clang' created for '/usr/bin/clang'. ... ``` Second step is to configure a Qt version that you will use for building. Specify the correct path to qmake if you have a Qt installed in a different location (i.e. on Mac and Windows) ```bash $ qbs setup-qt /usr/bin/qmake myqt Creating profile 'myqt'. WARNING: You need to set up toolchain information before you can use this Qt version for building. Consider setting one of these profiles as this profile's base profile: ``` If you get the warning above, you should manually setup the compiler that will be used for this Qt version (the warning is shown if multiple toolchains found) ```bash $ qbs config profiles.myqt.baseProfile ``` The profile name can be chosen after calling the following command (choose one profile from the list without "profiles." prefix and the profile properties after the name, i.e. simply "clang" or "gcc" in the following example): ```bash $ qbs config --list profiles profiles.clang.cpp.toolchainInstallPath: "/usr/bin" profiles.clang.qbs.toolchain: ["clang", "llvm", "gcc"] profiles.gcc.cpp.toolchainInstallPath: "/usr/bin" profiles.gcc.qbs.toolchain: ["gcc"] ... ``` Third step is to tell QBS which profile it should use by default. ```bash $ qbs config defaultProfile myqt ``` Otherwise, you will get strange warning during the compilation saying "Dependency 'Qt.core' not found for product \'\'". You also can manually specify profile when building. For more details see Qt documentation how to - [configure qbs](https://github.com/ABBAPOH/textureviewer/blob/master/http://doc.qt.io/qbs/configuring.html) - [configure a Qt version](https://github.com/ABBAPOH/textureviewer/blob/master/http://doc.qt.io/qbs/qt-versions.html) #### Building TextureViewer ```bash $ cd textureviewer/ $ mkdir build $ cd build/ $ qbs build -f ../textureviewer.qbs qbs.defaultBuildVariant:release $ qbs install -f ../textureviewer.qbs qbs.defaultBuildVariant:release --install-root ``` ### Installing mimetypes On Linux OS, QMimeDatabase uses system information about mimetypes, so additional mimetypes should be installed in the system. This is done using linux_mimetypes.sh script (run as root): ```bash $ sudo ./linux_mimetypes.sh Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' $ ```

近期下载者

相关文件


收藏者