mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
PVRTC: Move compress func to modules/pvr, drop obsolete PVRTexTool code
The code we had for PVRTexTool doesn't work as it's not compatible with current
PVRTexTool CLI options, and likely hasn't been for years.
Instead, we have our own vendored pvrtccompressor thirdparty library which all
users have thus de-facto been using. This commit moves the compress code to
`modules/pvr` where it belongs.
There's no proper compress function for PVRTC 2-bit format, that's a bug that
will need to be fixed (currently it's compressed as 4-bit format even if you
use Image::FORMAT_PVRTC2).
Fixes #28669.
(cherry picked from commit 1a31274855)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*************************************************************************/
|
||||
/* image_etc.cpp */
|
||||
/* image_compress_etc.cpp */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
@@ -28,14 +28,16 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#include "image_etc.h"
|
||||
#include "Etc.h"
|
||||
#include "EtcFilter.h"
|
||||
#include "image_compress_etc.h"
|
||||
|
||||
#include "core/image.h"
|
||||
#include "core/os/copymem.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/print_string.h"
|
||||
|
||||
#include <Etc.h>
|
||||
#include <EtcFilter.h>
|
||||
|
||||
static Image::Format _get_etc2_mode(Image::DetectChannels format) {
|
||||
switch (format) {
|
||||
case Image::DETECTED_R:
|
||||
@@ -1,5 +1,5 @@
|
||||
/*************************************************************************/
|
||||
/* image_etc.h */
|
||||
/* image_compress_etc.h */
|
||||
/*************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
@@ -28,9 +28,9 @@
|
||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef IMAGE_ETC1_H
|
||||
#define IMAGE_ETC1_H
|
||||
#ifndef IMAGE_COMPRESS_ETC_H
|
||||
#define IMAGE_COMPRESS_ETC_H
|
||||
|
||||
void _register_etc_compress_func();
|
||||
|
||||
#endif // IMAGE_ETC_H
|
||||
#endif // IMAGE_COMPRESS_ETC_H
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "register_types.h"
|
||||
|
||||
#include "image_etc.h"
|
||||
#include "image_compress_etc.h"
|
||||
#include "texture_loader_pkm.h"
|
||||
|
||||
static Ref<ResourceFormatPKM> resource_loader_pkm;
|
||||
|
||||
Reference in New Issue
Block a user