84 lines
2.7 KiB
Diff
84 lines
2.7 KiB
Diff
From db579d802c7de4ab563cf8b4a4c4a73c39d6737d Mon Sep 17 00:00:00 2001
|
|
From: ptitSeb <sebastien.chev@gmail.com>
|
|
Date: Sat, 11 Jul 2020 18:06:04 +0200
|
|
Subject: [PATCH 003/233] Try to improve a bit LIBGL_FB=3 handling
|
|
|
|
---
|
|
src/gl/gl4es.c | 4 ++--
|
|
src/glx/glx.c | 9 +++++----
|
|
2 files changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/gl/gl4es.c b/src/gl/gl4es.c
|
|
index 5e7a3308..a2141da0 100755
|
|
--- a/src/gl/gl4es.c
|
|
+++ b/src/gl/gl4es.c
|
|
@@ -999,7 +999,7 @@ void gl4es_flush() {
|
|
}
|
|
|
|
#ifndef NOX11
|
|
-extern void BlitEmulatedPixmap();
|
|
+extern void BlitEmulatedPixmap(int win);
|
|
#endif
|
|
void gl4es_glFlush() {
|
|
LOAD_GLES(glFlush);
|
|
@@ -1013,7 +1013,7 @@ void gl4es_glFlush() {
|
|
|
|
#ifndef NOX11
|
|
if(glstate->emulatedPixmap && !glstate->emulatedWin)
|
|
- BlitEmulatedPixmap();
|
|
+ BlitEmulatedPixmap(0);
|
|
#endif
|
|
}
|
|
void glFlush() AliasExport("gl4es_glFlush");
|
|
diff --git a/src/glx/glx.c b/src/glx/glx.c
|
|
index aae0b365..7d46ec81 100755
|
|
--- a/src/glx/glx.c
|
|
+++ b/src/glx/glx.c
|
|
@@ -90,7 +90,7 @@ typedef struct {
|
|
Display *dpy;
|
|
int Type;
|
|
GC gc;
|
|
- XImage* frame;
|
|
+ XImage* frame;
|
|
} glx_buffSize;
|
|
|
|
//PBuffer should work under ANDROID / NOX11
|
|
@@ -113,7 +113,7 @@ static void delPBuffer(int j)
|
|
pbuffersize[j].Context = NULL;
|
|
// should pack, but I think it's useless for common use
|
|
}
|
|
-void BlitEmulatedPixmap();
|
|
+void BlitEmulatedPixmap(int win);
|
|
int createPBuffer(Display * dpy, const EGLint * egl_attribs, EGLSurface* Surface, EGLContext* Context, EGLConfig* Config, int redBits, int greenBits, int blueBits, int alphaBits, int samplebuffers, int samples);
|
|
GLXPbuffer addPixBuffer(Display *dpy, EGLSurface surface, EGLConfig Config, int Width, int Height, EGLContext Context, Pixmap pixmap, int depth, int emulated);
|
|
|
|
@@ -1454,7 +1454,7 @@ void gl4es_glXSwapBuffers(Display *display,
|
|
if(PBuffer && glstate->emulatedPixmap) {
|
|
LOAD_GLES(glFinish);
|
|
gles_glFinish();
|
|
- BlitEmulatedPixmap();
|
|
+ BlitEmulatedPixmap(drawable);
|
|
} else
|
|
egl_eglSwapBuffers(eglDisplay, surface);
|
|
//CheckEGLErrors(); // not sure it's a good thing to call a eglGetError() after all eglSwapBuffers, performance wize (plus result is discarded anyway)
|
|
@@ -2683,7 +2683,7 @@ const int sbuf = Width * Height * (Depth==16?2:4);
|
|
XPutImage(dpy, drawable, gc, frame, 0, 0, 0, 0, Width, Height);
|
|
}
|
|
|
|
-void BlitEmulatedPixmap() {
|
|
+void BlitEmulatedPixmap(int win) {
|
|
if(!glstate->emulatedPixmap)
|
|
return;
|
|
|
|
@@ -2703,6 +2703,7 @@ void BlitEmulatedPixmap() {
|
|
|
|
// grab the size of the drawable if it has changed
|
|
if(reverse) {
|
|
+ drawable = (Pixmap)win;
|
|
// Get Window size and all...
|
|
unsigned int width, height, border, depth;
|
|
Window root;
|
|
--
|
|
2.11.0
|
|
|