1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-27 03:48:21 +01:00
This commit is contained in:
Dany LE 2022-03-22 21:29:36 +01:00
parent e99500acca
commit e2adc4f733
2 changed files with 0 additions and 61 deletions

View File

@ -93,15 +93,6 @@ DiyaBoot >> initialize [
clock := DiyaClock uniqueInstance. clock := DiyaClock uniqueInstance.
] ]
{ #category : #events }
DiyaBoot >> randomColorChannel [
| rand |
rand := Random new.
rand := (rand next) * 255.
rand := rand asInteger.
^ rand
]
{ #category : #events } { #category : #events }
DiyaBoot >> render [ DiyaBoot >> render [
|delta launcher| |delta launcher|
@ -199,18 +190,3 @@ DiyaBoot >> startx [
DiyaSingleton resetAll. DiyaSingleton resetAll.
SDL2 quit. SDL2 quit.
] ]
{ #category : #events }
DiyaBoot >> step [
"renderer drawColorR: 0
g: 0
b: 0
a: 255."
OpenGL begin: GL_TRIANGLES.
"draw a simple triangle here"
OpenGL color3fR: 0.1 G:0.2 B: 0.3.
OpenGL vertex3fX: 0 Y: 0 Z: 0.
OpenGL vertex3fX: 1 Y: 0 Z: 0.
OpenGL vertex3fX: 0 Y: 1 Z: 0.
OpenGL end.
]

View File

@ -1,37 +0,0 @@
Class {
#name : #DiyaRenderer,
#superclass : #DiyaSingleton,
#instVars : [
'root'
],
#pools : [
'OpenGLConstants',
'OpenGLTypes'
],
#category : #'Diya-Graphics'
}
{ #category : #'instance creation' }
DiyaRenderer class >> fromContext: ctx [
^self new context: ctx; yourself
]
{ #category : #initialization }
DiyaRenderer >> initialize [
super initialize.
]
{ #category : #deleting }
DiyaRenderer >> render [
root render.
]
{ #category : #accessing }
DiyaRenderer >> root [
^ root
]
{ #category : #accessing }
DiyaRenderer >> root: anObject [
root := anObject
]