'four layers: software, hardware, GL, hardware2
'for opengl
' GLubyte bitmap[24]={ //bitmap size 10 x 12 pixels
'--------------------------------- Glubyte QB64 method --------------------------------
hexadecimal$
= "&H" + RIGHT$(value$
, 2) bitmap
(LoadArray
) = VAL(hexadecimal$
) value:
DATA 0xc0
,0x00
,0xc0
,0x00
,0xc0
,0x00
,0xc0
,0x00
'// begin is in left down corner SEE TO LINE 47 HOW TO WRITE CORRECTLY THIS ARRAY FOR USE WITH _OFFSET!!!! (last parameter for _glBitmap) DATA 0xc0
,0x00
,0xff
,0x00
,0xff
,0x00
,0xc0
,0x00
DATA 0xc0
,0x00
,0xc0
,0x00
,0xff
,0xc0
,0xff
,0xc0
'--------------------------------- Glubyte end -----------------------------------------
_glClear _GL_COLOR_BUFFER_BIT
' // clear all colors in color buffer
_glBegin _GL_TRIANGLES
' // draw RGB triangle in background
_glColor3f 1.0F, 1.0F, 1.0F ' // white color for first bitmap
_glColor3f 0.0F, 0.0F, 0.5F ' // darkblue color for second bitmap _glBitmap 10, 12, 0.0F, 0.0F, 0.0F, 0.0F, _OFFSET(bitmap
()) ' draw second bitmap
_glRasterPos2i 350, 10 ' // ATTENTION, here is color set after glRasterPos2i(), _glColor3f 0.5F, 0.0F, 0.0F ' // also color for next bitmap is the same as in previous case _glBitmap 10, 12, 0.0F, 0.0F, 0.0F, 0.0F, _OFFSET(bitmap
()) ' vykresleni bitmapy
_glFlush ' // create and draw all to screen