mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +00:00
Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy
This commit is contained in:
parent
8943c673fb
commit
0801a3cca8
294 changed files with 3894 additions and 2813 deletions
|
|
@ -86,6 +86,7 @@ void GFXGLDevice::enumerateAdapters( Vector<GFXAdapter*> &adapterList )
|
|||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1);
|
||||
|
||||
SDL_GLContext tempContext = SDL_GL_CreateContext( tempWindow );
|
||||
if( !tempContext )
|
||||
|
|
@ -191,21 +192,19 @@ U32 GFXGLDevice::getTotalVideoMemory()
|
|||
|
||||
GFXWindowTarget *GFXGLDevice::allocWindowTarget( PlatformWindow *window )
|
||||
{
|
||||
GFXGLWindowTarget* ggwt = new GFXGLWindowTarget(window, this);
|
||||
AssertFatal(!mContext, "This GFXGLDevice is already assigned to a window");
|
||||
|
||||
GFXGLWindowTarget* ggwt = 0;
|
||||
if( !mContext )
|
||||
{
|
||||
// no context, init the device now
|
||||
init(window->getVideoMode(), window);
|
||||
ggwt = new GFXGLWindowTarget(window, this);
|
||||
ggwt->registerResourceWithDevice(this);
|
||||
ggwt->mContext = mContext;
|
||||
}
|
||||
|
||||
//first window
|
||||
if (!mContext)
|
||||
{
|
||||
init(window->getVideoMode(), window);
|
||||
ggwt->mSecondaryWindow = false;
|
||||
}
|
||||
else
|
||||
ggwt->mSecondaryWindow = true;
|
||||
|
||||
ggwt->registerResourceWithDevice(this);
|
||||
ggwt->mContext = mContext;
|
||||
|
||||
return ggwt;
|
||||
return ggwt;
|
||||
}
|
||||
|
||||
GFXFence* GFXGLDevice::_createPlatformSpecificFence()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue