1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2025-03-12 18:42:48 +01:00

Refactory code

This commit is contained in:
Dany LE 2022-08-14 16:52:22 +02:00
parent 142f14e936
commit 2d09a8501a

View File

@ -36,12 +36,6 @@ DiyaBoot class >> startx [
self uniqueInstance run self uniqueInstance run
] ]
{ #category : #events }
DiyaBoot >> GLinit. [
OpenGL viewportX: 0 Y:0 W: display w H: display h.
OpenGL enable: GL_TEXTURE_2D.
]
{ #category : #events } { #category : #events }
DiyaBoot >> createGLContext [ DiyaBoot >> createGLContext [
context := SDL2 glCreateContext: window. context := SDL2 glCreateContext: window.
@ -105,7 +99,9 @@ DiyaBoot >> render [
|launcher| |launcher|
launcher := DiyaApplicationLauncher uniqueInstance. launcher := DiyaApplicationLauncher uniqueInstance.
launcher setup. launcher setup.
self GLinit. "Init the Open GL view port and enable 2D texture"
OpenGL viewportX: 0 Y:0 W: display w H: display h.
OpenGL enable: GL_TEXTURE_2D.
[ launcher running ] whileTrue: [ [ launcher running ] whileTrue: [
DiyaClock uniqueInstance tick. DiyaClock uniqueInstance tick.
launcher main. launcher main.