1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-28 12:28:21 +01:00
Diya-API/Diya/DiyaRootNode.class.st

91 lines
1.4 KiB
Smalltalk
Raw Normal View History

2022-03-01 22:58:58 +01:00
Class {
#name : #DiyaRootNode,
2022-03-03 19:19:40 +01:00
#superclass : #DiyaNode,
#instVars : [
'Q'
],
2022-03-01 22:58:58 +01:00
#category : #'Diya-Graphics'
}
{ #category : #accessing }
DiyaRootNode >> Q [
^ Q
]
2022-03-19 02:18:29 +01:00
{ #category : #accessing }
DiyaRootNode >> boundingBox [
^ Rectangle origin: 0@0 corner: context resolution
]
{ #category : #'add/remove' }
DiyaRootNode >> cleanDirtyNode: aNode [
Q remove: aNode ifAbsent:[]
]
2022-03-03 19:19:40 +01:00
{ #category : #accessing }
DiyaRootNode >> draw [
2022-03-23 00:52:15 +01:00
|c|
2022-08-07 20:43:16 +02:00
c := self ? #bgColor.
2022-03-23 00:52:15 +01:00
OpenGL clearColorR: c red G: c green B: c blue A: c alpha.
2022-03-03 19:19:40 +01:00
OpenGL clear: GL_COLOR_BUFFER_BIT.
2022-08-13 23:48:23 +02:00
"context vbo bind: GL_ARRAY_BUFFER."
2022-03-03 19:19:40 +01:00
]
{ #category : #'add/remove' }
DiyaRootNode >> enqueueDirtyNode: aNode [
(Q includes: aNode ) ifFalse:[ Q add: aNode].
]
2022-03-19 02:18:29 +01:00
{ #category : #accessing }
DiyaRootNode >> extent [
^ context resolution
]
{ #category : #initialization }
DiyaRootNode >> initialize [
super initialize.
parent := self.
2022-03-06 18:33:10 +01:00
shader := nil.
2022-03-19 02:18:29 +01:00
root := self.
styleName := #global.
Q := OrderedCollection new
2022-03-01 22:58:58 +01:00
]
{ #category : #accessing }
2022-03-19 02:18:29 +01:00
DiyaRootNode >> inner: aPoint [
^true
]
{ #category : #accessing }
DiyaRootNode >> isRoot [
^true
2022-03-01 22:58:58 +01:00
]
{ #category : #initialization }
DiyaRootNode >> process [
]
{ #category : #accessing }
DiyaRootNode >> processingQueue [
^ Q
]
{ #category : #initialization }
DiyaRootNode >> setClean [
]
{ #category : #initialization }
DiyaRootNode >> setDirty [
]
{ #category : #accessing }
DiyaRootNode >> updateTF [
"donothing"
2022-03-01 22:58:58 +01:00
]