mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
ObjWriting: Add DDS writer basis
This commit is contained in:
parent
b436781632
commit
000022afe9
@ -1,6 +1,8 @@
|
|||||||
#include "AssetDumperGfxImage.h"
|
#include "AssetDumperGfxImage.h"
|
||||||
#include "ObjWriting.h"
|
#include "ObjWriting.h"
|
||||||
#include "Image/IwiWriter27.h"
|
#include "Image/IwiWriter27.h"
|
||||||
|
#include "Image/DdsWriter.h"
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
using namespace T6;
|
using namespace T6;
|
||||||
|
|
||||||
@ -9,11 +11,13 @@ AssetDumperGfxImage::AssetDumperGfxImage()
|
|||||||
switch (ObjWriting::Configuration.ImageOutputFormat)
|
switch (ObjWriting::Configuration.ImageOutputFormat)
|
||||||
{
|
{
|
||||||
case ObjWriting::Configuration_t::ImageOutputFormat_e::DDS:
|
case ObjWriting::Configuration_t::ImageOutputFormat_e::DDS:
|
||||||
|
m_writer = new DdsWriter();
|
||||||
break;
|
break;
|
||||||
case ObjWriting::Configuration_t::ImageOutputFormat_e::IWI:
|
case ObjWriting::Configuration_t::ImageOutputFormat_e::IWI:
|
||||||
m_writer = new IwiWriter27();
|
m_writer = new IwiWriter27();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
assert(false);
|
||||||
m_writer = nullptr;
|
m_writer = nullptr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
18
src/ObjWriting/Image/DdsWriter.cpp
Normal file
18
src/ObjWriting/Image/DdsWriter.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "DdsWriter.h"
|
||||||
|
|
||||||
|
DdsWriter::~DdsWriter()
|
||||||
|
= default;
|
||||||
|
|
||||||
|
bool DdsWriter::SupportsImageFormat(const ImageFormat* imageFormat)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DdsWriter::GetFileExtension()
|
||||||
|
{
|
||||||
|
return ".dds";
|
||||||
|
}
|
||||||
|
|
||||||
|
void DdsWriter::DumpImage(FileAPI::IFile* file, Texture* texture)
|
||||||
|
{
|
||||||
|
}
|
12
src/ObjWriting/Image/DdsWriter.h
Normal file
12
src/ObjWriting/Image/DdsWriter.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "IImageWriter.h"
|
||||||
|
|
||||||
|
class DdsWriter final : public IImageWriter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~DdsWriter() override;
|
||||||
|
|
||||||
|
bool SupportsImageFormat(const ImageFormat * imageFormat) override;
|
||||||
|
std::string GetFileExtension() override;
|
||||||
|
void DumpImage(FileAPI::IFile * file, Texture * texture) override;
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user