mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	Using framebuffer object instead of image to render the terminal. Improves performances.
This commit is contained in:
		
							
								
								
									
										18
									
								
								app/TimeManager.qml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								app/TimeManager.qml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| import QtQuick 2.0 | ||||
|  | ||||
| Timer{ | ||||
|     property int time | ||||
|  | ||||
|     NumberAnimation on time { | ||||
|         from: 0 | ||||
|         to: 100000 | ||||
|         running: shadersettings.fps === 0 | ||||
|         duration: 100000 | ||||
|         loops: Animation.Infinite | ||||
|     } | ||||
|  | ||||
|     onTriggered: time += interval | ||||
|     running: shadersettings.fps !== 0 | ||||
|     interval: Math.round(1000 / shadersettings.fps) | ||||
|     repeat: true | ||||
| } | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE QtCreatorProject> | ||||
| <!-- Written by QtCreator 3.0.1, 2014-06-27T16:14:00. --> | ||||
| <!-- Written by QtCreator 3.0.1, 2014-06-27T20:58:56. --> | ||||
| <qtcreator> | ||||
|  <data> | ||||
|   <variable>ProjectExplorer.Project.ActiveTarget</variable> | ||||
|   | ||||
| @@ -194,14 +194,14 @@ KTerminalDisplay::KTerminalDisplay(QQuickItem *parent) : | ||||
|  | ||||
|     setColorTable(base_color_table); | ||||
|  | ||||
|     setRenderTarget(QQuickPaintedItem::FramebufferObject); | ||||
|  | ||||
|     //new AutoScrollHandler(this); | ||||
|  | ||||
|     setAcceptedMouseButtons(Qt::LeftButton); | ||||
|     setFlags(ItemHasContents | ItemAcceptsInputMethod); | ||||
|     //installEventFilter(this); | ||||
|  | ||||
|     m_font.setStyleHint(QFont::TypeWriter); | ||||
|  | ||||
|     setVTFont(m_font); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user