* [Qemu-devel] [PATCH] ui: use libexpoxy
@ 2015-05-12 13:04 Gerd Hoffmann
2015-05-12 13:10 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2015-05-12 13:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Graf, Gerd Hoffmann
libepoxy does the opengl extension handling for us.
It also is helpful for trouble-shooting as it prints nice error messages
instead of silently failing or segfaulting in case we do something
wrong, like using gl commands not supported by the current context.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
configure | 2 +-
include/ui/console.h | 3 +--
include/ui/shader.h | 5 +----
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 1f0f485..df1048a 100755
--- a/configure
+++ b/configure
@@ -3153,7 +3153,7 @@ else
fi
if test "$opengl" != "no" ; then
- opengl_pkgs="gl glesv2"
+ opengl_pkgs="gl glesv2 epoxy"
if $pkg_config $opengl_pkgs x11 && test "$have_glx" = "yes"; then
opengl_cflags="$($pkg_config --cflags $opengl_pkgs) $x11_cflags"
opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs"
diff --git a/include/ui/console.h b/include/ui/console.h
index e8b3a9e..383dec2 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -10,8 +10,7 @@
#include "qapi/error.h"
#ifdef CONFIG_OPENGL
-# include <GLES2/gl2.h>
-# include <GLES2/gl2ext.h>
+# include <epoxy/gl.h>
#endif
/* keyboard/mouse support */
diff --git a/include/ui/shader.h b/include/ui/shader.h
index 1ff926c..992cde6 100644
--- a/include/ui/shader.h
+++ b/include/ui/shader.h
@@ -1,7 +1,4 @@
-#ifdef CONFIG_OPENGL
-# include <GLES2/gl2.h>
-# include <GLES2/gl2ext.h>
-#endif
+#include <epoxy/gl.h>
void qemu_gl_run_texture_blit(GLint texture_blit_prog);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] ui: use libexpoxy
2015-05-12 13:04 [Qemu-devel] [PATCH] ui: use libexpoxy Gerd Hoffmann
@ 2015-05-12 13:10 ` Peter Maydell
2015-05-12 13:48 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2015-05-12 13:10 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers, Alexander Graf
On 12 May 2015 at 14:04, Gerd Hoffmann <kraxel@redhat.com> wrote:
> libepoxy does the opengl extension handling for us.
>
> It also is helpful for trouble-shooting as it prints nice error messages
> instead of silently failing or segfaulting in case we do something
> wrong, like using gl commands not supported by the current context.
How widely supported is this library? How long has it been around,
is it carried by all the distros, does it work ok on OSX and Windows?
I'm a bit uncertain about adding dependencies that would limit the
scope where we can provide important functionality like 3D
acceleration.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] ui: use libexpoxy
2015-05-12 13:10 ` Peter Maydell
@ 2015-05-12 13:48 ` Gerd Hoffmann
2015-05-18 13:08 ` Alexander Graf
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2015-05-12 13:48 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers, Alexander Graf
On Di, 2015-05-12 at 14:10 +0100, Peter Maydell wrote:
> On 12 May 2015 at 14:04, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > libepoxy does the opengl extension handling for us.
> >
> > It also is helpful for trouble-shooting as it prints nice error messages
> > instead of silently failing or segfaulting in case we do something
> > wrong, like using gl commands not supported by the current context.
>
> How widely supported is this library? How long has it been around,
> is it carried by all the distros, does it work ok on OSX and Windows?
>
> I'm a bit uncertain about adding dependencies that would limit the
> scope where we can provide important functionality like 3D
> acceleration.
https://github.com/anholt/libepoxy
It is relatively new (a bit more than a year old), supposed to work on
both osx and windows (didn't test myself though), and it seems to be
commonly included in distros (although newer versions only).
cheers,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] ui: use libexpoxy
2015-05-12 13:48 ` Gerd Hoffmann
@ 2015-05-18 13:08 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2015-05-18 13:08 UTC (permalink / raw)
To: Gerd Hoffmann, Peter Maydell; +Cc: QEMU Developers
On 05/12/2015 03:48 PM, Gerd Hoffmann wrote:
> On Di, 2015-05-12 at 14:10 +0100, Peter Maydell wrote:
>> On 12 May 2015 at 14:04, Gerd Hoffmann <kraxel@redhat.com> wrote:
>>> libepoxy does the opengl extension handling for us.
>>>
>>> It also is helpful for trouble-shooting as it prints nice error messages
>>> instead of silently failing or segfaulting in case we do something
>>> wrong, like using gl commands not supported by the current context.
>> How widely supported is this library? How long has it been around,
>> is it carried by all the distros, does it work ok on OSX and Windows?
>>
>> I'm a bit uncertain about adding dependencies that would limit the
>> scope where we can provide important functionality like 3D
>> acceleration.
> https://github.com/anholt/libepoxy
>
> It is relatively new (a bit more than a year old), supposed to work on
> both osx and windows (didn't test myself though), and it seems to be
> commonly included in distros (although newer versions only).
It successfully disables OpenGL support on my 12.3 installation and thus
fixes compilation there. Hooray ;).
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-18 13:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12 13:04 [Qemu-devel] [PATCH] ui: use libexpoxy Gerd Hoffmann
2015-05-12 13:10 ` Peter Maydell
2015-05-12 13:48 ` Gerd Hoffmann
2015-05-18 13:08 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).