mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 22:21:18 +02:00
- best i can do for now, screnshots can be sized, but size cannot exceed max viewable on screen resolution
This commit is contained in:
@@ -294,6 +294,7 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
|||||||
//getGlPlatformExtensions();
|
//getGlPlatformExtensions();
|
||||||
|
|
||||||
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 }; // to prevent flicker
|
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 }; // to prevent flicker
|
||||||
|
//int args[] = { WX_GL_RGBA, WX_GL_MIN_ALPHA, 0 }; // to prevent flicker
|
||||||
glCanvas = new GlCanvas(this, args);
|
glCanvas = new GlCanvas(this, args);
|
||||||
|
|
||||||
#if wxCHECK_VERSION(2, 9, 1)
|
#if wxCHECK_VERSION(2, 9, 1)
|
||||||
@@ -570,6 +571,15 @@ void MainWindow::onPaint(wxPaintEvent &event) {
|
|||||||
setupStartupSettings();
|
setupStartupSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//wxClientDC &dc = event.GetDC();
|
||||||
|
// wxPaintDC dc(this);
|
||||||
|
// if(overrideSize.first > 0 && overrideSize.second > 0) {
|
||||||
|
// wxRect r(0,0,100,100);
|
||||||
|
// dc.SetDeviceClippingRegion(r);
|
||||||
|
// // Then I destroy the clipping region
|
||||||
|
// dc.DestroyClippingRegion();
|
||||||
|
// }
|
||||||
|
|
||||||
// notice that we use GetSize() here and not GetClientSize() because
|
// notice that we use GetSize() here and not GetClientSize() because
|
||||||
// the latter doesn't return correct results for the minimized windows
|
// the latter doesn't return correct results for the minimized windows
|
||||||
// (at least not under Windows)
|
// (at least not under Windows)
|
||||||
@@ -1989,6 +1999,10 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
bool App::OnInit() {
|
bool App::OnInit() {
|
||||||
SystemFlags::VERBOSE_MODE_ENABLED = false;
|
SystemFlags::VERBOSE_MODE_ENABLED = false;
|
||||||
|
//Renderer::windowW = 1920;
|
||||||
|
//Renderer::windowH = 1440;
|
||||||
|
//Renderer::windowX= 0;
|
||||||
|
//Renderer::windowY= 0;
|
||||||
|
|
||||||
string modelPath="";
|
string modelPath="";
|
||||||
string particlePath="";
|
string particlePath="";
|
||||||
@@ -2056,6 +2070,8 @@ bool App::OnInit() {
|
|||||||
overrideSize.first = strToInt(values[0]);
|
overrideSize.first = strToInt(values[0]);
|
||||||
overrideSize.second = strToInt(values[1]);
|
overrideSize.second = strToInt(values[1]);
|
||||||
|
|
||||||
|
Renderer::windowX= 0;
|
||||||
|
Renderer::windowY= 0;
|
||||||
Renderer::windowW = overrideSize.first;
|
Renderer::windowW = overrideSize.first;
|
||||||
Renderer::windowH = overrideSize.second + 25;
|
Renderer::windowH = overrideSize.second + 25;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ using namespace Shared::Graphics::Gl;
|
|||||||
|
|
||||||
namespace Shared{ namespace G3dViewer{
|
namespace Shared{ namespace G3dViewer{
|
||||||
|
|
||||||
|
int Renderer::windowX= 100;
|
||||||
|
int Renderer::windowY= 100;
|
||||||
int Renderer::windowW= 640;
|
int Renderer::windowW= 640;
|
||||||
int Renderer::windowH= 480;
|
int Renderer::windowH= 480;
|
||||||
|
|
||||||
|
@@ -68,8 +68,8 @@ public:
|
|||||||
|
|
||||||
class Renderer : public RendererInterface {
|
class Renderer : public RendererInterface {
|
||||||
public:
|
public:
|
||||||
static const int windowX= 100;
|
static int windowX;
|
||||||
static const int windowY= 100;
|
static int windowY;
|
||||||
static int windowW;
|
static int windowW;
|
||||||
static int windowH;
|
static int windowH;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user