mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
WIP updated UI
WIP dark editor theme fixed multiwindow
This commit is contained in:
parent
9ac9c13fea
commit
0e6ba354db
46 changed files with 2404 additions and 2295 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue