Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-06-06UI: Ability to Print Bold and ItalicsHarley Acheson
Adds the ability to print text in bold or italics style, synthesized from a single base UI font. Differential Revision: https://developer.blender.org/D7893 Reviewed by Brecht Van Lommel
2020-05-03BLF: use 'int' for internal glyph x,y bearingCampbell Barton
These were stored as float but were originally cast from an int and were often cast back to int. Also use int pairs for dimensions values.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-27Fix T74228, T74246: Strange CharactersGermano Cavalcante
The glyph can come from a different cache.
2020-02-24BLF: Optimize text rendering and cachingGermano Cavalcante
The current code allocates and transfers a lot of memory to the GPU, but only a small portion of this memory is actually used. In addition, the code calls many costly gl operations during the caching process. This commit significantly reduce the amount of memory by allocating and transferring a flat array without pads to the GPU. It also calls as little as possible the gl operations during the cache. This code also simulate a billinear filter `GL_LINEAR` using a 1D texture. **Average drawing time:** |before:|0.00003184 sec |now:|0.00001943 sec |fac:|1.6385156675048407 **5 worst times:** |before:|[0.001075, 0.001433, 0.002143, 0.002915, 0.003242] |now:|[0.00094, 0.000993, 0.001502, 0.002284, 0.002328] Differential Revision: https://developer.blender.org/D6886
2019-10-17Cleanup: spellingCampbell Barton
Also remove historic bftgl reference.
2019-09-14BLF: make library glyph cache handling thread-safeRichard Antalik
Functions that utilize glyph cache should lock and unlock cache by calling `blf_glyph_cache_acquire()` and `blf_glyph_cache_release()`. Function `blf_glyph_cache_acquire()` will create glyph cache, if it doesn't exist. Locking mutex is global and shared by all fonts. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5701
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-14Add font selection to VSE text stripsRichard Antalik
Allows users to select a font for text strips in the video sequence editor. Related: 3610f1fc43d0 Sequencer: refactor clipboard copy to no longer increase user count. Reviewed by: Brecht Differential Revision: https://developer.blender.org/D3621
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-18GWN: Port to GPU module: Move files to GPUClément Foucault
This does not include all the struct and type renaming. Only files were renamed. gwn_batch.c/h was fusioned with GPU_batch.c/h gwn_immediate.c/h was fusioned with GPU_immediate.c/h gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-06-22Cleanup: styleCampbell Barton
2018-06-22GLRefactor: Refactor bf_blenfont to use GPUTexture instead of raw GL calls ↵Ray Molenkamp
and types. In an effort to centralize all opengl calls in the codebase, this patch replaces the raw opengl calls in bf_blenfont with GPUTexture so it's no longer depended on opengl headers. reviewer: Brecht Differential Revision: https://developer.blender.org/D3483
2018-06-08Merge branch 'master' into blender2.8Campbell Barton
2018-06-08Cleanup: trailing spaceCampbell Barton
Remove from blender/nodes, collada, blenfont & render.
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-04-21Cleanup: styleCampbell Barton
2018-04-08BLF: Fix problem with bound texture.Clément Foucault
Previous code was assuming that the glyph texture would remain bound to GL_TEXTURE0 until the cache would be drawn. This is not always the case, so better save the texture and rebind it before drawing.
2018-04-01Merge branch 'master' into blender2.8Campbell Barton
- Undo that changes modes currently asserts, since undo is now screen data. Most likely we will change how object mode and workspaces work since it's not practical/maintainable at the moment. - Removed view_layer from particle settings (wasn't needed and complicated undo).
2018-03-31BLF: Perf: Add a kerning cache table for ascii chars.Clément Foucault
This adds less than a megabyte of mem usage. FT_Get_Kerning was the 2nd hotspot when profilling. This commit completly remove this cost. One concern though: I don't know if the kerning data is constant for every sizes but it seems to be the case. I tested different fonts at different dpi scalling and saw no differences.
2018-03-31Cleanup: blf internal struct namingCampbell Barton
- use x/y/width/height/max as a suffix. - replace 'num' prefix /w 'len' suffix.
2018-03-31Cleanup: BLF batch drawing namingCampbell Barton
- batching -> batch_draw. - ct & size -> len. - start/end -> begin/end (follow GL convention).
2018-03-30BFL: Fix broken vertical texts.Clément Foucault
I've made a separate version of the geom shader that works with full 3D modelviewmat. This commit also includes some fixup inside blf_batching_start().
2018-03-30BLF: Add Batching capabilities.Clément Foucault
You can now use BLF_batching_start and BLF_batching_end to batch every drawcall to BLF together minimizing the overhead introduced by BLF and the opengl driver. These calls cannot be nested (for now). If the modelview matrix changes, previously batched calls are issued and a the process resume with the new matrix. However the projection matrix MUST not change and gl scissors as well.
2018-03-30BLF: Use Batch API instead of IMM.Clément Foucault
This is not a perfect win just yet. It's now calling glBufferSubData for every call (instead of using glMapBufferRange which is almost faster), but with this system we will be able to batch drawcalls together. See next commit.
2016-10-16Cleanup: Quiet warnings, use RAD2DEG macroJulian Eisel
2016-10-16BLF/OpenGL: more text drawing optimizationMike Erwin
Make color values compact. Set color once per primitive. Use new immSkipAttrib to avoid useless color copies. All of this should make text drawing less CPU hungry.
2016-10-16BLF: make blurry text an optional (disabled) featureMike Erwin
While trying to simplify text drawing, noticed no Blender code uses the blur feature. Hopefully scripts don't use it!
2015-12-15use float (not double) for font matrixMike Erwin
Following up on recent double --> float commits in the game engine.
2015-09-18BLF: initial word-wrap supportCampbell Barton
- Adds support for word wrapping to Blender's BLF font library. - Splits lines when width limit is reached or on explicit \n newlines. Details: - Word wrapping is used when `BLF_WORD_WRAP` flag is enabled. - There is a single loop to handle line wrapping, this runs callback, passing in a substring, this way we can avoid code-duplication for all word-wrapped versions of functions... OR... avoid having to add support for word-wrapping directly into each function. - The `ResultBLF` struct was added to be able to get the number of wrapped lines, when calling otherwise unrelated functions such as `BLF_draw/BLF_width/BLF_boundbox`, which can be passed as the last argument to `BLF_*_ex()` functions. - The `ResultBLF` struct is used to store the result of drawing (currently only the number of lines wrapped, and the width).
2015-04-08BLF: use regular unsigned int'sCampbell Barton
So GL isnt needed to include BLF types.
2014-07-16BLF: avoid float/int conversion drawing glyphsCampbell Barton
also use UNLIKELY for error cases
2013-09-01move strict compiler checks into a header so its easier to manage in one ↵Campbell Barton
place (pragmas were copied around). also enable more strict warnings for BLF (which had some incorrect casts).
2013-06-28Fix #35884: crash opening .blend with generated color grid image and preview ↵Brecht Van Lommel
render. Printing text on the color grid image would initialize font glyphs from a thread at the same time as the UI, causing conflicts. The freetype glyph renderer needs to be mutex locked because it uses a shared buffer internally even when rendering for different fonts. Also needed to change the image generate function to use the render monospace font to avoid conflicts in blenfont. What's still weak in the blenfont API is that there is no distinction between a font and a thread using that font to render with some particular size, style, etc.
2013-05-12quiet sign conversion warnings and reduce sign conversion for BLI_string, ↵Campbell Barton
and BLF.
2013-02-21use radians for BLF_rotationCampbell Barton
2012-09-15Color Management, Stage 2: Switch color pipeline to use OpenColorIOSergey Sharybin
Replace old color pipeline which was supporting linear/sRGB color spaces only with OpenColorIO-based pipeline. This introduces two configurable color spaces: - Input color space for images and movie clips. This space is used to convert images/movies from color space in which file is saved to Blender's linear space (for float images, byte images are not internally converted, only input space is stored for such images and used later). This setting could be found in image/clip data block settings. - Display color space which defines space in which particular display is working. This settings could be found in scene's Color Management panel. When render result is being displayed on the screen, apart from converting image to display space, some additional conversions could happen. This conversions are: - View, which defines tone curve applying before display transformation. These are different ways to view the image on the same display device. For example it could be used to emulate film view on sRGB display. - Exposure affects on image exposure before tone map is applied. - Gamma is post-display gamma correction, could be used to match particular display gamma. - RGB curves are user-defined curves which are applying before display transformation, could be used for different purposes. All this settings by default are only applying on render result and does not affect on other images. If some particular image needs to be affected by this transformation, "View as Render" setting of image data block should be set to truth. Movie clips are always affected by all display transformations. This commit also introduces configurable color space in which sequencer is working. This setting could be found in scene's Color Management panel and it should be used if such stuff as grading needs to be done in color space different from sRGB (i.e. when Film view on sRGB display is use, using VD16 space as sequencer's internal space would make grading working in space which is close to the space using for display). Some technical notes: - Image buffer's float buffer is now always in linear space, even if it was created from 16bit byte images. - Space of byte buffer is stored in image buffer's rect_colorspace property. - Profile of image buffer was removed since it's not longer meaningful. - OpenGL and GLSL is supposed to always work in sRGB space. It is possible to support other spaces, but it's quite large project which isn't so much important. - Legacy Color Management option disabled is emulated by using None display. It could have some regressions, but there's no clear way to avoid them. - If OpenColorIO is disabled on build time, it should make blender behaving in the same way as previous release with color management enabled. More details could be found at this page (more details would be added soon): http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management -- Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO integration and to Brecht van Lommel for some further development and code/ usecase review!
2012-08-13fix [#32126] STAMP: Setting a background color causes color flickerCampbell Barton
when rendering the sequencer can output float or char buffers which stamp wasn't accounting for.
2012-08-13fix for stamp text drawing into a color buffer not taking color management ↵Campbell Barton
into account.
2012-05-04Renamed "fake" OpenGL identifiers.Jason Wilkins
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool. Most of these were in comments so I just rephrased the comments. There were a couple of static functions/macros that were easy enough to rename. Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-09-17Speedup for font drawing, every letter was character was calling:Campbell Barton
glGetIntegerv(GL_TEXTURE_2D_BINDING_EXT, &cur_tex); ... with shadow enabled glGetFloatv(GL_CURRENT_COLOR, color) was called twice per character as well. Now only call glGetFloatv(GL_CURRENT_COLOR, ...) once per string and only when drawing with shadow or blur, texture bind is stored in the font. Gives 8% overall FPS speedup when displaying heavy UI in my test.
2011-09-12fix for changing font sizes with recent utf8 speedupCampbell Barton
2011-04-30fix [#27221] stamp text bug in lower linesCampbell Barton