|
|
@@ -108,8 +108,9 @@ pipe_constructor() {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
PT(GraphicsOutput) wglGraphicsPipe::
|
|
|
make_output(const string &name,
|
|
|
- const FrameBufferProperties &properties,
|
|
|
- int x_size, int y_size, int flags,
|
|
|
+ const FrameBufferProperties &fb_prop,
|
|
|
+ const WindowProperties &win_prop,
|
|
|
+ int flags,
|
|
|
GraphicsStateGuardian *gsg,
|
|
|
GraphicsOutput *host,
|
|
|
int retry,
|
|
|
@@ -136,14 +137,14 @@ make_output(const string &name,
|
|
|
return NULL;
|
|
|
}
|
|
|
if ((flags & BF_fb_props_optional)==0) {
|
|
|
- if ((properties.get_aux_rgba() > 0)||
|
|
|
- (properties.get_aux_hrgba() > 0)||
|
|
|
- (properties.get_aux_float() > 0)) {
|
|
|
+ if ((fb_prop.get_aux_rgba() > 0)||
|
|
|
+ (fb_prop.get_aux_hrgba() > 0)||
|
|
|
+ (fb_prop.get_aux_float() > 0)) {
|
|
|
return NULL;
|
|
|
}
|
|
|
}
|
|
|
- return new wglGraphicsWindow(this, name, properties,
|
|
|
- x_size, y_size, flags, gsg, host);
|
|
|
+ return new wglGraphicsWindow(this, name, fb_prop, win_prop,
|
|
|
+ flags, gsg, host);
|
|
|
}
|
|
|
|
|
|
// Second thing to try: a GLGraphicsBuffer
|
|
|
@@ -159,10 +160,10 @@ make_output(const string &name,
|
|
|
// Early failure - if we are sure that this buffer WONT
|
|
|
// meet specs, we can bail out early.
|
|
|
if ((flags & BF_fb_props_optional)==0) {
|
|
|
- if ((properties.get_indexed_color() > 0)||
|
|
|
- (properties.get_back_buffers() > 0)||
|
|
|
- (properties.get_accum_bits() > 0)||
|
|
|
- (properties.get_multisamples() > 0)) {
|
|
|
+ if ((fb_prop.get_indexed_color() > 0)||
|
|
|
+ (fb_prop.get_back_buffers() > 0)||
|
|
|
+ (fb_prop.get_accum_bits() > 0)||
|
|
|
+ (fb_prop.get_multisamples() > 0)) {
|
|
|
return NULL;
|
|
|
}
|
|
|
}
|
|
|
@@ -173,11 +174,11 @@ make_output(const string &name,
|
|
|
(!wglgsg->needs_reset()) &&
|
|
|
(wglgsg->_supports_framebuffer_object) &&
|
|
|
(wglgsg->_glDrawBuffers != 0)&&
|
|
|
- (properties.is_basic())) {
|
|
|
+ (fb_prop.is_basic())) {
|
|
|
precertify = true;
|
|
|
}
|
|
|
- return new GLGraphicsBuffer(this, name, properties,
|
|
|
- x_size, y_size, flags, gsg, host);
|
|
|
+ return new GLGraphicsBuffer(this, name, fb_prop, win_prop,
|
|
|
+ flags, gsg, host);
|
|
|
}
|
|
|
|
|
|
// Third thing to try: a wglGraphicsBuffer
|
|
|
@@ -193,9 +194,9 @@ make_output(const string &name,
|
|
|
// Early failure - if we are sure that this buffer WONT
|
|
|
// meet specs, we can bail out early.
|
|
|
if ((flags & BF_fb_props_optional) == 0) {
|
|
|
- if ((properties.get_aux_rgba() > 0)||
|
|
|
- (properties.get_aux_rgba() > 0)||
|
|
|
- (properties.get_aux_float() > 0)) {
|
|
|
+ if ((fb_prop.get_aux_rgba() > 0)||
|
|
|
+ (fb_prop.get_aux_rgba() > 0)||
|
|
|
+ (fb_prop.get_aux_float() > 0)) {
|
|
|
return NULL;
|
|
|
}
|
|
|
}
|
|
|
@@ -205,12 +206,12 @@ make_output(const string &name,
|
|
|
(wglgsg->is_valid()) &&
|
|
|
(!wglgsg->needs_reset()) &&
|
|
|
(wglgsg->pfnum_supports_pbuffer()) &&
|
|
|
- (wglgsg->get_fb_properties().subsumes(properties))&&
|
|
|
+ (wglgsg->get_fb_properties().subsumes(fb_prop))&&
|
|
|
(wglgsg->get_fb_properties().is_single_buffered())) {
|
|
|
precertify = true;
|
|
|
}
|
|
|
- return new wglGraphicsBuffer(this, name, properties,
|
|
|
- x_size, y_size, flags, gsg, host);
|
|
|
+ return new wglGraphicsBuffer(this, name, fb_prop, win_prop,
|
|
|
+ flags, gsg, host);
|
|
|
}
|
|
|
|
|
|
// Nothing else left to try.
|