Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » [DEPRECTED] GLDrawDemo - Resizing dosen't work.
[DEPRECTED] GLDrawDemo - Resizing dosen't work. [message #42251] Sat, 01 March 2014 23:48
Klugier is currently offline  Klugier
Messages: 627
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

It seems that resizing in GLDrawDemo dosen't work properly.

The first worse solution is just to add explicit glVieport invocation in GLPaint() method(GLDrawDemo - main.cpp - Line 10):

	virtual void GLPaint() {
		Size sz = GetSize();
		glViewport(0, 0, (GLsizei)sz.cx, (GLsizei)sz.cy); // <- We need to add this line
                ...
        }


The second much complex solution is to extends a little bit GLCtrl. I think that Layout method should call glVieport function by default. Below is a proposal of my code (beta version):

void GLCtrl::Layout() {
   if(controlVieport) { // <- Additional flag, enable by default
       Size sz = GetSize();
       glViewport(0, 0, (GLsizei)sz.cx, (GLsizei)sz.cy);
   }
   Ctrl::Layout();
}


Please review above proposition.

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.

[Updated on: Thu, 13 March 2014 17:09]

Report message to a moderator

Previous Topic: Bug: problem with special characters on Button
Next Topic: [APPROVED] GLCtrl flickering on Win32
Goto Forum:
  


Current Time: Thu Sep 19 00:14:05 CEST 2019

Total time taken to generate the page: 0.01011 seconds