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
Julien Nabet
277a59c0e8
cppcheck: Return value of std::remove() ignored. Elements remain in container.
...
Change-Id: I1e3bcb013d27c6f9a1484c9f1e23b63f42615b9b
Reviewed-on: https://gerrit.libreoffice.org/12460
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2014-11-17 09:27:34 +00:00
Markus Mohrhard
54189d6236
use correct flag to enable ARB debug version
...
Change-Id: I933aea4f9cb1ccd58f9a07e7d32ff28077f8bb33
2014-11-16 17:25:57 +01:00
Markus Mohrhard
6cc2730eff
remove unnecessary whitespace
...
Change-Id: I0dda7886718b0e3ff81a0d6d43cca2887877ea9d
2014-11-16 17:25:18 +01:00
Jan Holesovsky
1e15058e08
windows opengl: Do not be _that_ eager with CHECK_GL_ERROR().
...
Turns out that when you call glGetError() and OpenGL is not yet set up (or
already turned down), it leads to an error; so when we check for errors in a
loop, we never recover from that ;-)
Change-Id: I849ad1dc30fc93ee1c021b446d9ad379bf9987c0
2014-11-15 14:43:42 +01:00
Jan Holesovsky
1d2c5224b2
opengl: Add many more CHECK_GL_ERROR()'s before returning from functions.
...
Change-Id: I63c147acf9a4013008b0f6d76867186f04ee57d5
2014-11-15 13:51:53 +01:00
Jan Holesovsky
6fd7199230
windows opengl: Set PFD_DOUBLEBUFFER even for single buffer rendering.
...
Otherwise I'm getting lots of errers when dealing with virtual devices...
Change-Id: I34e145817d21dfc2d30fa9ffdfedfa714467d105
2014-11-15 12:36:29 +01:00
Markus Mohrhard
a1754292bb
ialso support the ARB debug version
...
Change-Id: I247d43805ce08db49b487079aecee2a7b50277f5
2014-11-15 12:17:44 +01:00
Andrea Gelmini
da40cac540
Fix common typos. No automatic tools. Handmade…
...
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2014-11-12 11:04:11 +00:00
Louis-Francis Ratté-Boulianne
6143fa5a89
vcl: Use shared list for OpenGL contexts even with DBG_UTIL enabled
...
Change-Id: I296b3a38a362343ecf8d65aa005ecabc6858a682
2014-11-10 22:22:44 +00:00
Markus Mohrhard
6b08277cb6
fix windows compile errors in OpenGLContext
...
Change-Id: Ic1a072d340d9115a6fc110bc9f71532739985d48
2014-11-10 07:59:52 +01:00
Markus Mohrhard
a4473b85d4
use some flags found at some examples
...
At least it seems to crash much later like that.
Change-Id: Ic64550aefe963a9671ce0e485d5de14376c4963e
2014-11-10 07:59:33 +01:00
Markus Mohrhard
88cd7f366e
use GLXPixmap for VirtualDevice
...
Change-Id: I6397708f164be68bd6561a382115654f90ecd471
2014-11-10 07:59:32 +01:00
Markus Mohrhard
9f4dbce7f7
improve log messages
...
Change-Id: Ibf7d134be982122f403473380cff3b82efef8b71
2014-11-10 07:59:30 +01:00
Markus Mohrhard
e0a99afd0e
split the OpenGLContext::ImplInit method into its platform parts
...
Change-Id: I2fb8a85748497f2e9c361764e094ebf83ebeabe8
2014-11-10 07:59:29 +01:00
Markus Mohrhard
385c711e74
remove old uncommented code
...
Change-Id: I27bf3b6c812419b1a6dbaa1abb890ba89f4549ff
2014-11-10 07:59:29 +01:00
Jan Holesovsky
2dd8ae7d7b
windows opengl: Setup the OpenGL window size also on Windows.
...
Change-Id: I5020cfb86e02ac331cb8922397e8be4f7d68d15e
2014-11-10 07:59:26 +01:00
Markus Mohrhard
1c1af96459
add some of the uncommented code back
...
Change-Id: Ica3f2c597ac235b59a4e1c9d3ea99973e129db0b
2014-11-10 07:59:08 +01:00
Markus Mohrhard
3ab9950f7a
ifdef linux only code
...
Change-Id: I56b13dee13373d7fc24efa37680e9010a73f4d04
2014-11-10 07:59:07 +01:00
Markus Mohrhard
b8552cd228
prevent invalid memory access in dbgutil code
...
Change-Id: I071a9375868c1cb262c4f45871ad7d3c26bb7271
2014-11-10 07:59:04 +01:00
Louis-Francis Ratté-Boulianne
b116b4efcd
vcl: Add list of contexts sharing the same display list
...
Change-Id: Ib1bca0aaaf41140d6b9a17378094b0f20e469ebd
2014-11-10 07:59:03 +01:00
Markus Mohrhard
f909f07583
add comment to find uncommented code again
...
Change-Id: Ice2f98f2e5d16ca4bc5b103e0ffba2fb1e2e5ad0
2014-11-10 07:59:01 +01:00
Louis-Francis Ratté-Boulianne
5d236d9812
vcl: Get the OpenGL window size from the frame
...
Change-Id: Id1b62d1982e56ef073ebb4ab800356d4dee3d742
2014-11-10 07:58:55 +01:00
Markus Mohrhard
1ca250439d
support rendering to memory device contexts on Windows
...
Change-Id: I91fdd429663fae76bfe17d37de86d118621cf160
2014-11-10 07:58:49 +01:00
Markus Mohrhard
73ca9a6b71
init the OpenGL context in the windows backend
...
Change-Id: Ic4fb491c95170639015a4452f355354ad01612bc
2014-11-10 07:58:47 +01:00
Markus Mohrhard
69cae24007
use false instead of 0
...
Change-Id: I7210493b98e8ed778eeba6518dc131e63863ff67
2014-11-10 07:58:44 +01:00
Markus Mohrhard
f41f50e424
fix windows compile error
...
Change-Id: I9154cd0c0352b8807b5a5eae2444629c9cfe3d48
2014-11-10 07:58:41 +01:00
Markus Mohrhard
690de8a3ea
first step at optional single buffered OpenGL rendering
...
Change-Id: I064de6ca7d40b8e6e378a01dd39a6cd09f040b68
2014-11-10 07:58:39 +01:00
Markus Mohrhard
580574dfa4
add more log messages
...
Change-Id: Idd3d876a658ac38aa6b32a624dada6b57b021002
2014-11-10 07:58:27 +01:00
Markus Mohrhard
9e1abe9e56
cosmetic clean-up
...
Change-Id: I8a156e66bc1b0f87129dcd85d3cc98fda3ba85aa
2014-11-10 07:58:27 +01:00
Daniel Stone
07c0396ab9
OpenGLContext: Consistently select the window's visual
...
When using an FBConfig, make sure we use a config compatible with the
visual we've already created our child window for.
Also remove FBConfigs from the non-debug path, as these are only used
when creating a 3.2 context.
Change-Id: I7350f961781bdfcd2e5ca740a38f6d1b0b5474aa
2014-11-10 07:58:26 +01:00
Daniel Stone
541f5a44df
OpenGLContext: Add locking/sync around X errors
...
In order to manipulate the (global) X error handler without races, we
need to lock the X11 display, and also push an XSync through between
locking and changing the error handler, so we don't catch unrelated
errors.
Change-Id: Ic970224c98c05c6e13aadd781f8275cde5f37dd0
2014-11-10 07:58:25 +01:00
Markus Mohrhard
14b6650ff7
fix misleading log message
...
Change-Id: I8ae574a5eb1c4685abe64e6694d9a71359d6a4d1
2014-11-10 07:58:19 +01:00
Markus Mohrhard
eda233947c
that should be a SAL_WARN
...
Change-Id: I331b635c1e5518e4fd70a5b6bf5ced7cbc51782a
2014-11-10 07:58:18 +01:00