Age | Commit message (Collapse) | Author |
|
|
|
The issue was caused here by usage of deprecated GL_CURRENT_PROGRAM
which was returning rubbish value.
Now we use imm API and create vertex format prior to immBindProgram.
This made us required to have some sort of state passed from setup
function to actual drawing.
|
|
These were in BIF_glutil which is documented to be removed,
so best not define new API's there.
|
|
- use 'imm_draw_' prefix for functions that draw.
- use '_3d' suffix for 3d functions, no suffix for 2d functions.
- use terms fill/wire (shorter than filled / lined).
Also add `imm_draw_circle_fill_3d` (only had wire version)
|
|
We may have a 'disk' function (not the partial version).
|
|
Needed for custom-manipulators branch but generally useful.
|
|
Finally, fdrawline is no more!
Part of T49043 & T49450
|
|
Part of T49043, T49042
Reviewers: fclem, merwin
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D2548
|
|
|
|
This helper function was marked DEPRECATED since it uses old OpenGL calls.
Switched last 2 uses to imm_draw_checker_box, which does the same thing, only awesome.
Part of T49043
|
|
a little bit of T49043, mostly related to T49165
Thx to @fclem for marking these as unused & making shader-based replacements.
|
|
This helper function was marked DEPRECATED since it uses old OpenGL calls.
Part of T49043
|
|
GPU_basic_shader handles this internally; no other code depends on it.
|
|
These helper functions were marked DEPRECATED since they use old OpenGL calls. Now they are marked GONE!
Part of T49043
|
|
These helper functions were marked DEPRECATED since they use old OpenGL calls. Now they are marked GONE!
Part of T49043
|
|
Part of T49042.
|
|
|
|
This replaces `glaDrawBorderCorners`.
|
|
|
|
And change relevant function calls.
|
|
Replaced all calls to `imm_draw_line` by plain `immVertex2f` calls, and
removed `imm_draw_line`, as that function was not supposed to exist in
the first place, and causes unnecessary calls to `immBegin`/`immEnd`.
Part of T49043
|
|
This replaces `fdrawcheckerboard` in drawing a standard gray
checkerboard for alpha backgrounds.
|
|
This reverts commit 3da834e83ce9d7056c033148dab04885a6d3b1b7.
We will use the outliner for this now.
I'm also moving the collections_ops.c to outliner_collections.c
|
|
|
|
|
|
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
|
|
Had to add a few utility functions to replace existing functions. Let me know if these are duplicates.
Reviewers: merwin
Reviewed By: merwin
Tags: #bf_blender_2.8
Maniphest Tasks: T49043
Differential Revision: https://developer.blender.org/D2434
|
|
Only one place used it, and that place was dead code already.
|
|
These will be removed before we ship 2.8
|
|
New immediate mode API is strict about attribute formats. These new functions make existing code easier to port.
Supports T49043
|
|
|
|
The little grabby handle in the corner of an area. Now uses 1 draw call
instead of 6.
Also one version of the (+) icon to show a hidden region. Why do we
have multiple versions of this?
Fixed a harmless signed/unsigned error.
Fixed a GL state error that prematurely disabled blending.
Added imm_draw_filled_circle function, which can be used for drawing
other widgets.
Work toward T49042 and T49043
|
|
Includes new imm_draw_lined_circle function that can be used for other
widgets.
Part of T49043
|
|
Keeping unused gla2D code because it might be useful, or inspire
something useful, for Blender 2.8 development.
Also removed an old Mac driver bug workaround. Disabled this before the
2.77 release and nobody has complained.
|
|
|
|
This commit avoids draw of invisible parts of image in image editor,
making it faster to re-draw the image.
Especially handy when painting on a high-res image when zoomed-in.
|
|
Everything I've tested works fine without these hacks. Variety of Mac, Linux, Windows, Intel, nVidia, AMD.
If these workarounds are for old unsupported systems let's clean house.
Reviewers: #opengl_gfx
Differential Revision: https://developer.blender.org/D1707
|
|
|
|
|
|
|
|
Comments only, no functional change.
|
|
shorts would wrap sometimes & many inputs were ints already.
|
|
Preserve buffer form previous runs so it's possible to make
a compo of full frame, then draw a border and start tweaking
nodes and see updates in that border.
Main idea is to make it able to visually compare difference
between what was changed inside the border and how frame
looked before the tweaks outside of the border.
Also implemented Clear Viewer Border in compositor, shortcut
it Ctrl-Alt-B.
Reviewers: lukastoenne, jbakker
CC: venomgfx, sebastian_k
Differential Revision: https://developer.blender.org/D582
|
|
|
|
|
|
|
|
Now only background images remained to be ported. Plus implement
GLSL for dithering and RGB curves.
|
|
- GLSL shader wasn't aware of alpha predivide option,
always assuming alpha is straight. Gave wrong results
when displaying transparent float buffers.
- GLSL display wasn't aware of float buffers with number
of channels different from 4, crashing when trying to
display image with different number of channels.
This required a bit larger changes, namely now it's
possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
to glaDrawPixelsTex, This also implied adding format to
glaDrawPixelsAuto and modifying all places where this
functions are called.
Now GLSL will handle both 3 and 4 channels buffers,
single channel images are handled by CPU.
- Replaced hack for render result displaying with a bit
different hack.
Namely CPU conversion will happen only during render,
once render is done GLSL would be used for displaying
render result on a screen.
This is so because of the way renderer updates parts
of the image -- it happens without respect to active
render layer in image user. This is harmless because
only display buffer is modifying, but this is tricky
because we don't have original buffer opened during
rendering.
One more related fix here was about when rendering
multiple layers, wrong image would be displaying when
rendering is done. Added a signal to invalidate
display buffer once rendering is done (only happens
when using multiple layers). This solves issue with
wrong buffer stuck on the display when using regular
CPU display space transform and if GLSL is available
it'll make image displayed with a GLSL shader.
- As an additional change, byte buffers now also uses
GLSL display transform.
So now only dutehr and RGB curves are stoppers for
using GLSL for all kind of display transforms.
|
|
|
|
Uses GLSL for drawing image in Image Editor space.
This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.
Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.
Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).
internal changes:
- Added functions to setup GLSL shader for color
space conversion in colormanagement.c. Currently
conversion form a colorspace defined by a role to
linear space is implemented. Easy to extend to
other cases.
- Added helper functions to glutil.c which does
smarter image buffer draw (calling all needed OCIO
stuff, editors now could draw image buffer with a
single function call -- all the checks are done in
glutil.c).
- Also added helper function for buffer linearization
from a given role to glutil.c. Everyone now able to
linearize buffer with a single call.
This function will do nothing is GLSL routines fails
or not supported.
And one last this: this function uses offscreen
drawing, could potentially give issues on some
cards, also will keep an eye on this.
|