mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
spicec: fix non-doublebuffer drawing
First, context must set it, then Draw/ReadBuffer must be set to FRONT, and then explicit Flush is needed. This patch is mostly for future reference, it is mostly discarded in following patch using double-buffer.
This commit is contained in:
parent
c7d1024d97
commit
fe72894bb8
@ -3224,6 +3224,7 @@ void Platform::init()
|
||||
int num_configs;
|
||||
int attrlist[] = {
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
GLX_DOUBLEBUFFER, False,
|
||||
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT | GLX_WINDOW_BIT,
|
||||
GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR,
|
||||
GLX_RED_SIZE, 8,
|
||||
|
||||
@ -85,6 +85,7 @@ static inline void copy_to_gldrawable_from_gltexture(const RedDrawable_p* dest,
|
||||
if (rendertype == RENDER_TYPE_FBO) {
|
||||
GLuint fbo;
|
||||
|
||||
glFlush();
|
||||
fbo = source->gl.fbo;
|
||||
glBindFramebuffer(GL_FRAMEBUFFER_EXT, fbo);
|
||||
} else {
|
||||
|
||||
@ -79,6 +79,8 @@ RedPixmapGL::RedPixmapGL(int width, int height, RedDrawable::Format format,
|
||||
glXDestroyContext(XPlatform::get_display(), _glcont);
|
||||
THROW("no GL_EXT_framebuffer_object extension");
|
||||
}
|
||||
glDrawBuffer(GL_FRONT);
|
||||
glReadBuffer(GL_FRONT);
|
||||
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user