Updated STB_image to v2.00b
Former-commit-id: a0887de0a051fab7ceb34c4ed5e9aedde0e6b1a9
This commit is contained in:
parent
e69c2982b9
commit
119b043201
|
|
@ -17,19 +17,19 @@ namespace
|
||||||
{
|
{
|
||||||
int Read(void* userdata, char* data, int size)
|
int Read(void* userdata, char* data, int size)
|
||||||
{
|
{
|
||||||
NzInputStream* stream = reinterpret_cast<NzInputStream*>(userdata);
|
NzInputStream* stream = static_cast<NzInputStream*>(userdata);
|
||||||
return static_cast<int>(stream->Read(data, size));
|
return static_cast<int>(stream->Read(data, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Skip(void* userdata, unsigned int size)
|
void Skip(void* userdata, int size)
|
||||||
{
|
{
|
||||||
NzInputStream* stream = reinterpret_cast<NzInputStream*>(userdata);
|
NzInputStream* stream = static_cast<NzInputStream*>(userdata);
|
||||||
stream->Read(nullptr, size);
|
stream->SetCursorPos(static_cast<nzInt64>(stream->GetCursorPos()) + static_cast<nzInt64>(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
int Eof(void* userdata)
|
int Eof(void* userdata)
|
||||||
{
|
{
|
||||||
NzInputStream* stream = reinterpret_cast<NzInputStream*>(userdata);
|
NzInputStream* stream = static_cast<NzInputStream*>(userdata);
|
||||||
return stream->GetCursorPos() >= stream->GetSize();
|
return stream->GetCursorPos() >= stream->GetSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -37,7 +37,7 @@ namespace
|
||||||
|
|
||||||
bool IsSupported(const NzString& extension)
|
bool IsSupported(const NzString& extension)
|
||||||
{
|
{
|
||||||
static std::set<NzString> supportedExtensions = {"bmp", "gif", "hdr", "jpg", "jpeg", "pic", "png", "psd", "tga"};
|
static std::set<NzString> supportedExtensions = {"bmp", "gif", "hdr", "jpg", "jpeg", "pic", "png", "ppm", "pgm", "psd", "tga"};
|
||||||
return supportedExtensions.find(extension) != supportedExtensions.end();
|
return supportedExtensions.find(extension) != supportedExtensions.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue