in kazakhstan, they say that a world is like a context-world

Joe Groff 2009-07-15 22:39:23 -05:00
parent f3a9d6ba17
commit 2a58c40341
2 changed files with 2 additions and 7 deletions

View File

@ -29,9 +29,6 @@ HELP: set-title
{ $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" } "." } ;
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
{ $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 } "." } ;

View File

@ -78,13 +78,11 @@ TUPLE: world-attributes
'[ f _ [ (>>status-owner) ] [ status>> set-model ] 2bi ] when
] [ 2drop ] if ;
SYMBOL: context-world
: window-resource ( resource -- resource )
dup context-world get-global window-resources>> push ;
dup world get-global window-resources>> push ;
: set-gl-context ( world -- )
[ context-world set-global ]
[ world set-global ]
[ handle>> select-gl-context ] bi ;
: with-gl-context ( world quot -- )