Fixed framework

This commit is contained in:
Josh Yelon 2006-06-07 20:15:38 +00:00
parent e8f749cf1e
commit 2408212aac
3 changed files with 9 additions and 21 deletions

View File

@ -91,23 +91,6 @@ close_gsg(GraphicsPipe *pipe, GraphicsStateGuardian *gsg) {
pipe->close_gsg(gsg);
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsEngine::make_window
// Access: Published
// Description: Syntactic shorthand for make_output
////////////////////////////////////////////////////////////////////
INLINE GraphicsWindow *GraphicsEngine::
make_window(GraphicsStateGuardian *gsg, const string &name, int sort) {
// The hardwired size here is never used.
FrameBufferProperties fbprops = FrameBufferProperties::get_default();
GraphicsOutput *result = make_output(gsg->get_pipe(), name, sort,
fbprops, 50, 50,
GraphicsPipe::BF_require_window |
GraphicsPipe::BF_fb_props_optional,
gsg, NULL);
return DCAST(GraphicsWindow, result);
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsEngine::make_buffer
// Access: Published

View File

@ -77,8 +77,6 @@ PUBLISHED:
GraphicsOutput *host = 0);
// Syntactic shorthand versions of make_output
INLINE GraphicsWindow *make_window(GraphicsStateGuardian *gsg,
const string &name, int sort);
INLINE GraphicsOutput *make_buffer(GraphicsStateGuardian *gsg,
const string &name, int sort,
int x_size, int y_size);

View File

@ -157,8 +157,15 @@ open_window(const WindowProperties &props, GraphicsEngine *engine,
next_window_index++;
string name = stream.str();
_window = engine->make_window(gsg, name, 0);
if (_window != (GraphicsWindow *)NULL) {
_window = 0;
GraphicsOutput *winout =
engine->make_output(pipe, name, 0,
FrameBufferProperties::get_default(),
100, 100, GraphicsPipe::BF_require_window,
gsg, NULL);
if (winout != (GraphicsOutput *)NULL) {
_window = DCAST(GraphicsWindow, winout);
_window->request_properties(props);
// Create a display region that covers the entire window.