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: 1076
Registered: September 2012
Location: Poland, Kraków
Senior 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


U++ - 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: Fri Apr 19 16:48:35 CEST 2024

Total time taken to generate the page: 3.06712 seconds