Jump to content

Fullscreen... again..


Gandi
 Share

Recommended Posts

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..

Link to comment
Share on other sites

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 :)

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...