Home » U++ Library support » U++ Core » [FIXED] GLDraw,GLCtrl would be nice to work properly (OpenGL ver must be >= 2.1 with full-caps)
Re: GLDraw,GLCtrl would be nice to work properly [message #58620 is a reply to message #58618] |
Mon, 04 July 2022 23:36   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Mirek,
Commenting SysImageRealized doesn't help. Also, commenting w.DrawImage(), too. What helped is commenting loop with angle:
//for(int angle = 0; angle < 360; angle += 30)
// w.DrawText(sz.cx - sz.cx / 3, sz.cy - sz.cy / 3, angle * 10, "x Text with angle " + AsString(angle));
So, following code works fine on 32-bit windows:
virtual void GLPaint() {
Size sz = GetSize();
GLDraw w;
w.Init(sz);
w.DrawRect(0, 0, sz.cx, sz.cy, SWhite);
w.DrawRect(10, 10, 30, 30, SRed);
w.DrawLine(45, 45, 80, 120, 4, Blue);
w.DrawLine(80, 90, 400, 0, PEN_DASHDOT);
w.DrawImage(200, 10, CtrlImg::reporticon());
w.DrawImage(280, 10, CtrlImg::reporticon(), Red());
const char *text = "This text is centered";
Size tsz = GetTextSize(text, Arial(25).Bold());
w.DrawText((sz.cx - tsz.cx) / 2, (sz.cy - tsz.cy) / 2, text, Arial(27).Bold(), SBlue);
w.Clipoff(200, 50, 95, 100);
w.DrawText(0, 80, "CLIPPED", Roman(25));
//for(int angle = 0; angle < 360; angle += 30)
// w.DrawText(sz.cx - sz.cx / 3, sz.cy - sz.cy / 3, angle * 10, "x Text with angle " + AsString(angle));
w.End();
}
------------------
OK, after digging more AsString(angle) is causing crash. It works good with following line of code:
w.DrawText(sz.cx - sz.cx / 3, sz.cy - sz.cy / 3, angle * 10, "x Text with angle " /*+ AsString(angle)*/);
Replacing AsString with IntStr cause the same error. I think the problem must be with utoa32 (Format.cpp) function and it's memory management on 32 bit architecture.
Klugier
U++ - one framework to rule them all.
[Updated on: Tue, 05 July 2022 00:01] Report message to a moderator
|
|
|
 |
|
[FIXED] GLDraw,GLCtrl would be nice to work properly
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Sat, 18 June 2022 09:53
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Sun, 19 June 2022 20:16
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Wed, 22 June 2022 01:39
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Sun, 03 July 2022 20:55
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Sun, 03 July 2022 22:51
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Mon, 04 July 2022 00:41
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Mon, 04 July 2022 01:04
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Mon, 04 July 2022 23:36
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Tue, 05 July 2022 01:05
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Tue, 05 July 2022 10:44
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Tue, 05 July 2022 11:13
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Tue, 05 July 2022 11:28
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: mirek on Sun, 03 July 2022 21:00
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: luoganda on Mon, 25 December 2023 11:24
|
 |
|
Re: GLDraw,GLCtrl would be nice to work properly
By: Klugier on Mon, 25 December 2023 17:06
|
Goto Forum:
Current Time: Tue Apr 29 23:43:32 CEST 2025
Total time taken to generate the page: 0.01257 seconds
|