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 » Community » U++ community news and announcements » GLCtrl in GTK
Re: GLCtrl in GTK [message #50647 is a reply to message #50604] Thu, 29 November 2018 05:25 Go to previous messageGo to previous message
ptkacz is currently offline  ptkacz
Messages: 89
Registered: March 2017
Member
Offending code identified. ...I decided to roll the dice and went back to the fix for issue # 1481. Below is the code changes that I made to CtrlDraw.cpp. For compiling the OpenGL demo, NOGTK was specified and vola, the demo worked!

Changes made to CtrlDraw.cpp, starting at line 595:
void Ctrl::UpdateArea0(SystemDraw& draw, const Rect& clip, int backpaint)
{
	GuiLock __;
	LTIMING("UpdateArea");
	LLOG("========== UPDATE AREA " << UPP::Name(this) << " " << clip << " ==========");
//      ExcludeDHCtrls(draw, GetRect().GetSize(), clip);
	if(globalbackbuffer) {
		CtrlPaint(draw, clip);
		LLOG("========== END (TARGET IS BACKBUFFER)");
		return;
	}
/*
	if(backpaint == FULLBACKPAINT || globalbackpaint) {
		ShowRepaintRect(draw, clip, LtRed());
		BackDraw bw;
		bw.Create(draw, clip.GetSize());
		bw.Offset(-clip.TopLeft());
		bw.SetPaintingDraw(draw, clip.TopLeft());
		CtrlPaint(bw, clip);
		bw.Put(draw, clip.TopLeft());
		LLOG("========== END (FULLBACKPAINT)");
		return;
	}
*/
	if(backpaint == TRANSPARENTBACKPAINT) {
		LLOG("TransparentBackpaint");
		Vector<Rect> area;
		GatherTransparentAreas(area, draw, GetRect().GetSize(), clip);

Line 600, "ExcludeDHCtrls(..." was commented out as specified in issue ticket, 1481.

As for the commented block of code, this was a gamble, a bit of a hunch, since in issue ticket 1481, the following change had originally been specified:

-	if(backpaint == FULLBACKPAINT || globalbackpaint/* && !hasdhctrl && !dynamic_cast<DHCtrl *>(this)*/) {
+	if(backpaint == FULLBACKPAINT || globalbackpaint && !hasdhctrl && !dynamic_cast<DHCtrl *>(this)) {

Since if I recall that hasdhctrl is no longer defined, I wondered if just commenting out that block of code would make a difference. It appears to have done so. I'd attach a screen shot of the working demo, but have a cap of one attachment per message.




Peter
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: plugin/zstd and plugin/zstd_legacy
Next Topic: Dark theme support changes
Goto Forum:
  


Current Time: Sat Jul 05 23:22:33 CEST 2025

Total time taken to generate the page: 0.05262 seconds