Home » U++ Library support » U++ Library : Other (not classified elsewhere) » layout bug with glctrl
layout bug with glctrl [message #26937] |
Thu, 10 June 2010 23:54 |
abductee
Messages: 22 Registered: June 2007 Location: Germany
|
Promising Member |
|
|
hi, i recently came to recognize this one.
it seems that in concert with the splitters the gl-ctrl does not center correctly.
i've written a small testcase in wic everytime GLPaint gets called the GLScreen is cleared with a new random color so its convievable when render(or rather GLPaint) happens.
#include <GLCtrl/GLCtrl.h>
using namespace Upp;
struct OpenGLExample : GLCtrl {
Point point;
virtual void GLPaint() {
StdView();
float col = (float)rand()/(float)RAND_MAX;
float col1 = (float)rand()/(float)RAND_MAX;
float col2 = (float)rand()/(float)RAND_MAX;
glClearColor( col,col1,col2,0.0 );
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
virtual void MouseMove(Point p, dword) {
point = p;
Refresh();
}
};
GUI_APP_MAIN
{
Ctrl::GlobalBackPaint();
TopWindow win;
OpenGLExample gl;
Button b2,b3;
Splitter s;
s << b2 << b3;
s.Horz();
gl.HCenterPos(300).VCenterPos(200);
b3.Add( gl );
win.Add(s.HSizePos(10, 10).VSizePos(10, 10));
win.Sizeable().Zoomable();
win.Open();
win.Run();
}
hope that helps,
cheers abductee
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 02:55:56 CEST 2024
Total time taken to generate the page: 0.00960 seconds
|