mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-27 03:48:21 +01:00
46 lines
926 B
Smalltalk
46 lines
926 B
Smalltalk
Class {
|
|
#name : #DiyaBaseObject,
|
|
#superclass : #Object,
|
|
#category : #'Diya-Core'
|
|
}
|
|
|
|
{ #category : #accessing }
|
|
DiyaBaseObject >> checkGLError: mark [
|
|
|err|
|
|
err := OpenGL getError.
|
|
err = 0 ifFalse:[
|
|
self stderror:mark, ': return error code ', err hex.
|
|
].
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaBaseObject >> logError: string [
|
|
self stderr nextPutAll: string; cr
|
|
]
|
|
|
|
{ #category : #asserting }
|
|
DiyaBaseObject >> shouldNotBeCalled [
|
|
^DiyaCoreAPIError signal: 'Should not be called'
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaBaseObject >> stderr [
|
|
^VTermOutputDriver stderr
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaBaseObject >> stderror: string [
|
|
self stderr nextPutAll: string; nextPutAll: Character cr asString.
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaBaseObject >> stdlog: string [
|
|
self stdout nextPutAll: string;
|
|
nextPutAll: Character cr asString.
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
DiyaBaseObject >> stdout [
|
|
^ VTermOutputDriver stdout
|
|
]
|