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

54 lines
943 B
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,
2022-03-01 22:58:58 +01:00
#category : #'Diya-Graphics'
}
2022-03-19 02:18:29 +01:00
{ #category : #accessing }
DiyaRootNode >> boundingBox [
^ Rectangle origin: 0@0 corner: context resolution
]
2022-03-03 19:19:40 +01:00
{ #category : #accessing }
DiyaRootNode >> draw [
2022-03-23 00:52:15 +01:00
|c|
c := style get: #bgcolor.
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.
context vbo bind: GL_ARRAY_BUFFER.
2022-03-03 19:19:40 +01:00
]
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.
2022-03-23 00:52:15 +01:00
style := DiyaDefaultStyle new
2022-03-01 22:58:58 +01:00
]
2022-03-19 02:18:29 +01:00
{ #category : #'as yet unclassified' }
DiyaRootNode >> inner: aPoint [
^true
]
{ #category : #accessing }
DiyaRootNode >> isRoot [
^true
2022-03-01 22:58:58 +01:00
]
{ #category : #initialization }
DiyaRootNode >> update [
^true
]
{ #category : #accessing }
DiyaRootNode >> updateTF [
"donothing"
2022-03-01 22:58:58 +01:00
]