large scale renderer rework

- Abstracts all OpenGL functionality including UI objects
- Cleans up several rendering codepaths
- Improves threading functionality
- Removes old code and problematic functions
This commit is contained in:
itsmattkc
2020-11-10 11:24:51 +11:00
parent 52b98f3fa3
commit 1d61f89920
42 changed files with 927 additions and 820 deletions
+4 -8
View File
@@ -196,11 +196,11 @@ float Color::lightness() const
void Color::toData(char *data, const PixelFormat::Format &format) const
{
OIIO::convert_types(PixelFormat::GetOIIOTypeDesc(PixelFormat::PIX_FMT_RGB32F),
OIIO::convert_types(OIIO::TypeDesc::FLOAT,
data_,
PixelFormat::GetOIIOTypeDesc(format),
data,
PixelFormat::FormatHasAlphaChannel(format) ? kRGBAChannels : kRGBChannels);
kRGBAChannels);
}
Color Color::fromData(const char *data, const PixelFormat::Format &format)
@@ -209,13 +209,9 @@ Color Color::fromData(const char *data, const PixelFormat::Format &format)
OIIO::convert_types(PixelFormat::GetOIIOTypeDesc(format),
data,
PixelFormat::GetOIIOTypeDesc(PixelFormat::PIX_FMT_RGB32F),
OIIO::TypeDesc::FLOAT,
c.data_,
PixelFormat::FormatHasAlphaChannel(format) ? kRGBAChannels : kRGBChannels);
if (!PixelFormat::FormatHasAlphaChannel(format)) {
c.set_alpha(1.0f);
}
kRGBAChannels);
return c;
}