tinybuffer for linux
This commit is contained in:
parent
12cc20f675
commit
fbc2b2b213
|
|
@ -130,10 +130,6 @@ close_buffer() {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
bool TinyGraphicsBuffer::
|
||||
open_buffer() {
|
||||
if (!GraphicsBuffer::open_buffer()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// GSG Creation/Initialization
|
||||
TinyGraphicsStateGuardian *tinygsg;
|
||||
if (_gsg == 0) {
|
||||
|
|
@ -159,6 +155,7 @@ open_buffer() {
|
|||
return false;
|
||||
}
|
||||
|
||||
_is_valid = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include "tinyXGraphicsPipe.h"
|
||||
#include "tinyXGraphicsWindow.h"
|
||||
#include "tinyGraphicsStateGuardian.h"
|
||||
#include "tinyGraphicsBuffer.h"
|
||||
#include "config_tinydisplay.h"
|
||||
#include "frameBufferProperties.h"
|
||||
|
||||
|
|
@ -200,11 +201,6 @@ make_output(const string &name,
|
|||
GraphicsOutput *host,
|
||||
int retry,
|
||||
bool &precertify) {
|
||||
|
||||
if (!_is_valid) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TinyGraphicsStateGuardian *tinygsg = 0;
|
||||
if (gsg != 0) {
|
||||
DCAST_INTO_R(tinygsg, gsg, NULL);
|
||||
|
|
@ -212,7 +208,7 @@ make_output(const string &name,
|
|||
|
||||
// First thing to try: a TinyXGraphicsWindow
|
||||
|
||||
if (retry == 0) {
|
||||
if (retry == 0 && _is_valid) {
|
||||
if (((flags&BF_require_parasite)!=0)||
|
||||
((flags&BF_refuse_window)!=0)||
|
||||
((flags&BF_resizeable)!=0)||
|
||||
|
|
@ -226,6 +222,16 @@ make_output(const string &name,
|
|||
flags, gsg, host);
|
||||
}
|
||||
|
||||
// Second thing to try: a TinyGraphicsBuffer
|
||||
if (retry == 1) {
|
||||
if ((!support_render_texture)||
|
||||
((flags&BF_require_parasite)!=0)||
|
||||
((flags&BF_require_window)!=0)) {
|
||||
return NULL;
|
||||
}
|
||||
return new TinyGraphicsBuffer(this, name, fb_prop, win_prop, flags, gsg, host);
|
||||
}
|
||||
|
||||
// Nothing else left to try.
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue