WIP updated UI

WIP dark editor theme
fixed multiwindow
This commit is contained in:
Areloch 2019-05-09 00:11:49 -05:00
parent 9ac9c13fea
commit 0e6ba354db
46 changed files with 2404 additions and 2295 deletions

View file

@ -37,7 +37,7 @@ GFX_ImplementTextureProfile( BackBufferDepthProfile,
GFXGLWindowTarget::GFXGLWindowTarget(PlatformWindow *win, GFXDevice *d)
: GFXWindowTarget(win), mDevice(d), mContext(NULL), mFullscreenContext(NULL)
, mCopyFBO(0), mBackBufferFBO(0)
, mCopyFBO(0), mBackBufferFBO(0), mSecondaryWindow(false)
{
win->appEvent.notify(this, &GFXGLWindowTarget::_onAppSignal);
}
@ -52,7 +52,14 @@ GFXGLWindowTarget::~GFXGLWindowTarget()
void GFXGLWindowTarget::resetMode()
{
if(mWindow->getVideoMode().fullScreen != mWindow->isFullscreen())
// Do some validation...
bool fullscreen = mWindow->getVideoMode().fullScreen;
if (fullscreen && mSecondaryWindow)
{
AssertFatal(false, "GFXGLWindowTarget::resetMode - Cannot go fullscreen with secondary window!");
}
if (fullscreen != mWindow->isFullscreen())
{
_teardownCurrentMode();
_setupNewMode();

View file

@ -50,6 +50,9 @@ public:
virtual void resolveTo(GFXTextureObject* obj);
void _onAppSignal(WindowId wnd, S32 event);
// create pixel format for the window
void createPixelFormat();
private:
friend class GFXGLDevice;
@ -58,6 +61,8 @@ private:
GFXTexHandle mBackBufferColorTex, mBackBufferDepthTex;
Point2I size;
GFXDevice* mDevice;
/// Is this a secondary window
bool mSecondaryWindow;
void* mContext;
void* mFullscreenContext;
void _teardownCurrentMode();

View file

@ -192,19 +192,21 @@ U32 GFXGLDevice::getTotalVideoMemory()
GFXWindowTarget *GFXGLDevice::allocWindowTarget( PlatformWindow *window )
{
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;
}
GFXGLWindowTarget* ggwt = new GFXGLWindowTarget(window, this);
return ggwt;
//first window
if (!mContext)
{
init(window->getVideoMode(), window);
ggwt->mSecondaryWindow = false;
}
else
ggwt->mSecondaryWindow = true;
ggwt->registerResourceWithDevice(this);
ggwt->mContext = mContext;
return ggwt;
}
GFXFence* GFXGLDevice::_createPlatformSpecificFence()