ui.gadgets.worlds: don't enable depth buffer by default, since it just wastes memory and apps which need it can pass custom pixel-format-attributes to open-window to enable it explicitly

db4
Slava Pestov 2010-05-24 19:23:02 -04:00
parent 212d308de1
commit 46fe340be3
4 changed files with 32 additions and 6 deletions

View File

@ -20,7 +20,6 @@ CONSTANT: default-world-pixel-format-attributes
{
windowed
double-buffered
T{ depth-bits { value 16 } }
}
CONSTANT: default-world-window-controls

View File

@ -39,5 +39,14 @@ M: nehe2-gadget draw-gadget* ( gadget -- )
-1.0 -1.0 0.0 glVertex3f
] do-state ;
MAIN-WINDOW: run2 { { title "NeHe Tutorial 2" } { pref-dim { $ width $ height } } }
MAIN-WINDOW: run2
{
{ title "NeHe Tutorial 2" }
{ pref-dim { $ width $ height } }
{ pixel-format-attributes {
windowed
double-buffered
T{ depth-bits { value 16 } }
} }
}
<nehe2-gadget> >>gadgets ;

View File

@ -68,5 +68,14 @@ M: nehe4-gadget graft* ( gadget -- )
M: nehe4-gadget ungraft* ( gadget -- )
t >>quit? drop ;
MAIN-WINDOW: run4 { { title "NeHe Tutorial 4" } { pref-dim { $ width $ height } } }
<nehe4-gadget> >>gadgets ;
MAIN-WINDOW: run4
{
{ title "NeHe Tutorial 4" }
{ pref-dim { $ width $ height } }
{ pixel-format-attributes {
windowed
double-buffered
T{ depth-bits { value 16 } }
} }
}
<nehe4-gadget> >>gadgets ;

View File

@ -120,5 +120,14 @@ M: nehe5-gadget graft* ( gadget -- )
M: nehe5-gadget ungraft* ( gadget -- )
t >>quit? drop ;
MAIN-WINDOW: run5 { { title "NeHe Tutorial 5" } { pref-dim { $ width $ height } } }
<nehe5-gadget> >>gadgets ;
MAIN-WINDOW: run4
{
{ title "NeHe Tutorial 5" }
{ pref-dim { $ width $ height } }
{ pixel-format-attributes {
windowed
double-buffered
T{ depth-bits { value 16 } }
} }
}
<nehe5-gadget> >>gadgets ;