Caolán McNamara
32f95a3551
V813: Decreased performance
...
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
2015-03-04 13:07:40 +00:00
Stephan Bergmann
fa50edeb72
Remove references to unused GLU
...
(after removing the one remaining use of gluErrorString in a SAL_WARN call)
Change-Id: Ib94e346d73e508e69c07deafdc690e3ae0e23d4e
2015-03-02 20:23:57 +01:00
Caolán McNamara
a1ceacc17e
boost::foo_ptr->std::foo_ptr
...
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
Riccardo Magliocchetti
b9a847b78c
Fixup --without-x build
...
Accept gl linkage in hope of future offscreen mesa support.
Avoid linking with GLX though.
Change-Id: I4e666f60e74fe34075a8da9eeba95807cf8fe38c
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com >
Reviewed-on: https://gerrit.libreoffice.org/13452
Reviewed-by: Michael Stahl <mstahl@redhat.com >
Tested-by: Michael Stahl <mstahl@redhat.com >
2015-02-07 00:01:41 +00:00
Luboš Luňák
df290c6345
make it possible to easily have variants of glsl programs
...
Now it's possible to add a preamble to the compiled program, so there can
be just one program with #ifdef's inside and the small variants can be
selected using #define in the preamble instead of having several almost
identical programs.
Change-Id: I6c5112313b91b6269ebdecdfc896e0f96209ea2b
2015-01-27 18:42:48 +01:00
Stephan Bergmann
a1ce5dab88
-Werror=unused-function
...
Change-Id: Ib4c059876ac8b66ef75a6a00f3eb8ccbfc4d5eb7
2015-01-23 15:34:03 +01:00
Markus Mohrhard
33af00a9ae
bail out early if there is no Display
...
Change-Id: I1d724ae9346a4df7207e737cf98bf0cd7293bc2b
2015-01-20 12:35:50 +01:00
Markus Mohrhard
229891d6cb
lets do that before we delete our object
...
Change-Id: I8c7166ba66f74f5c548bb6fb30dfc3d28880e9a2
2015-01-20 12:03:57 +01:00
Markus Mohrhard
145ad19643
some debug code for finding leaked OpenGLContexts
...
Change-Id: I10e8c344ae6aa2e0a4ef562154f57e2070c70e2f
2015-01-20 12:03:57 +01:00
Markus Mohrhard
99f809c7eb
I was just missing the code for the ARB version
...
Change-Id: Id1a7eef76967a9fdc5279d3c5e7694e6c6b2b907
2015-01-20 12:03:56 +01:00
Markus Mohrhard
9becabc9bd
only enable these error handlers in dbgutil builds
...
They might become expensive with our repeated calls to makeCurrent
Change-Id: I1d30460f2cad34c6ab676754682651422e545c90
2015-01-20 12:03:56 +01:00
Markus Mohrhard
8384350ee6
fix the life cycle of my RAII object
...
Change-Id: Ifcd4ab79192be965b57439062354e27af80136b3
2015-01-20 12:03:56 +01:00
Stephan Bergmann
fe9d002ef5
Some more loplugin:cstylecast: vcl
...
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
2015-01-20 09:06:54 +01:00
Markus Mohrhard
cb1af4e13b
use a special X error handler for more GLX calls
...
Change-Id: I8cafc7e106bbf9ddc790d72b9399efcf76df633e
2015-01-19 23:12:11 +01:00
Markus Mohrhard
d20092259c
no need to do that for all contexts
...
This fixes a crash as we would need to make each context current before
calling ReleaseFramebuffers.
However this is totally unnecessary as only the current context can have
bound framebuffers.
Change-Id: I8b1496bb890982742b3d2ebf60fdce47db642d70
2015-01-17 02:34:38 +01:00
Michael Meeks
0bea1d80d1
vcl: reset OpenGLContext(s) when yielding the last SolarMutex.
...
This should make OpenGL thread-safe to allow multiple threads to
render using VCL's OpenGL backend, and fix misc. associated driver
horrors, will give some performance cost for tight Yield loops.
Change-Id: Ib23702262fd9f0925a5ed8c642d0a26e92136b37
2015-01-06 16:13:30 +00:00
Markus Mohrhard
e61fe35e79
prefer ptr_container to manual memory management
...
Change-Id: I11326c2873aad5116fd70bfa31eb94e93fef3f40
2014-12-31 01:04:30 +01:00
Julien Nabet
5a4c549d32
Some cppcheck cleanings: Prefer prefix ++/-- operators for non-primitive types
...
Change-Id: I899164412ad90653b4228423283f9fbd4cb5fccc
2014-12-18 21:14:10 +01:00
Stephan Bergmann
56d479f540
vcl: Use appropriate OUString functions on string constants
...
Change-Id: I010146e9b7181d0cc704a26ae1d373794cf6facb
2014-12-18 14:12:38 +01:00
Louis-Francis Ratté-Boulianne
01bed8089a
vcl: Re-use a framebuffer of the same size when possible
...
Conflicts:
include/vcl/opengl/OpenGLContext.hxx
Change-Id: Id9c7932976ce9d9282776c20d93d9cca4d290056
2014-12-11 07:57:33 +01:00
Louis-Francis Ratté-Boulianne
2e51277309
vcl: Reset context when the backend window is destroyed
...
Conflicts:
vcl/source/opengl/OpenGLContext.cxx
Change-Id: Ie2b93de8efe5ea56b0420adf23639c0153103385
2014-12-11 07:57:31 +01:00
Markus Mohrhard
c634ef6d96
simple check to prevent crash with old drivers
...
Change-Id: Ia5cfdcae1d762ed8ee4b182c141565f20c97ec7d
2014-12-07 05:41:13 +01:00
Markus Mohrhard
2e9816e59f
prevent crash when creating the platform context failed
...
It is not a double delete. It happens when creating the platform context
fails and therefore is not added to the list.
Conflicts:
vcl/source/opengl/OpenGLContext.cxx
Change-Id: I2771da48a5d791bbf500b56d8734dd53b32f3fb7
2014-12-04 08:28:42 +01:00
Markus Mohrhard
e167148c3f
more asserts to detect double deletes
...
Change-Id: I54284d34db2446f28ba778ce26ebedb584bf2780
2014-12-04 08:28:42 +01:00
Markus Mohrhard
f542530105
add assert to detect double delete
...
Conflicts:
vcl/source/opengl/OpenGLContext.cxx
Change-Id: I13427cb698d29adb1d19b135ada91bcdfc8b8c92
2014-12-04 08:28:42 +01:00
Markus Mohrhard
64e45440ad
add more debugging output
...
Change-Id: I91be83485dcd829800ca9611ab54b19d8eae19af
2014-12-04 08:28:42 +01:00
Jan Holesovsky
6c1c191cdb
vcl: Fix Linux build.
...
Change-Id: I3b6e870dc5bcbc227b2ab02c0e622abd3f8c9a98
2014-12-03 14:24:33 +01:00
Louis-Francis Ratté-Boulianne
0a04ceca6c
vcl: Don't create new contexts for Virtual Devices on Windows
...
Change-Id: I561a8142f986aca89e796ce2c4a0902fae41f9e6
2014-12-03 14:05:34 +01:00
Markus Mohrhard
8091457a23
Revert "use boost::shared_ptr instead of manual ref counting"
...
This reverts commit 8eeb02dcc1
.
Conflicts:
include/vcl/opengl/OpenGLContext.hxx
vcl/inc/openglgdiimpl.hxx
vcl/opengl/gdiimpl.cxx
Change-Id: I85cc7a46876ffba5ab861f6dd83b07da466b212b
2014-12-02 21:52:14 +01:00
Michael Meeks
aefeef36fd
vcl: use resetToReInitialize to avoid context problems on Windows.
...
It appears that we have to do this for VirtualDevices, where we have
freed / re-allocated the underlying resource, or we fail to switch the
current context, and render to the wrong place, before blatting a
blank texture over the top of it.
Change-Id: I0253f216ea7dc9786374dc83ca38f4f6295e3035
2014-12-02 11:58:47 +01:00
Markus Mohrhard
b8a9f58ca4
request a stencil on windows
...
Change-Id: Ib8f337d80c5576380344893c49c4fa0284f1dc4b
2014-12-02 11:58:46 +01:00
Markus Mohrhard
a7b9730164
add some debug code that checks the returned pixel format
...
Change-Id: I44a1a8d97fecb7d371c4daa9888c56766087ec82
2014-12-02 11:58:45 +01:00
Louis-Francis Ratté-Boulianne
99ade27b04
vcl: Only load OpenGL shaders once for each context
...
Change-Id: Idbf9026c5e64ef41d4c913153dfddf36923ff7de
2014-12-02 11:58:45 +01:00
Louis-Francis Ratté-Boulianne
d6b51a87b4
vcl: Use the current OpenGL context for VirtualDevice and Bitmap if possible
...
Conflicts:
include/vcl/opengl/OpenGLContext.hxx
vcl/inc/openglgdiimpl.hxx
vcl/opengl/gdiimpl.cxx
vcl/opengl/x11/gdiimpl.cxx
vcl/source/opengl/OpenGLContext.cxx
Change-Id: I17f6ce66fb8b5bc027d35b4016ae56c24ee0a738
2014-12-02 08:34:51 +01:00
Markus Mohrhard
8eeb02dcc1
use boost::shared_ptr instead of manual ref counting
...
Change-Id: I3c2ed9b5641202ff965c3a0c833c8201b2b1548b
2014-12-01 07:37:06 +01:00
Michael Stahl
406883895b
vcl: prefix global variable g_vShareList
...
Change-Id: I13ecc76d8bd75ee65e626670995d7c93efc953ca
2014-11-26 16:00:41 +01:00
Michael Stahl
bfaf877421
vcl: fix STL asserts in ~OpenGLContext(), calling wrong erase() overload
...
Change-Id: Ia830ac1e70f74859dff871f24538af3f2f83fd9d
2014-11-26 16:00:02 +01:00
Caolán McNamara
83ea7e76da
coverity#1255907 Explicit null dereferenced
...
Change-Id: I5b7be6698e2028f9b882c2f7deb96739bc968098
2014-11-24 09:38:54 +00:00
Stephan Bergmann
1397b0a9e6
Unchain OpenGLContext on all platforms
...
Change-Id: I679aae23d058a4d88fac0291cabe00629fd6de65
2014-11-24 10:38:37 +01:00
Louis-Francis Ratté-Boulianne
5f86a6165b
vcl: Move the painting fence to the OpenGL context
...
Change-Id: I462e68a1ad7a56fafe57504959cf169a70665f81
2014-11-22 20:14:20 +01:00
Louis-Francis Ratté-Boulianne
e26237f6cb
vcl: Always use the same OpenGL context when drawing in a window
...
Change-Id: Ief0e947149c133aaa8e81973e088c4df6432bfdc
2014-11-22 20:14:19 +01:00
Markus Mohrhard
92e9753bd2
fix glx resource leak
...
Change-Id: I013676d2f4caa0479c917a7f833966be8f0b8009
2014-11-22 17:08:32 +01:00
Zolnai Tamás
d85b975667
OpenGLContext stopped to support multisampling under linux.
...
glTF rendering needs to have a context with multisampling
so it also became broken.
Regresssion from:
07c0396ab9
This breaker change was made assuming getVisual{Info}() is always
called after the SystemChildWindow is already created, but
generateWinData() is run as part of the new child window creation.
It's aim to choose the best visual / FBConfig which potentially support
multisampling.
Change-Id: Ic881c6769260b5eaa9fed2552eca882191f6c56d
2014-11-21 12:13:12 +01:00
Michael Meeks
9557ae7baf
vcl: update the OpenGLContext's pixmap when re-sizing a VirtualDevice.
...
Change-Id: Iee8089fc3bfbea60adee95dfb2c229f3efea28f8
2014-11-20 09:56:48 +00:00
Michael Meeks
6f5a948612
vcl: check the OpenGL drawable as well as the context.
...
Change-Id: Idac493dfb3239f7ae5b5e49158d79c4f3e707509
2014-11-18 16:13:18 +00:00
Jan Holesovsky
4bf891dbc2
windows opengl: Share the contexts as we do on Linux.
...
Change-Id: Ic58cca612cdf8f73170c18573917465bf34a187c
2014-11-18 15:44:05 +01:00
Jan Holesovsky
66b170230d
windows: Improve logging.
...
Change-Id: I15e6d240b3c94af07e9b39cc16efb581869729f2
2014-11-18 00:51:05 +01:00
Michael Meeks
414c2e2d5a
vcl: initialize data when XGetWindowAttributes fails.
...
Change-Id: If6fc99483c06efec9a600226a09ead9a3f6dab59
2014-11-17 22:40:16 +00:00
Michael Meeks
5b14cd7d8d
vcl: make OpenGLContext::makeCurrent unfeasibly faster.
...
Don't set the same context if it is already set. Apparently this is
something that is unbelievably costly on Windows, and very costly on
Linux. Instead check if the context is already set, and don't re-set it.
Change-Id: If4fed3e555e1388031446be76d6fdfde5b9f13e5
2014-11-17 21:57:49 +00:00
Stephan Bergmann
a5a307a614
warning C4702: unreachable code
...
Change-Id: Ia0c8a1dff329bedc4084c104659f7777e15183ae
2014-11-17 10:39:17 +01:00