Commit Graph

685 Commits

Author SHA1 Message Date
4edb725ebb coverity#1233484 Division or modulo by float zero
0.0001 is as good as 0 according to reading
CPhysicalCamera::moveCamera

Change-Id: I70649ef6246154a112db414ccf4c15fcd30ea801
2014-09-02 12:14:44 +01:00
1ba10b7b30 fix build
Change-Id: I13c67763ec3cb940292199f3e9e0f3942446959f
2014-09-02 01:08:55 +02:00
cde22222cf Mirror vertically the texture bitmaps for OpenGL
In case of glTF models it saves a Mirror() call.
In case of OpenGL charts it avoid flipped texts.

Change-Id: I1ac980e16bcb5ba6a9a025b638aaac3b08b4aab3
2014-08-29 17:40:28 +02:00
f71aae7501 It seems better if the caller allocates the memory for the RGBA buffer.
For example it allows to use std::vector<> and call the method

Change-Id: Id4b8e33838d358dd242d0176e42558505fa8d4a3
2014-08-29 17:40:28 +02:00
a60cc58021 Upgrade libgltf to 0.0.1
News in this version:
- Solve some limitations of walkthrough mode (fdo#81425)
- Multisampling (better rendering quality, mainly at the edges)
- Better error handling (no crash in case of invalid input file)

Change-Id: I46fdf56b00476614487fbcc04178e43e33a01794
Reviewed-on: https://gerrit.libreoffice.org/11179
Reviewed-by: Zolnai Tamás <tamas.zolnai@collabora.com>
Tested-by: Zolnai Tamás <tamas.zolnai@collabora.com>
2014-08-29 05:01:31 -05:00
f43d50d1e4 fdo#82994: added missing media extensions
Change-Id: Ibbce02b43192fd3afb4984f5f38251a518d7be06
Reviewed-on: https://gerrit.libreoffice.org/11172
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-08-28 08:12:33 -05:00
57a4337e25 set names on a bunch more threads...
Change-Id: I4c2f2f0bcce52839033876ec991529721e06a3c8
2014-08-25 13:21:59 +02:00
30ae83c268 fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.

Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-23 22:33:30 +03:00
7e2b9fa213 Remove some useless tools/debug.hxx includes
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h
header was necessary in some cases because of a macro or a typedef that was needed.

Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9
Reviewed-on: https://gerrit.libreoffice.org/11075
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-22 16:33:18 -05:00
e50bcaf729 STRING -> String
Change-Id: I084d99fdd1a34842178b59c17ab108750f7bd11d
2014-08-18 04:31:05 +02:00
c67026f270 libgltf: Append shader language version to the shader files
In general glTF shader files does not contain version
directives and in some case it make shader compiler
using GLSL 1.1 which leads to that the shader compiler
fails.
So we need to append the choosen version number which is
GLSL 1.3 in case of libgltf, but this also means that
from that point OpenGL 3.0 is the new reuirements since
GLSL 1.3 is available only from that version.

Change-Id: Ic4382266432ea474aeb3e603b32a998b9aeed280
2014-08-17 09:26:33 +02:00
1138301714 ErrorBox AVMEDIA_ERR_URL to String
Change-Id: Id897c62fbfe9728bef2264769871aade8c82dbdb
2014-08-15 23:30:20 +02:00
eb21b6827e Related: rhbz#1130264 plausible fix for reported crash
Change-Id: I4ccdf19bfc7986881f7022109f22f47a0f493591
2014-08-15 16:00:35 +01:00
191f0944fd Handle collada libraries seperately: --disable-collada
Depends on gltf support.

Change-Id: Ief0452da3d03b0ddbca45272e5f5cd268691aeca
2014-08-07 15:42:57 +02:00
97bda8e081 implement --with-system-gltf
Change-Id: Ic842006b28f8043bcbbaa81ab5a20e15aa52ac82
2014-08-05 20:06:17 +02:00
48d1f86071 Upload first official libgltf release: libgltf-0.0.0
News relative to previous draft version:
- Memory management improvements (fdo#81180)
- Reduced OpenGL requirements (version 3.3 -> version 3.0)
- Cleaned up API

Change-Id: Ie3caf8684a9f5e6a872a1ac35beafb94df03bcf5
Reviewed-on: https://gerrit.libreoffice.org/10744
Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com>
Tested-by: Zolnai Tamás <zolnaitamas2000@gmail.com>
2014-08-05 08:21:59 +00:00
8cc566a536 avmedia/gstreamer: use GST_SECOND
use GST_SECOND instead of magic value

Change-Id: I992ecbab458f113a75658b1ff69df60068324509
Reviewed-on: https://gerrit.libreoffice.org/10705
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-03 07:41:49 +00:00
7e018afaf7 simplify return argument of SfxPoolItem::GetPresentation
since all two of the actual call-sites only care about whether
it is a valid presentation or not, not what kind of presentation it is.

Change-Id: I75717c88878d37b2897741b0c833ff283b3fee59
2014-07-29 11:04:01 +02:00
378b1d24a9 fdo#81055: Crash due to inadequate checks for GL version / capabilities
Base line is OpenGL 2.1 + extensions:

GL_ARB_framebuffer_object (part of OpenGL 3.0) for
glGenFramebuffers, glGenRenderbuffers...

GL_ARB_vertex_array_object (part of OpenGL 3.0) for
glGenVertexArrays, glBindVertexArray...

GL_ARB_sampler_objects (part of OpenGL 3.3) for
glGenSamplers, glBindSampler...

Change-Id: Ib8acf41ab85cd1677d0341719b3a5b4f743ed756
2014-07-21 13:00:08 +02:00
df5202ff19 Avoid a warning, return early on empty URL.
Change-Id: Ie4eb55fa52ee97eb98a5269658ce5183a287618b
2014-07-20 09:54:05 +02:00
9e8dbd37c4 glTF: allow to move camera also by keyboard in orbit mode.
Change-Id: Ibf16b9651988358c30d649dd937813329d0f64ec
2014-07-17 16:21:02 +02:00
51ba2df1cb fdo#81182: Resizing glTF window affects camera position
Camera moves by click and drag, with checking the last mouse
position we can make sure click was done inside the window
before drag.
Resizing can trigger drag event, but not click event.

Change-Id: I9e8b70fcb4a0abf26e76e03cafd026f940eceb10
2014-07-16 14:49:02 +02:00
58fd5a6dd6 glTF: More rendering related error handling
If any error occurs related to glTF rendering, a question
mark is displayed at the place of the OpenGL window
(Question mark is a general concept of media objects).

Change-Id: Id7df5a47a4dd6832e640b3a7cb3c7712ebfb4408
2014-07-14 10:40:57 +02:00
6174152cff glTF: crash after starting a model without an OpenGL window
Change-Id: I726f4d62ab062fbd41376183f60c26d8e6cfe33e
2014-07-11 11:23:36 +02:00
30fcee6ce5 glTF: Removing one model breaks an other model
Reproduce:
- Insert two models
- Play first model
- Delete second model
Result: crash (windows) or first model disappear from the
opengl window (linux).

Change-Id: I940960754f42a2e4faf5b9f37c0d4a3c155e4650
2014-07-11 11:23:29 +02:00
2946c7c627 glTF: camera movement constraint: use distance from the boundary box
... instead of distance from model center position.

Change-Id: I379ab5e32cc5009d0eb751c4808fecf0109d1e5a
2014-07-04 13:21:58 +02:00
09fe9db466 glTF: improve camera movement constraint
Stop moving only on the wrong direction.

Change-Id: Ic9e7f2e7814d9adcbcf707e7fb786bf17fac3125
2014-07-03 18:10:29 +02:00
9a670eb493 glTF: constraine camera move in orbit mode
Not to get too close to / too far from the model.
Too close means move into the model.

Change-Id: Ie25d87c88093d4baaf98f13ab8239263b5e1bf66
2014-07-03 16:28:20 +02:00
0b3a918860 Remove obsolete comment
Change-Id: I0cc592b245871187dd41e85be8c86e6e7878181b
2014-07-03 16:28:20 +02:00
4776da791f avmedia: sal_Bool -> bool
Change-Id: Ief9b2cc517e9c0666e656737cee9a953c676a1d9
2014-07-01 23:31:39 +02:00
9263b101c3 Activate the "suspicious cast to sal_Bool" parts of loplugin:salbool
Change-Id: I78a368ef2899b2462251b45a327fc7b1f31fe764
2014-07-01 17:49:10 +02:00
f2b5ece0ca glTF rendering: moving in walktrough mode is to fast
Change-Id: I2b7869c6c14b69732db864a03a2d9b6638424cf7
2014-06-25 17:29:52 +02:00
6403f2b59b Update libgltf: new build system and various fixes
Building:
- The new tarball has reasonable build system so
build libgltf as external package instead of compiling
source files directly.
- Freetype dependancy is removed

Improvements comes with the new libgltf
- Can rotate the models too (orbit mode)
- Two camera handling mode: walkthrough and orbit
(press M to change).
- gltf_animation_set_time() works
- FPS can be displayed without freetype (press F)

Additional notes:
- There were some bugs/regressions which are fixed
during the integration (see patches).
- License files are uddated now.
- libgltf building is enabled only on those platforms
on which gltf support actually works (windows and linux)

Change-Id: Ia6c9c4da53a9b4fedba0d73aa5791489f8ad424b
Reviewed-on: https://gerrit.libreoffice.org/9895
Reviewed-by: Zolnai Tamás <zolnaitamas2000@gmail.com>
Tested-by: Zolnai Tamás <zolnaitamas2000@gmail.com>
2014-06-25 13:22:29 +00:00
9ee69cbd6f glTF export: Use plural folder names
Change-Id: If17628395ede512c00b666efc5511d9711edfb5a
2014-06-16 12:58:52 +02:00
3d300f1e86 kmz2gltf: Use LO's ZipFileAccess to unzip kmz
Instead of this hacky collada2gltf patch.

Change-Id: I9f15c4ee1c9ea1a1a64116691b12b696c1d63ac5
2014-06-13 00:23:42 +02:00
6904c836b2 glTF: Avoid segmentation fault when one of the input files can't be loaded
libgltf: Parser releases the glTFHandle, but it was not connected to
the corresponding handle by RenderScene::initScene. So when rendering
stopped during file loading because of missing file, Parser's handle
member was an uninitialized pointer so it crashed by calling release
method.

Change-Id: I80099195341766f474143014d5949703d47a6fd8
2014-06-13 00:23:37 +02:00
573ced4087 Extract kmz and collada converter code to a seperate function
Plus fix some problems related to temp files.
e.g. kmz converter was creating temp files next
to the input file.

Change-Id: Ib3f367fe1c4ef3cb25f5ca1c3d06b2dde78c5e45
2014-06-13 00:20:36 +02:00
e8fcf1153f Change glTF mime type: {application -> model}/vnd.gltf+json
There is no an accepted mime type for glTF models yet, so
follow collada's mime type: model/vnd.collada+xml.

Change-Id: I1e23a95dbb0caea781dade819f8e08235cb5c1dc
2014-06-12 21:43:36 +02:00
fe70101856 Introduce HAVE_FEATURE_GLTF to enable/disable gltf related code
When it is a release build then enable it only on Windows and
Linux.

Change-Id: I7c462aeb75e6ab60eeaa0fa42ca7853a6369b742
2014-06-12 21:43:35 +02:00
54b85bf51e fdo#68849: Add header guards to all include files
Added header guards to files in directories avmedia/, basegfx/, chart2/, and
connectivity/

Change-Id: I94ec438ec918ccef1c518edfd9ab4944e9e2961b
Reviewed-on: https://gerrit.libreoffice.org/9555
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-30 01:43:33 -05:00
1f1c3b2966 OGLFrameGrabber: use reference instead of pointer
Change-Id: Id21138ce2a5d8e764407f42afa2b21464da70e45
2014-05-29 15:05:28 +02:00
c90a742ed5 OGLWindow: no need to call update after changes, timer takes care of it
Change-Id: Ifc5ecf4ec3e385293889c82a3b678a8dbcd3edbb
2014-05-29 15:05:28 +02:00
cd0ff1b3c2 OGLWindow: remove unused zoom level
Zooming is solved on a more sophisticated way.

Change-Id: I0386ace8a3751d708ac86ff0ddf0836c79ae603f
2014-05-29 14:42:29 +02:00
de6a216663 Remove accidently committed line
Change-Id: Iace701d7473e874cc8df64349b71faa4a5493d5e
2014-05-29 13:28:24 +02:00
0bff18c4ec OGLWindow: use reference instead of pointer
Change-Id: I72ef9570ac9e7b4cb4afc2319725743098722d31
2014-05-29 13:25:00 +02:00
c1e1576dc0 OGLPlayer: use more assertions
Change-Id: I0a224a90a3e99d12809d40612b1e66d7c023aebc
2014-05-29 13:24:34 +02:00
3453273086 First stop the timer, then the animation.
Change-Id: Icd5f9f4b8e1c48176fdb73c954e1c4b7d0811516
2014-05-27 14:54:24 +02:00
91fb0866ca Use AutoTimer instead of Timer, and add some more locking.
Change-Id: I83a99e333a6c62bf7779e3fbbcc3e5af38bb2ca5
2014-05-27 14:54:24 +02:00
0e54f1266d OGLPlayer: handle json parsing error
Change-Id: I86aea12318d4e21ccadd97ad2820e31bd4580c99
2014-05-29 05:50:02 +02:00
228c509996 OGLPlayer: check before dereference
Change-Id: I4bbaf97fe8c5def441ca106c26ad312281ed352f
2014-05-29 05:50:02 +02:00