|
@@ -16,6 +16,18 @@
|
|
|
using std::max;
|
|
using std::max;
|
|
|
using std::min;
|
|
using std::min;
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * Returns a copy of the FrameBufferProperties, but without back buffers.
|
|
|
|
|
+ * This is used since the GraphicsOutput constructor makes some decisions
|
|
|
|
|
+ * based on whether this is set, so we need to unset it early.
|
|
|
|
|
+ */
|
|
|
|
|
+static FrameBufferProperties
|
|
|
|
|
+without_back_buffers(const FrameBufferProperties &fb_prop) {
|
|
|
|
|
+ FrameBufferProperties copy(fb_prop);
|
|
|
|
|
+ copy.set_back_buffers(0);
|
|
|
|
|
+ return copy;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
TypeHandle CLP(GraphicsBuffer)::_type_handle;
|
|
TypeHandle CLP(GraphicsBuffer)::_type_handle;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -29,7 +41,7 @@ CLP(GraphicsBuffer)(GraphicsEngine *engine, GraphicsPipe *pipe,
|
|
|
int flags,
|
|
int flags,
|
|
|
GraphicsStateGuardian *gsg,
|
|
GraphicsStateGuardian *gsg,
|
|
|
GraphicsOutput *host) :
|
|
GraphicsOutput *host) :
|
|
|
- GraphicsBuffer(engine, pipe, name, fb_prop, win_prop, flags, gsg, host),
|
|
|
|
|
|
|
+ GraphicsBuffer(engine, pipe, name, without_back_buffers(fb_prop), win_prop, flags, gsg, host),
|
|
|
_bind_texture_pcollector(_draw_window_pcollector, "Bind textures"),
|
|
_bind_texture_pcollector(_draw_window_pcollector, "Bind textures"),
|
|
|
_generate_mipmap_pcollector(_draw_window_pcollector, "Generate mipmaps"),
|
|
_generate_mipmap_pcollector(_draw_window_pcollector, "Generate mipmaps"),
|
|
|
_resolve_multisample_pcollector(_draw_window_pcollector, "Resolve multisamples"),
|
|
_resolve_multisample_pcollector(_draw_window_pcollector, "Resolve multisamples"),
|