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
Markus Mohrhard
877a4be0c3
add a OpenGLContext::init for unix backend
...
That one does not need the indirection through a Window instance to get
to the X resources that are necessary for a GLX context.
Change-Id: I3195a5f2b447172434881bd9b0b230c8992c1c87
2014-11-10 07:58:15 +01:00
Markus Mohrhard
f446172d5f
split method in part related to windows and other stuff
...
Change-Id: Ie3851bfd558ffeabd374afdc2a4d4833e3866a6e
2014-11-10 07:58:14 +01:00
Markus Mohrhard
9ceda5a90d
reduce one use of SystemWinData
...
Change-Id: I777a8e324864ab9eab2a3df3e0645910dd1478a4
2014-11-10 07:58:14 +01:00
Noel Grandin
827c46e7d7
fdo#82577: Handle Window
...
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.
Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
Matúš Kukan
ae2efbf125
WaE: 'DBG_UTIL' is not defined, evaluates to 0 [-Wundef]
...
Change-Id: I425b852dc983f7603fac88b5332650c61d9c6c3a
2014-09-08 14:18:03 +02:00
Markus Mohrhard
19be6cfc93
prevent crash with invalid XVisual, related fdo#80448
...
Change-Id: Ife020e3cbfabf0b397b189c17ffec8cbcb5d1505
2014-09-07 19:36:08 +02:00
Markus Mohrhard
c49f057550
don't crash if the new create context method is not available
...
Change-Id: I50a8b89f83e095e5d8a110dfbf81ccadea4b39a5
2014-09-03 15:09:56 +02:00
Markus Mohrhard
6f5b639d4a
don't create a core context if we need a legacy one
...
Change-Id: Ieb8a26e0495f537ca78898e6d49df2c1271537a0
2014-09-03 15:09:56 +02:00
Markus Mohrhard
2b1ad741d7
create a 3.2 core context if supported in dbgutil mode
...
Change-Id: I2ef951590d23e8b805301b2ffc1b82213b898400
2014-09-03 15:09:55 +02:00
Markus Mohrhard
979f918a87
SAL_INFO -> SAL_WARN for important error message
...
Change-Id: I204ca62f77d580b9ebdf9e7d41c28e3f2675ef94
2014-09-03 15:09:55 +02:00
Markus Mohrhard
6f479a3207
SAL_INFO -> SAL_WARN for important error message
...
Change-Id: I52cf416286801c5eebc1dd395fb7cf592b985e92
2014-09-03 15:09:55 +02:00