Gandi Posted February 23, 2010 Share Posted February 23, 2010 Hi! I want to change the resolution of my window and fullscreen/normal screen. everything works fine as long as: 1) i dont change between fullscreen/windowed screen or 2) the new resolution is smaller then the old one ( then also fullscreen/windowed screen changes work) thats my code: void Resize(int w, int h, int d, int f, int flag) { int wa = GraphicsWidth(); int ha = GraphicsHeight(); ::Graphics(w,h,d,f, flag); if(wa==w && ha==h) return; std::vector<TBuffer> bu; for(uint i=0; i< buffer.size(); i++) { TBuffer b = CreateBuffer(w,h,flags[i]); bu.push_back(; FreeBuffer(buffer[i]); } buffer.swap(bu); bu.clear(); delete &bu; menu->SetSize(GraphicsWidth(), GraphicsHeight()); } buffer contains all my buffers and flags contains the buffer-flags.. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 23, 2010 Share Posted February 23, 2010 I thought there was an easier way of doing this. Isn't there some way via Framewerk to turn on or of fullscreen? Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 23, 2010 Share Posted February 23, 2010 Framework resizes the buffers automatically, so all you need to do is to call Graphics() with your new size or fullscreen mode. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
DaDonik Posted February 23, 2010 Share Posted February 23, 2010 You could take a look at the framewerk (renderer.cpp) to check what it does when the buffer size changes. Using framework, all you need to do is call Graphics(...) and it works in all cases. I remember that some parts of the renderer.cpp had fancy graphics related stuff. Maybe your implementation is missing something there Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.