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 #50648 is a reply to message #50647] Thu, 29 November 2018 08:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
ptkacz wrote on Thu, 29 November 2018 05:25
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


OK, now I am officially confused....

Thing is, new GLCtrl for GTK has nothing to do with DHCtrl. And NOGTK variant is not supported at this moment (I might implement that later or not, X11 backend being something between deprecated and fallback for now).

From your posts it is maybe a bit unclear whether you have tested plain GTK mode (that is, without NOGTK)? That is what is supposed to be fixed...

Mirek

 
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: Sun Aug 24 17:30:45 CEST 2025

Total time taken to generate the page: 0.06165 seconds