summaryrefslogtreecommitdiff
path: root/avmedia/source/opengl
AgeCommit message (Collapse)Author
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-19Related fdo#84000: Improve framerate of the models.Jan Holesovsky
This will start working when we switch to using high-precision timers. Change-Id: I2115cb3e044578bac1a30c008d787613ec81570a
2014-09-17fdo#81237: 2D OpenGL charts was upside-downZolnai Tamás
The problem is that LO drawinglayer uses a coordinate system with an origin at the top-left corner of the screen, while OpenGL uses a complete coordinate system (with all four quarters, e.g.: allows negative values). The points in LO are always positive values which means they are drawn in the first quarter of the OpenGL coordinate system which also means that the origin is at the bottom-left corner of the scene. This difference causes the flipped scene. * To solve that problem scale the projection matrix with -1.0f along the y axis. * glDisable(GL_CULL_FACE) is necessary to avoid dropping primitives after scaling with -1.0. * Since projection matrix mirrors also the textures we don't need to do that inside the ConvertBitmapExToRGBATextureBuffer() method. Change-Id: Ieba642f3e665778a12368fe50a20865ec8f73514
2014-09-02coverity#1233484 Division or modulo by float zeroCaolán McNamara
0.0001 is as good as 0 according to reading CPhysicalCamera::moveCamera Change-Id: I70649ef6246154a112db414ccf4c15fcd30ea801
2014-08-29Mirror vertically the texture bitmaps for OpenGLZolnai Tamás
In case of glTF models it saves a Mirror() call. In case of OpenGL charts it avoid flipped texts. Change-Id: I1ac980e16bcb5ba6a9a025b638aaac3b08b4aab3
2014-08-29It seems better if the caller allocates the memory for the RGBA buffer.Zolnai Tamás
For example it allows to use std::vector<> and call the method Change-Id: Id4b8e33838d358dd242d0176e42558505fa8d4a3
2014-08-29Upgrade libgltf to 0.0.1Zolnai Tamás
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-17libgltf: Append shader language version to the shader filesZolnai Tamás
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-05implement --with-system-gltfRene Engelhard
Change-Id: Ic842006b28f8043bcbbaa81ab5a20e15aa52ac82
2014-08-05Upload first official libgltf release: libgltf-0.0.0Zolnai Tamás
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-07-21fdo#81055: Crash due to inadequate checks for GL version / capabilitiesZolnai Tamás
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-17glTF: allow to move camera also by keyboard in orbit mode.Zolnai Tamás
Change-Id: Ibf16b9651988358c30d649dd937813329d0f64ec
2014-07-16fdo#81182: Resizing glTF window affects camera positionZolnai Tamás
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-14glTF: More rendering related error handlingZolnai Tamás
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-11glTF: crash after starting a model without an OpenGL windowZolnai Tamás
Change-Id: I726f4d62ab062fbd41376183f60c26d8e6cfe33e
2014-07-11glTF: Removing one model breaks an other modelZolnai Tamás
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-04glTF: camera movement constraint: use distance from the boundary boxZolnai Tamás
... instead of distance from model center position. Change-Id: I379ab5e32cc5009d0eb751c4808fecf0109d1e5a
2014-07-03glTF: improve camera movement constraintZolnai Tamás
Stop moving only on the wrong direction. Change-Id: Ic9e7f2e7814d9adcbcf707e7fb786bf17fac3125
2014-07-03glTF: constraine camera move in orbit modeZolnai Tamás
Not to get too close to / too far from the model. Too close means move into the model. Change-Id: Ie25d87c88093d4baaf98f13ab8239263b5e1bf66
2014-07-01Activate the "suspicious cast to sal_Bool" parts of loplugin:salboolStephan Bergmann
Change-Id: I78a368ef2899b2462251b45a327fc7b1f31fe764
2014-06-25glTF rendering: moving in walktrough mode is to fastZolnai Tamás
Change-Id: I2b7869c6c14b69732db864a03a2d9b6638424cf7
2014-06-25Update libgltf: new build system and various fixesZolnai Tamás
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-13glTF: Avoid segmentation fault when one of the input files can't be loadedZolnai Tamás
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-05-29OGLFrameGrabber: use reference instead of pointerZolnai Tamás
Change-Id: Id21138ce2a5d8e764407f42afa2b21464da70e45
2014-05-29OGLWindow: no need to call update after changes, timer takes care of itZolnai Tamás
Change-Id: Ifc5ecf4ec3e385293889c82a3b678a8dbcd3edbb
2014-05-29OGLWindow: remove unused zoom levelZolnai Tamás
Zooming is solved on a more sophisticated way. Change-Id: I0386ace8a3751d708ac86ff0ddf0836c79ae603f
2014-05-29Remove accidently committed lineZolnai Tamás
Change-Id: Iace701d7473e874cc8df64349b71faa4a5493d5e
2014-05-29OGLWindow: use reference instead of pointerZolnai Tamás
Change-Id: I72ef9570ac9e7b4cb4afc2319725743098722d31
2014-05-29OGLPlayer: use more assertionsZolnai Tamás
Change-Id: I0a224a90a3e99d12809d40612b1e66d7c023aebc
2014-05-27First stop the timer, then the animation.Jan Holesovsky
Change-Id: Icd5f9f4b8e1c48176fdb73c954e1c4b7d0811516
2014-05-27Use AutoTimer instead of Timer, and add some more locking.Jan Holesovsky
Change-Id: I83a99e333a6c62bf7779e3fbbcc3e5af38bb2ca5
2014-05-29OGLPlayer: handle json parsing errorZolnai Tamás
Change-Id: I86aea12318d4e21ccadd97ad2820e31bd4580c99
2014-05-29OGLPlayer: check before dereferenceZolnai Tamás
Change-Id: I4bbaf97fe8c5def441ca106c26ad312281ed352f
2014-05-28glTF rendering: workaround for camera movementsZolnai Tamás
If the glTF contains camera movement in it moving camera by keyboard didn't work very well. Change-Id: I9300a257858d4f35c2d622654a0c2fd85eedc5ed (cherry picked from commit 968b7f807561339d0083fe0aa6e893983ca60456)
2014-05-28libgltf: solve this memory leak problem on a better way 2Zolnai Tamás
Handle those cases when file loading failes. Release *.json file on a different way since it is allocated by libgltf (inside the glTFHandle). (cherry picked from commit fafc1e29c1f060c1a44361a0445300f9786ad6f4) Change-Id: Idf6c6971a8ac1b342d89dc4f61a62624183e01d0
2014-05-27glTF rendering: fix texture problemsZolnai Tamás
It seems we need mirroring. Change-Id: Id9ad7041eb09ec773e4174cb68d34a65a2c473fe
2014-05-24libgltf: Another new version.Jan Holesovsky
Change-Id: I784579717674f1caf68ad489d1a931936f6f9651
2014-05-23avmedia: remove unused code related to fast-forwardZolnai Tamás
One part of that was removed by: 55d52165df003d253d813f3ea7085f4d89fdb3ce e.g. setRate() Change-Id: Ia5def0150029c1597cd505bbaf740a42819a7c73
2014-05-23coverity#1210188 Uninitialized pointer fieldCaolán McNamara
Change-Id: Ifbf29a8601d0527695951acea57b75f25a85ed89
2014-05-21libgltf: Updated version.Jan Holesovsky
Change-Id: Ia394ff00421f495757cc2ce55e7b91bfebe715eb
2014-05-21gltf: Send delta when rotating, not absolute value.Jan Holesovsky
Change-Id: I2453132fedc9a38f43c3de4b110459ba7771d085
2014-05-21libgltf: Update to the new version.Jan Holesovsky
Change-Id: Iffc91425d4395699a1c5f18ac10f5ed065231fdf
2014-05-16OGLPlayer: comment out gltf_animation_get_timeZolnai Tamás
It leads confusing behavior. Time is not set by now because set method does not work. Change-Id: I447d07d4193e25e6916ee05ee335d4cf150380a2
2014-05-16WaE: unused parameter 'fTime'Tor Lillqvist
Change-Id: I1f44de228fe09584699a1e158c32882cd9e7eac7
2014-05-16OGLPlayer: fix playing of animation in edit modeZolnai Tamás
gltf_animation_set_time doesn't work but stops the animation. Change-Id: Ia17724c36e2007451e24f97e04a09240359ad969
2014-05-16OGLPlayer: set a timer which call redrawing to show animationZolnai Tamás
Change-Id: I7c98ba61be0510e9f86cb80fda73d18f7f7957cf
2014-05-16OGLWindow: fix key capturing issueZolnai Tamás
Sometimes the event handler parent captures the mouse moce which should grab the focus for key event handling. Change-Id: Ida1022968543059154de824fc3d026c5cecba7b3
2014-05-15OGLWindow: improve camera movement, make it fasterZolnai Tamás
By now there is no a timer which rerender the scene all the time so we need to move camera without setting time. Change-Id: Iba1bfd9b9dc87309cf83d5dcd6832f0e4cb2cd92