2021-12-20 01:14:35 +01:00
|
|
|
Class {
|
|
|
|
#name : #OpenGL,
|
|
|
|
#superclass : #DiyaFFIBase,
|
|
|
|
#pools : [
|
|
|
|
'OpenGLConstants',
|
|
|
|
'OpenGLTypes'
|
|
|
|
],
|
|
|
|
#category : #'Diya-OpenGL'
|
|
|
|
}
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
OpenGL class >> begin: mode [
|
|
|
|
^ self ffiCall: #(void glBegin(GLenum mode))
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
OpenGL class >> checkSymbol [
|
2022-02-14 00:02:14 +01:00
|
|
|
^#glDrawArrays
|
2021-12-20 01:14:35 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
OpenGL class >> clear: mask [
|
|
|
|
^ self ffiCall: #(void glClear(GLbitfield mask))
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
OpenGL class >> clearColorR: red G: green B: blue A:alpha [
|
|
|
|
^self ffiCall: #(void glClearColor( GLclampf red,GLclampf green,GLclampf blue,GLclampf alpha))
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
OpenGL class >> color3fR: red G: green B: blue [
|
|
|
|
^self ffiCall: #(void glColor3f(GLfloat red,GLfloat green,GLfloat blue))
|
|
|
|
]
|
|
|
|
|
2022-02-13 17:15:23 +01:00
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
OpenGL class >> drawArrays: mode first: idx count:n [
|
|
|
|
^self ffiCall: #(void glDrawArrays(GLenum mode,GLint idx,GLsizei n))
|
|
|
|
]
|
|
|
|
|
2021-12-20 01:14:35 +01:00
|
|
|
{ #category : #accessing }
|
|
|
|
OpenGL class >> end [
|
|
|
|
^ self ffiCall: #(void glEnd( void ))
|
|
|
|
]
|
|
|
|
|
2022-02-14 00:02:14 +01:00
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
OpenGL class >> getIntegerv: pname data: data [
|
|
|
|
^self ffiCall: #(void glGetIntegerv( GLenum pname,GLint * data))
|
|
|
|
]
|
|
|
|
|
2021-12-20 01:14:35 +01:00
|
|
|
{ #category : #accessing }
|
|
|
|
OpenGL class >> libNames [
|
|
|
|
^#('libGL.so.1')
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
OpenGL class >> vertex3fX:x Y:y Z:z [
|
|
|
|
^self ffiCall: #(void glVertex3f( GLfloat x,GLfloat y,GLfloat z))
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
|
|
OpenGL class >> viewportX: x Y:y W: width H:height [
|
|
|
|
^ self ffiCall: #(void glViewport(GLint x,GLint y,GLsizei width,GLsizei height))
|
|
|
|
]
|