Merge branch 'master' of http://github.com/Blei/factor
commit
597f7cb578
|
@ -290,14 +290,6 @@ ERROR: invalid-color-type/bit-depth loading-png ;
|
|||
: validate-truecolor-alpha ( loading-png -- loading-png )
|
||||
{ 8 16 } validate-bit-depth ;
|
||||
|
||||
: pad-bitmap ( image -- image )
|
||||
dup dim>> second 4 divisor? [
|
||||
dup [ bytes-per-pixel ]
|
||||
[ dim>> first * ]
|
||||
[ dim>> first 4 mod ] tri
|
||||
'[ _ group [ _ 0 <array> append ] map B{ } concat-as ] change-bitmap
|
||||
] unless ;
|
||||
|
||||
: loading-png>bitmap ( loading-png -- bytes component-order )
|
||||
dup color-type>> {
|
||||
{ greyscale [
|
||||
|
@ -323,7 +315,7 @@ ERROR: invalid-color-type/bit-depth loading-png ;
|
|||
[ loading-png>bitmap [ >>bitmap ] [ >>component-order ] bi* ]
|
||||
[ [ width>> ] [ height>> ] bi 2array >>dim ]
|
||||
[ png-component >>component-type ]
|
||||
} cleave pad-bitmap ;
|
||||
} cleave ;
|
||||
|
||||
: load-png ( stream -- loading-png )
|
||||
[
|
||||
|
|
|
@ -35,6 +35,8 @@ SLOT: background-color
|
|||
GL_BLEND glEnable
|
||||
GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA glBlendFunc
|
||||
GL_VERTEX_ARRAY glEnableClientState
|
||||
GL_PACK_ALIGNMENT 1 glPixelStorei
|
||||
GL_UNPACK_ALIGNMENT 1 glPixelStorei
|
||||
init-matrices
|
||||
[ init-clip ]
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue