in kazakhstan, they say that a world is like a context-world
parent
f3a9d6ba17
commit
2a58c40341
|
@ -29,9 +29,6 @@ HELP: set-title
|
||||||
{ $description "Sets the title bar of the native window containing the world." }
|
{ $description "Sets the title bar of the native window containing the world." }
|
||||||
{ $notes "This word should not be called directly by user code. Instead, change the " { $snippet "title" } " slot model; see " { $link "models" } "." } ;
|
{ $notes "This word should not be called directly by user code. Instead, change the " { $snippet "title" } " slot model; see " { $link "models" } "." } ;
|
||||||
|
|
||||||
HELP: context-world
|
|
||||||
{ $var-description "Holds the " { $link world } " whose OpenGL context was most recently made active by " { $link set-gl-context } "." } ;
|
|
||||||
|
|
||||||
HELP: set-gl-context
|
HELP: set-gl-context
|
||||||
{ $values { "world" world } }
|
{ $values { "world" world } }
|
||||||
{ $description "Selects an OpenGL context to be the implicit destination for subsequent GL rendering calls. This word is called automatically by the UI before drawing a " { $link world } "." } ;
|
{ $description "Selects an OpenGL context to be the implicit destination for subsequent GL rendering calls. This word is called automatically by the UI before drawing a " { $link world } "." } ;
|
||||||
|
|
|
@ -78,13 +78,11 @@ TUPLE: world-attributes
|
||||||
'[ f _ [ (>>status-owner) ] [ status>> set-model ] 2bi ] when
|
'[ f _ [ (>>status-owner) ] [ status>> set-model ] 2bi ] when
|
||||||
] [ 2drop ] if ;
|
] [ 2drop ] if ;
|
||||||
|
|
||||||
SYMBOL: context-world
|
|
||||||
|
|
||||||
: window-resource ( resource -- resource )
|
: window-resource ( resource -- resource )
|
||||||
dup context-world get-global window-resources>> push ;
|
dup world get-global window-resources>> push ;
|
||||||
|
|
||||||
: set-gl-context ( world -- )
|
: set-gl-context ( world -- )
|
||||||
[ context-world set-global ]
|
[ world set-global ]
|
||||||
[ handle>> select-gl-context ] bi ;
|
[ handle>> select-gl-context ] bi ;
|
||||||
|
|
||||||
: with-gl-context ( world quot -- )
|
: with-gl-context ( world quot -- )
|
||||||
|
|
Loading…
Reference in New Issue