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
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/OpenGL: accurate vertex count for drawingMike Erwin
We still need to BeginAtMost instead of simple Begin, since some glyphs could be clipped & not drawn.
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!
2016-10-15BLF: early exit when drawing empty stringsMike Erwin
Avoids all kinds of setup & preparations to draw nothing.
2016-10-15BLF: fix crash on text input fieldsMike Erwin
Some strings have known length, others are NULL terminated (len = INT_MAX in this case). Now font drawing knows to treat INT_MAX special.
2016-10-14OpenGL: draw text with fewer draw callsMike Erwin
Was one draw call per glyph, now one per line. Still room for improvement here.
2016-10-12BLF/OpenGL: use new matrix API when drawing textMike Erwin
First test of matrix API. This will eventually use the 2D part of this API, but the 3D part is ready now. Part of T49450
2016-10-11BLF/OpenGL: draw text with new immediate modeMike Erwin
Part of T49043
2016-09-17OpenGL: streamline font renderingMike Erwin
Ignore texture matrix in the shader, stop messing with texture matrix in BLF code. Use linear screen-space interpolation instead of perspective. Avoid redundant call to glMatrixMode.
2016-09-17add GPU_SHADER_TEXT for font renderingMike Erwin
With USE_GLSL enabled, GPU_basic_shader(TEXTURE|COLOR) always rendered black. New shader uses a solid color + alpha channel of texture (which in our case is a font glyph). See fragment shader for details. I prefer this approah -- multiple shaders that each do one thing well (and are easy to read/write/understand), instead of one shader that can do many things given the right options.
2016-07-22fix confusing operator precedenceMike Erwin
Assigning within a conditional is confusing and error prone so I rewrote in a more straightforward way. Found with PVS-Studio T48917
2016-06-08GPU: fix/workaround basic shader font-colorCampbell Barton
All text was displaying black. BLF uses alpha-only textures which aren't supported by the basic-shader, Workaround this by using texture swizzle so the RGB components of the texture are set to 1.
2016-04-27Fix alpha blending w/ font drawing & byte bufferCampbell Barton
2016-04-22BLF: use float vector passing color argsCampbell Barton
2016-03-28BLF: alpha support for drawing to bufferCampbell Barton
2016-03-05Cleanup: quiet -Wcomma, cast to void where neededCampbell Barton
2016-02-19Fix crash drawing fonts at size 1Campbell Barton
2016-01-04Remove SCons building systemSergey Sharybin
While SCons building system was serving us really good for ages it's no longer having much attention by the developers and started to become quite a difficult task to maintain. What's even worse -- there started to be quite serious divergence between SCons and CMake which was only accumulating over the releases now. The fact that none of the active developers are really using SCons and that our main studio is also using CMake spotting bugs in the SCons builds became quite a difficult task and we aren't always spotting them in time. Meanwhile CMake became really mature building system which is available on every platform we support and arguably it's also easier and more robust to use. This commit includes: - Removal of actual SCons building system - Removal of SCons git submodule - Removal of documentation which is stored in the sources and covers SCons - Tweaks to the buildbot master to stop using SCons submodule (this change requires deploying to the server) - Tweaks to the install dependencies script to skip installing or mentioning SCons building system - Tweaks to various helper scripts to avoid mention of SCons folders/files as well Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit Reviewed By: campbellbarton, juicyfruit Differential Revision: https://developer.blender.org/D1680
2016-01-03Fix text wrapping off-by-one error w/ string widthCampbell Barton
Caused odd white space error in tooltip enum values.
2015-12-28Fix for building ghost-testsCampbell Barton
2015-12-15use float (not double) for font matrixMike Erwin
Following up on recent double --> float commits in the game engine.
2015-12-08OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not ↵Brecht Van Lommel
need it.
2015-12-08OpenGL: use sized texture internal formatsMike Erwin
Maybe this is pedantic but I read it’s best to explicitly set the desired component size. Also append “_ARB” to float texture formats since those need an extension in GL 2.1.
2015-12-06OpenGL: rename simple shader to basic shader.Brecht Van Lommel
2015-12-06OpenGL: use simple shader for texture drawing in a few places.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D1645
2015-11-28OpenGL: assume GL_TEXTURE_ENV_MODE GL_MODULATE is the default state.Brecht Van Lommel
2015-10-17Cleanup: warningsCampbell Barton
- remove NULL checks for args already set as ATTR_NONNULL. - double promotion.
2015-10-03Fix Broken Font Preview (reported over IRC by kopias, thanks).Bastien Montagne
Broken by font wrap commit rBf2341f829654c4dc97, there was actually two things here: * Using non-initialized color (which lead to transparent drawing...), we need to use new `blf_draw_buffer__start/end` helpers here too, made them shared internally. * Using `draw_str_i18n_nbr` as `draw_str[i]` length, ugh! That's the number of utf8 glyphs of translated string, not the length of untranslated string! This fix must be backported to final 2.76.
2015-09-20Cleanup: Use new vector transform functionsJulian Eisel
2015-09-19BLF: correct ResultBLF.width value when wrappingCampbell Barton
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-08-28Fix assigning flag to boolCampbell Barton
2015-08-19Hopefully fix broken windows after recent i18n split.Bastien Montagne
We need to include BLI_utildefines.h when using __func__...
2015-08-19Cleanup: style + doxyCampbell Barton
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-08-04SCons: Fix for really nasty bug with polluting configuration environmentSergey Sharybin
The issue was caused by the following construction: def = env['SOMETHING'] defs.append('SOMETHING_MORE') Since first assignment was actually referencing environment option it was totally polluted hawing weird and wonderful side effects on all other areas of Blender.
2015-06-02Fix drawing text on >2gig buffers (stamp for eg)Campbell Barton
2015-06-01Font Preview: fallback to default english strings in case translated ones ↵Bastien Montagne
have not enough chars in current font. This avoids some ugly 'missing char' in previews - not all cases of course, but most common ones. A complete solution would be much much more involved, and probably not worth it here. Definitively not before a release, at least!
2015-05-19Building without Python works againCampbell Barton
2015-04-20Cleanup: use bool /w flag checksCampbell Barton
2015-04-13Cleanup: styleCampbell Barton
2015-04-10Thumbnails: Add translations to font preview.Bastien Montagne
Not much to say, this is pretty straightforward. We just have to add current locale to thumbnails 'signature', so that previews get re-generated when we change locale... Tested with Japanese and French. Btw, I do not really understand why using BLF in ImBuf is badlevel... :/
2015-04-10BLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.Bastien Montagne
BLF_lang_get() shall return 'default' Blender locale (en_US) when translations are completely disabled! Also, add BLF_translate() and BLF_translate_do() to allow translating some strings outside of label/tip context, but still only when i18n global flag is enabled.
2015-04-08Font preview for file browserCampbell Barton
D1002 by @plasmasolutions, with own refactoring. Note, needed to do a bad-level call here (IMB -> BLF) Also can't use the BLF API directly because its not thread-safe. So keep the function isolated (blf_thumbs.c).
2015-04-08BLF: use regular unsigned int'sCampbell Barton
So GL isnt needed to include BLF types.
2015-04-08BLF: Fix clamping drawing into byte bufferCampbell Barton
2015-04-07Cleanup: brace placement /w structsCampbell Barton
2015-02-06Cleanup: styleCampbell Barton
2015-02-04Fix for recent LANG locale workaroundSergey Sharybin
Need to get a copy of the string since stored pointer is affected by subsequent calls of setlocale().