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
2018-07-31Merge branch 'master' into blender2.8Campbell Barton
2018-07-31BLF: replace global aa pref w/ monochrome flagCampbell Barton
Now disabling anti-aliasing doesn't impact sequencer, render stamp etc.
2018-07-23Fix large font drawing blurriness in a better way.Brecht Van Lommel
GPU_LINEAR is there for shadow font blurring, the real issue was lack of rounding for the batch offset.
2018-07-20Fix incorrect magnification filter for text texture.Brecht Van Lommel
Barely any visible difference, except when drawing big custom text with the Python API.
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-07-15GPU_matrix: use Blender's naming conventionsCampbell Barton
Thanks to @sergey for review
2018-07-10GPUTexture: Refactor of texture creation & new featureClément Foucault
- Texture creation now requires explicit data type. - GPU_texture_add_mipmap enable explicit mipmap upload. - GPU_texture_get_mipmap_size can be used to get the size of a mipmap level of an existing GPUTexture - GPU_texture_read let you read back data from a gpu texture.
2018-06-25Cleanup: code styleCampbell Barton
2018-06-24Fix most of 'disappearing' first letter in right-aligned labels.Bastien Montagne
BLF' blf_font_width_to_strlen() could easily generate strings with up to nearly two pixels length over requested limit! Note that the fiddling between floats and ints values make things really confusing here... :/ There is still a few limit cases where, even though computed str length is now always below reauested limit, we still get first letter disappearing, no idea why currently.
2018-06-22Blenfont: Fix texture not being initialized in recent refactor.Ray Molenkamp
Caused some gpus to have issues with the font shadows. thanks @fclem for helping tracking this one down.
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-26BLF: Fix problem with drawing with fonts with multiple size.fclem
Fix T54838 : Text display glitch w/ fonts at different sizes. This was cause by the cache not being flushed when changing font texture.
2018-04-21Cleanup: styleCampbell Barton
2018-04-16Cleanup: indentationCampbell Barton
2018-04-10BLF: Style: Fix bad casts.Clément Foucault
This could have caused overflow issue.
2018-04-10BLF: Fix broken shadows on certain hardware.Clément Foucault
This was due to uninitialized texture space.
2018-04-09BLF: Fix assert when drawing very small chars.Clément Foucault
2018-04-08BLF: Perf: Use BLF_KERNING_STEP_FAST for other functions.Clément Foucault
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-08BLF: Opti: More clever sampling for blured glyphs.Clément Foucault
Reduce the number of sampled required for blurring by using filtered texture samples. This changes the result a bit but it is not noticable.
2018-04-08BLF: Opti: Draw only one quad per shadow/blurred glyph.Clément Foucault
This port the Blurring of blf fonts to the final drawing shader. We add a bit of extra padding to each glyph so that jittering the texture coord does not sample the neighbor glyphs.
2018-04-07UI: Fix waveform widget text drawing.Clément Foucault
Flush the text cache so that we have proper scissor test and ordering.
2018-04-06UI: Perf: Use widget base batchingClément Foucault
Overall 10% more performance on general UI drawing time. This commit can introduce ordering problem on some elements. In this case you need to flush the widget cache to ensure the element that is going to be drawn is drawn on top of any widget base. To flush the cache use UI_widgetbase_draw_cache_flush. This is already done for BLF and Icons.
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: Remove debug printClément Foucault
"this is not the commit you're looking for"
2018-03-31BLF: Fix Vertical/Horizontal layout switch.Clément Foucault
This was breaking the first drawcall after a simple/non-simple shader switch.
2018-03-31BLF: Perf: Do not call FT_Set_Char_Size every time.Clément Foucault
Using FT_Set_Char_Size is slow. Calling it only when needed is more clever.
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.
2018-03-29BLF: Reduce the size of the buffer requested to IMM.Clément Foucault
There is no point to not call strlen if the number of char is large.
2018-03-29BLF: Perf: Divide by 6 the amount of verts sent to the GPU.Clément Foucault
This means smaller imm buffer usage. This does not reduce the number of drawcalls. This uses geometry shader which is slow for the GPU but given we are really CPU bound on this case, it should not matter. A perfect implementation would: - Set the glyph coord in a bufferTexture and just send the glyph ID to the GPU to read the bufferTexture. - Use GWN_draw_primitive and draw 2*strllen triangle and just retrieve the glyph ID and color based on gl_VertexID / 6. - Stream fixed size buffer that the Driver can discard quickly but this is the same as improving IMM directly.
2018-03-26Merge branch 'master' into blender2.8Sergey Sharybin
2018-03-26BLF: Don't use user preferencesSergey Sharybin
BLF is a low level module, which might (and is) used without Blender. Thanks Campbell for review!
2018-03-26BLF: Cleanup, indentation inside of preprocessorSergey Sharybin
2018-03-25GPUTexture: Small refactor.Clément Foucault
This includes a few modification: - The biggest one is call glActiveTexture before doing any call to glBindTexture for rendering purpose (uniform value depends on it). This is also better to know what's going on when rendering UI. So if there is missing UI elements because of this commit look for this first. This allows us to have "less calls" to glActiveTexture (I did not measure the final count) and less checks inside GPU_texture. - Remove use of GL_TEXTURE0 as a uniform value in a few places. - Be more strict and use BLI_assert for bad usage of GPU_texture functions. - Disable filtering for integer and stencil textures (not supported by OGL specs). - Replace bools inside GPUTexture by a bitflag supporting more options to identify texture types.
2018-02-14GPU: use alpha blend that works for drawing to transparent buffer.Brecht Van Lommel
It's unlikely to ever be intentional to square the source alpha, as happens with glBlendFunc, so this changes the blending throughout the code.
2017-11-10Fix assert failure when trying to draw empty stringSergey Sharybin
2017-07-08Merge branch 'master' into blender2.8Brecht Van Lommel
2017-07-08Fix T51889: new file or load factory settings results in broken UI.Brecht Van Lommel
Fix some cases that still assumed there to be a global DPI, instead of a per window DPI that needs to be set before reading U.dpi.
2017-06-19Gawain API naming refactorCampbell Barton
Use consistent prefix for gawain API names as well as some abbreviations to avoid over-long names, see: D2678