blender.git
3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 2 May 2017 13:29:00 +0000 (15:29 +0200)]
Merge branch 'master' into blender2.8

3 years agoDraw Manager: No need of glScissor for external engines
Dalai Felinto [Tue, 2 May 2017 13:26:18 +0000 (15:26 +0200)]
Draw Manager: No need of glScissor for external engines

3 years agoCycles integration with Draw Manager
Dalai Felinto [Mon, 1 May 2017 12:55:59 +0000 (14:55 +0200)]
Cycles integration with Draw Manager

We can now use object and other modes on top of Cycles.
Since we are now always on "render_to_view" (old Rendered mode), the
pause button is always visible.

3 years agoOCIO: Fix crash cause by bad IMM usable.
Clément Foucault [Mon, 1 May 2017 23:45:11 +0000 (01:45 +0200)]
OCIO: Fix crash cause by bad IMM usable.

3 years agoCycles: Fix CUDA split kernel
Sergey Sharybin [Tue, 2 May 2017 13:03:51 +0000 (15:03 +0200)]
Cycles: Fix CUDA split kernel

Global size y needs to be a multiple of 16.

3 years agoCycles: Cache split kernels in CUDA device
Sergey Sharybin [Tue, 2 May 2017 13:02:49 +0000 (15:02 +0200)]
Cycles: Cache split kernels in CUDA device

This way we don't re-load kernels for every sample in the viewport.
Additionally, we don't risk global size changed inbetween of samples.

3 years agoRNA: Remove remaining relevant scene->basact and BaseLegacy
Dalai Felinto [Tue, 2 May 2017 10:57:41 +0000 (12:57 +0200)]
RNA: Remove remaining relevant scene->basact and BaseLegacy

Note: In one case (rna_Scene_editmesh_select_mode_set) I had to resort
to the temporary solution of BKE_scene_layer_context_active.

This is fine for now, but it will be a problem once workspaces are
introduced. In this case the fix is to use a temporary value in the set
routine, and actually only set the active object in the update function
(which can take bContext).

3 years agoAdd scene argument for notifiers
Campbell Barton [Mon, 1 May 2017 23:58:01 +0000 (09:58 +1000)]
Add scene argument for notifiers

From workspaces branch

3 years agoEevee: Add support for legacy materials node. (not PBR)
Clément Foucault [Mon, 1 May 2017 16:11:04 +0000 (18:11 +0200)]
Eevee: Add support for legacy materials node. (not PBR)

3 years agoGPUMaterial: Making material node tree compatible with new drawmanager.
Clément Foucault [Mon, 1 May 2017 16:09:50 +0000 (18:09 +0200)]
GPUMaterial: Making material node tree compatible with new drawmanager.

- code_generate_fragment : Making sure that shaders uses the new uniforms.
- code_generate_vertex_new : create require attribute based on their names and not their id (see draw_cache_impl_mesh.c).
- add support for ramp textures.

3 years agoMesh Batch Cache: Add support for uv/vcol/tangent data layers.
Clément Foucault [Mon, 1 May 2017 15:58:15 +0000 (17:58 +0200)]
Mesh Batch Cache: Add support for uv/vcol/tangent data layers.

This is a bad implementation waiting for some improvement that are :
- Gawain support for multiple names. -> will remove duplication of attribute alloc
- Glsl safe name string escaping. -> will remove any risk of hash colision.

Old glsl drawing was relying on attribute being choosen by DerivedMesh at drawing time.
For this reason, we declare all possible attrib "name" for each data layer inside the batches.
In the glsl code, we declare required data by type and name.
Then Gawain only bind vbos if names correspond.
This is way cleaner as we do not need to access the CD itself when drawing.

One other problem is that the hash maybe 11 caracters long and rapidly overload gawain's attrib name buffer.

3 years agoEevee: Change MAX2 to max_ff
Clément Foucault [Thu, 27 Apr 2017 20:27:41 +0000 (22:27 +0200)]
Eevee: Change MAX2 to max_ff

3 years agoEevee: World nodetree gpumaterial compatibility.
Clément Foucault [Thu, 27 Apr 2017 20:27:09 +0000 (22:27 +0200)]
Eevee: World nodetree gpumaterial compatibility.

- Unify GPUMaterial creation (world/mesh).
- Support for multiple shader variations (not used for now).
- Convert GPUInputs to DRWUniforms to be used with the draw manager.
- Nodetree Update is not supported. The only way to refresh the shaders is to change render engine.
- Cleanup in GPUPass.
- Add new temporary Node Compatibility type. Compatibility types should be removed in the future.

3 years agoGetting rid of setlinestyle: FCurves drawing.
Bastien Montagne [Mon, 1 May 2017 15:43:20 +0000 (17:43 +0200)]
Getting rid of setlinestyle: FCurves drawing.

3 years agoGetting rid of setlinestyle: last bit in NLA.
Bastien Montagne [Mon, 1 May 2017 14:46:40 +0000 (16:46 +0200)]
Getting rid of setlinestyle: last bit in NLA.

Note that smooth-shaded outlines of muted NLA strips should also be
dashed, not sure how to do that currently (in a simple way), so kept
them solid for now.

3 years agoFix for issue when duplicating text objects
Dalai Felinto [Mon, 1 May 2017 14:46:43 +0000 (16:46 +0200)]
Fix for issue when duplicating text objects

The crash happens with Cycles and Font objects if we get Cycles working
with draw manager.

3 years agoCleanup/followup to previous commit: get rid of dashed-specific helpers.
Bastien Montagne [Mon, 1 May 2017 14:32:09 +0000 (16:32 +0200)]
Cleanup/followup to previous commit: get rid of dashed-specific helpers.

Those are no more needed.

3 years agoReworked version of dashed line shader.
Bastien Montagne [Mon, 1 May 2017 14:21:53 +0000 (16:21 +0200)]
Reworked version of dashed line shader.

Using geometry shader allows us to get rid of the 'line origin' extra
vertex attribute, which means dashed shader no longer requires fiddling
with those vertex attributes definition, and, most importantly, does not
require anymore special drawing code!

As you can see, this makes code much simpler, and much less verbose,
especially in complex cases.

In addition, changed how dashes are handled, to have two 'modes', a
simple one with single color (using default "color" uniform name), and a
more advanced one allowing more complex and multi-color patterns.

Note that since GLSL 1.2 does not support geometry shaders, a hack was
added for now (which gives solid lines, but at least does not make
Blender crash).

3 years agoWITH_CLAY_ENGINE: Should be used for CLAY only, not drawmanager
Dalai Felinto [Mon, 1 May 2017 13:37:27 +0000 (15:37 +0200)]
WITH_CLAY_ENGINE: Should be used for CLAY only, not drawmanager

3 years agoDraw Manager: Fix copy-paste harmless comment "typo"
Dalai Felinto [Mon, 1 May 2017 12:24:15 +0000 (14:24 +0200)]
Draw Manager: Fix copy-paste harmless comment "typo"

3 years agoBlender 2.8: Update arc config
Sergey Sharybin [Mon, 1 May 2017 13:20:19 +0000 (15:20 +0200)]
Blender 2.8: Update arc config

3 years agoCheck we've got GLEW version 2 when building with core profile
Sergey Sharybin [Mon, 1 May 2017 08:37:04 +0000 (10:37 +0200)]
Check we've got GLEW version 2 when building with core profile

There was a bug in older GLEW version which kept glGenVertexArrays as NULL
when 3.2 core context is requested [1].

Didn't find a way to check GLEW version from CMake, it seems the version
is not really exposed to the header.

[1] https://sourceforge.net/p/glew/bugs/124/

3 years agofix typo in WITH_SYSTEM_GFLOG in CMakeLists.txt
lazydodo [Sun, 30 Apr 2017 16:52:38 +0000 (10:52 -0600)]
fix typo in WITH_SYSTEM_GFLOG in CMakeLists.txt

3 years agoGetting rid of setlinestyle: sample line in Image space.
Bastien Montagne [Sat, 29 Apr 2017 18:41:57 +0000 (20:41 +0200)]
Getting rid of setlinestyle: sample line in Image space.

3 years agoGetting rid of setlinestyle: UV editor drawing.
Bastien Montagne [Sat, 29 Apr 2017 18:12:30 +0000 (20:12 +0200)]
Getting rid of setlinestyle: UV editor drawing.

3 years agoGetting rid of setlinestyle: remove gpencil's debug-only dashed line drawing.
Bastien Montagne [Sat, 29 Apr 2017 17:42:04 +0000 (19:42 +0200)]
Getting rid of setlinestyle: remove gpencil's debug-only dashed line drawing.

No need to add extra complexity of conditional dashing here for now!

3 years agoGetting rid of setlinestyle: ed_util's pos-to-mouse dashed line.
Bastien Montagne [Sat, 29 Apr 2017 17:40:32 +0000 (19:40 +0200)]
Getting rid of setlinestyle: ed_util's pos-to-mouse dashed line.

3 years agoGetting rid of setlinestyle: GPencil eraser.
Bastien Montagne [Sat, 29 Apr 2017 14:07:26 +0000 (16:07 +0200)]
Getting rid of setlinestyle: GPencil eraser.

Note the ugly hack on number of segments for outline dashed circle, to
get an OK-ish rendering of dashes...

3 years agoGetting rid of setlinestyle: add imm_draw_circle_wire_dashed() util.
Bastien Montagne [Sat, 29 Apr 2017 14:04:33 +0000 (16:04 +0200)]
Getting rid of setlinestyle: add imm_draw_circle_wire_dashed() util.

Needed a bit of twisting in generic private func behind the imm_draw_circle
helpers, but think it's fine.

Note that this demonstrate yet another downside of new dashed shader
compared to olde line style: not only does it needs more complex setup,
and can only work with PRIM_LINES type of primitives, but it also
behaves totally wrong with chained short segments!

We really need to find a better way to do this effect at some point. :(

3 years agoCleanup: comment blocks
Campbell Barton [Sat, 29 Apr 2017 17:14:57 +0000 (03:14 +1000)]
Cleanup: comment blocks

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 29 Apr 2017 17:05:34 +0000 (03:05 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: comment blocks
Campbell Barton [Sat, 29 Apr 2017 16:58:36 +0000 (02:58 +1000)]
Cleanup: comment blocks

3 years agoView3D: support both orbit select & depth
Campbell Barton [Sat, 29 Apr 2017 16:38:38 +0000 (02:38 +1000)]
View3D: support both orbit select & depth

When using both preferences, use cursor depth when nothings selected.

3 years agoCurve Fitting: minor change to re-fitting method
Campbell Barton [Sat, 29 Apr 2017 14:01:16 +0000 (00:01 +1000)]
Curve Fitting: minor change to re-fitting method

Avoid calculating a new split-index when re-fitting.

While checking if a knot can be removed, the index with the highest error
can be used as a candidate to replace the knot
(in the case it can't be removed).

3 years agoGetting rid of setlinestyle: NLA (part I).
Bastien Montagne [Sat, 29 Apr 2017 11:15:48 +0000 (13:15 +0200)]
Getting rid of setlinestyle: NLA (part I).

Also restore drawing of local action markers in NLA strips...

Note: there is another usage of setlinestyle in this file, not sure how
to hanlde it for now, so will leave it for later...

3 years agoGetting rid of setlinestyle: Color ramp markers.
Bastien Montagne [Sat, 29 Apr 2017 10:57:14 +0000 (12:57 +0200)]
Getting rid of setlinestyle: Color ramp markers.

3 years agoGetting rid of setlinestyle: Text space margin line.
Bastien Montagne [Sat, 29 Apr 2017 10:43:37 +0000 (12:43 +0200)]
Getting rid of setlinestyle: Text space margin line.

3 years agoCleanup: rename struct for private engine data
Campbell Barton [Sat, 29 Apr 2017 06:52:12 +0000 (16:52 +1000)]
Cleanup: rename struct for private engine data

Also remove from pass list (there were some duplicate unused entries).

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 29 Apr 2017 06:32:25 +0000 (16:32 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: unused includes
Campbell Barton [Sat, 29 Apr 2017 06:27:29 +0000 (16:27 +1000)]
Cleanup: unused includes

3 years agoCleanup: menu example
Campbell Barton [Sat, 29 Apr 2017 06:20:06 +0000 (16:20 +1000)]
Cleanup: menu example

remove some redundant checks, imports

3 years agoblenderplayer: fix warnings in stubs
Dalai Felinto [Sat, 29 Apr 2017 00:07:39 +0000 (02:07 +0200)]
blenderplayer: fix warnings in stubs

3 years agoCycles: Fix crashes after recent image changes
Mai Lavelle [Fri, 28 Apr 2017 22:47:47 +0000 (18:47 -0400)]
Cycles: Fix crashes after recent image changes

Not sure if this is a proper fix, but was getting frequent crashes, so
committing this real quick just to make master sable again. Can be
reverted later if there's a better fix. The changes to images really
need a closer look...

3 years agoDraw manager: Style cleanups
Dalai Felinto [Fri, 28 Apr 2017 22:54:11 +0000 (00:54 +0200)]
Draw manager: Style cleanups

3 years agoImplementation of custom python entries in all right click menus
Thomas Beck [Fri, 28 Apr 2017 11:01:03 +0000 (13:01 +0200)]
Implementation of custom python entries in all right click menus

Hi Guys,

as one of my clients needs the possibility to have custom menu entries in the general right click menu (all over Blender: in the node editor, properties, toolbars,..) I talked with Campbell about expanding our hard coded menu a bit. This is the outcome. As I only need those two, I support currently a button_prop and a button_pointer.

{F540397}

I tested the changes with a custom script where I added a custom entry and executed an operator on click - it seems to work exactly how it's intended to. The script: {F540435}

As I'm not too experienced in rna stuff I would really appreciate any review.
Thanks very much Campbell for his open ears & help on this issue!

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: sybren, mont29

Tags: #addons

Differential Revision: https://developer.blender.org/D2612

3 years agoDisable custom armature colors
Campbell Barton [Fri, 28 Apr 2017 18:25:10 +0000 (04:25 +1000)]
Disable custom armature colors

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 28 Apr 2017 17:39:24 +0000 (03:39 +1000)]
Merge branch 'master' into blender2.8

3 years agoCycles support for preview on viewport with core profile
Dalai Felinto [Fri, 28 Apr 2017 17:25:57 +0000 (19:25 +0200)]
Cycles support for preview on viewport with core profile

This upgrade the drawing code to use latest opengl calls.
Also, it adds a fallback shader for opencolorio.

Reviewers: sergey, brecht
Subscribers: merwin, fclem

Differential Revision: https://developer.blender.org/D2652

3 years agoGetting rid of setlinestyle: Clip drawing code.
Bastien Montagne [Fri, 28 Apr 2017 17:20:14 +0000 (19:20 +0200)]
Getting rid of setlinestyle: Clip drawing code.

This one has been painful, it's doing lots of nifty conditional drawing
of all kind... Also, very nice illustration of how cumbersome it is to
use dashed shader currently, we really need to find a simpler way at
some point imho. But this is not critical issue either, for now we can
live with some uglyness like that. :/

3 years agoGetting rid of setlinestyle: markers' dashed line in VSE.
Bastien Montagne [Thu, 27 Apr 2017 13:49:10 +0000 (15:49 +0200)]
Getting rid of setlinestyle: markers' dashed line in VSE.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 28 Apr 2017 17:23:54 +0000 (03:23 +1000)]
Merge branch 'master' into blender2.8

3 years agoFix T51324: Auto-Depth fails rotating out of camera
Campbell Barton [Fri, 28 Apr 2017 17:13:49 +0000 (03:13 +1000)]
Fix T51324: Auto-Depth fails rotating out of camera

3 years agoCycles: Use relative path for #line directives
Sergey Sharybin [Fri, 28 Apr 2017 15:46:11 +0000 (17:46 +0200)]
Cycles: Use relative path for #line directives

This way moving Blender bundle around doesn't re-trigger kernels compilation.

3 years agoLibmv: Make ERROR a default printing severity
Sergey Sharybin [Fri, 28 Apr 2017 14:47:35 +0000 (16:47 +0200)]
Libmv: Make ERROR a default printing severity

3 years agoCycles: Correct comment after previous commit
Sergey Sharybin [Fri, 28 Apr 2017 14:47:24 +0000 (16:47 +0200)]
Cycles: Correct comment after previous commit

3 years agoCycles: Lower default severity level to ERROR
Sergey Sharybin [Fri, 28 Apr 2017 14:46:11 +0000 (16:46 +0200)]
Cycles: Lower default severity level to ERROR

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Fri, 28 Apr 2017 13:52:07 +0000 (15:52 +0200)]
Merge branch 'master' into blender2.8

3 years agoHide object center and other info when drawing sets
Campbell Barton [Fri, 28 Apr 2017 13:52:02 +0000 (23:52 +1000)]
Hide object center and other info when drawing sets

3 years agoAlembic: use object-oriented approach in ABC_read_mesh()
Sybren A. Stüvel [Fri, 28 Apr 2017 11:48:00 +0000 (13:48 +0200)]
Alembic: use object-oriented approach in ABC_read_mesh()

This is easier to extend than the if/else if/else chain that was in place,
and allows for somewhat more granular error messages.

3 years agoAlembic: Construct ISampleSelector once and pass along
Sybren A. Stüvel [Wed, 26 Apr 2017 14:56:50 +0000 (16:56 +0200)]
Alembic: Construct ISampleSelector once and pass along

3 years agoFix T51331: fixes for Alembic unit tests on Windows
Sybren A. Stüvel [Fri, 28 Apr 2017 13:28:41 +0000 (15:28 +0200)]
Fix T51331: fixes for Alembic unit tests on Windows

3 years agoCycles: De-duplicate bit magic for decoding image options in OpenCL kernel
Sergey Sharybin [Fri, 28 Apr 2017 13:20:34 +0000 (15:20 +0200)]
Cycles: De-duplicate bit magic for decoding image options in OpenCL kernel

3 years agoCycles: Simplify code around maximum OpenCL info size allocation
Sergey Sharybin [Fri, 28 Apr 2017 13:15:15 +0000 (15:15 +0200)]
Cycles: Simplify code around maximum OpenCL info size allocation

3 years agoCycles: Cleanup, de-duplicate image packing of various types
Sergey Sharybin [Fri, 28 Apr 2017 13:08:54 +0000 (15:08 +0200)]
Cycles: Cleanup, de-duplicate image packing of various types

3 years agoCorrect comment, we need wire_outline data in this case
Campbell Barton [Fri, 28 Apr 2017 13:04:29 +0000 (23:04 +1000)]
Correct comment, we need wire_outline data in this case

3 years agoCycles: Quick (real) fix for broken textures on OpenCL
Sergey Sharybin [Fri, 28 Apr 2017 12:56:22 +0000 (14:56 +0200)]
Cycles: Quick (real) fix for broken textures on OpenCL

Previous fix did not work for mixed textures. This one will over-allocate
information array, but it's better than not being able to render at all.

Some more cleanup and improvement is coming.

3 years agoRevert "Cycles: Fix image textures were completely broken since recent unlimited...
Sergey Sharybin [Fri, 28 Apr 2017 12:48:40 +0000 (14:48 +0200)]
Revert "Cycles: Fix image textures were completely broken since recent unlimited textures commit"

This reverts commit 8f4166ee495531fa38b676b0a5ef4c482e89f9a5.

The fix was not correct for cases when we've got float textures.

3 years agoDraw Manager: pose-mode custom bone display
Campbell Barton [Fri, 28 Apr 2017 12:30:21 +0000 (22:30 +1000)]
Draw Manager: pose-mode custom bone display

3 years agoCycles: Cleanup, spelling and braces
Sergey Sharybin [Fri, 28 Apr 2017 12:10:21 +0000 (14:10 +0200)]
Cycles: Cleanup, spelling and braces

3 years agoCycles: Fix image textures were completely broken since recent unlimited textures...
Sergey Sharybin [Fri, 28 Apr 2017 12:04:27 +0000 (14:04 +0200)]
Cycles: Fix image textures were completely broken since recent unlimited textures commit

The indexing was totally wrong in both image packing code and image sampling in kernel.

Fixes T51341: Cycles OpenCL corruption in todays buildbot

3 years agoCycles: Cleanup, always use braces for blocks
Sergey Sharybin [Fri, 28 Apr 2017 11:39:14 +0000 (13:39 +0200)]
Cycles: Cleanup, always use braces for blocks

3 years agoCycles: Cleanup, indentation in preprocessor
Sergey Sharybin [Fri, 28 Apr 2017 11:24:09 +0000 (13:24 +0200)]
Cycles: Cleanup, indentation in preprocessor

3 years agoCycles: Cleanup, use ccl::vector instead of std::vector
Sergey Sharybin [Fri, 28 Apr 2017 11:22:07 +0000 (13:22 +0200)]
Cycles: Cleanup, use ccl::vector instead of std::vector

3 years agoCycles: Cleanup, indentaiton and trailing whitespace and wrapping
Sergey Sharybin [Fri, 28 Apr 2017 11:21:17 +0000 (13:21 +0200)]
Cycles: Cleanup, indentaiton and trailing whitespace and wrapping

3 years agoRecent commit state broke lattice vertex drawing
Campbell Barton [Fri, 28 Apr 2017 08:43:46 +0000 (18:43 +1000)]
Recent commit state broke lattice vertex drawing

e4d856e3 caused lattice vertices not to draw in editmode.

3 years agoFix draw manager draw-modes interfering with eachother
Campbell Barton [Thu, 27 Apr 2017 19:22:30 +0000 (05:22 +1000)]
Fix draw manager draw-modes interfering with eachother

3 years agoDraw Manager: basic text overlay support
Campbell Barton [Thu, 27 Apr 2017 18:33:58 +0000 (04:33 +1000)]
Draw Manager: basic text overlay support

3 years agoOpenGL: manage legacy state only when WITH_LEGACY_OPENGL=ON
Mike Erwin [Thu, 27 Apr 2017 18:32:47 +0000 (14:32 -0400)]
OpenGL: manage legacy state only when WITH_LEGACY_OPENGL=ON

- enabled lights
- alpha test
- texture environment
- point sprites (always enabled in modern GL)

Moved is_clip_plane for better struct packing, no functional change there.

Part of T51164

3 years agoOpenGL: don't set texture LoD bias via glTexEnvf
Mike Erwin [Thu, 27 Apr 2017 18:24:32 +0000 (14:24 -0400)]
OpenGL: don't set texture LoD bias via glTexEnvf

Not supported in core profile. We could do this in GLSL if it's really needed.

Part of T51164

3 years agoOpenGL: early exit from functions that don't mix with core profile
Mike Erwin [Thu, 27 Apr 2017 18:00:38 +0000 (14:00 -0400)]
OpenGL: early exit from functions that don't mix with core profile

These parts will not be part of final viewport, but are called indirectly during the transition. To avoid runtime errors on core profile, exit early -- functions effectively do nothing.

I put the early exits inside the functions to avoid cluttering the code that calls these. But (long term) the calling functions need to change.

Basic shader's detect_options function was unused and full of old, so I deleted it.

Part of T51164

3 years agoOpenGL: fix color logic op
Mike Erwin [Thu, 27 Apr 2017 18:18:33 +0000 (14:18 -0400)]
OpenGL: fix color logic op

GL_LOGIC_OP is a synonym for GL_INDEX_LOGIC_OP, from OpenGL 1.0's indexed color drawing. It's not part of modern GL and causes an error in core profile.

GL_COLOR_LOGIC_OP is still supported in the latest GL. It's the last stage before writing to the framebuffer.

Part of T51164

3 years agoAdd back text color for legacy drawing
Campbell Barton [Thu, 27 Apr 2017 17:04:51 +0000 (03:04 +1000)]
Add back text color for legacy drawing

3 years agoGawain: safely orphan immediate mode's VBO
Mike Erwin [Thu, 27 Apr 2017 14:16:20 +0000 (10:16 -0400)]
Gawain: safely orphan immediate mode's VBO

There are multiple ways to orphan a buffer resource, and this code picks the oldest/safest way no matter which OpenGL version we're running.

TODO: use other (more recent) methods after thorough testing

Follow up to 8e0c57a812e8

3 years agoOpenGL: don't glGet(GL_RED_BITS) in core profile
Mike Erwin [Wed, 26 Apr 2017 22:06:00 +0000 (18:06 -0400)]
OpenGL: don't glGet(GL_RED_BITS) in core profile

or GREEN or BLUE. These are deprecated and cause errors under core profile.

TODO: get color depth value another way

Part of T51164

3 years agoOpenGL: stop enabling GL_TEXTURE
Mike Erwin [Thu, 27 Apr 2017 15:24:35 +0000 (11:24 -0400)]
OpenGL: stop enabling GL_TEXTURE

Texturing is always enabled in GLSL. Simply use a sampler in the shader.

Replaced gpu_generate_mipmap with glGenerateMipmap since the former just Enabled/Disabled the texture target and called the latter.

Part of T51164

3 years agoOpenGL: stop using GL_NORMALIZE
Mike Erwin [Thu, 27 Apr 2017 14:35:12 +0000 (10:35 -0400)]
OpenGL: stop using GL_NORMALIZE

With GLSL there is no need for GL_NORMALIZE. We explicitly normalize in the shader, or (better) send in unit vectors.

Part of T51164

3 years agoGawain: fix pointer arithmetic warning
Mike Erwin [Thu, 27 Apr 2017 13:59:19 +0000 (09:59 -0400)]
Gawain: fix pointer arithmetic warning

void* + offset = ???

This Mac-only code works, but wasn't strictly correct. clang doesn't warn about this, gcc does.

3 years agofix Clay compatibility comment
Mike Erwin [Wed, 26 Apr 2017 22:12:52 +0000 (18:12 -0400)]
fix Clay compatibility comment

When building WITH_LEGACY_OPENGL, Mac uses GL 2.1, Mesa uses GL 3.0. Has nothing to do with Intel!

Clay assumes GL 3.3 is available.

3 years agoOpenGL: restore all 8 lights
Mike Erwin [Wed, 26 Apr 2017 21:59:51 +0000 (17:59 -0400)]
OpenGL: restore all 8 lights

fixes a copy/paste mistake

3 years agoOpenGL: remove GL_MAP1_VERTEX_3
Mike Erwin [Wed, 26 Apr 2017 21:55:59 +0000 (17:55 -0400)]
OpenGL: remove GL_MAP1_VERTEX_3

This is related to OpenGL evaluators (old feature). From my understanding, we don't seem to be actually using it.

Part of T51164

3 years agosupport OpenGL 3.0 on Linux only when WITH_LEGACY_OPENGL=ON
Mike Erwin [Wed, 26 Apr 2017 21:23:43 +0000 (17:23 -0400)]
support OpenGL 3.0 on Linux only when WITH_LEGACY_OPENGL=ON

Part of T49012

3 years agoGetting rid of setlinestyle: transform code.
Bastien Montagne [Thu, 27 Apr 2017 13:27:00 +0000 (15:27 +0200)]
Getting rid of setlinestyle: transform code.

Note that I also made 'dash anchor point' consistent (the static one,
not the mouse one), in previous code somtimes dashed were anchored to
the static center point, in others, to the moving mouse position, the
later was rather disturbing imho...

3 years agoFix: T50271: Bilateral/Directional blur's iterations is zero by default
brunoT [Thu, 27 Apr 2017 12:54:06 +0000 (08:54 -0400)]
Fix: T50271: Bilateral/Directional blur's iterations is zero by default

Differential Revision: https://developer.blender.org/D2632

3 years agoError in last commit
Campbell Barton [Thu, 27 Apr 2017 12:01:31 +0000 (22:01 +1000)]
Error in last commit

3 years agoCleanup: split cmake source/headers
Campbell Barton [Thu, 27 Apr 2017 11:58:43 +0000 (21:58 +1000)]
Cleanup: split cmake source/headers

3 years agoRevert "Fix T51328: Add note to cmdline help that threads must be first"
Campbell Barton [Thu, 27 Apr 2017 11:48:01 +0000 (21:48 +1000)]
Revert "Fix T51328: Add note to cmdline help that threads must be first"

The help message already notes that argument order matters,
and this doesn't need to be the first.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 27 Apr 2017 11:41:57 +0000 (21:41 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: spelling
Campbell Barton [Thu, 27 Apr 2017 11:40:18 +0000 (21:40 +1000)]
Cleanup: spelling

3 years agoCleanup: remove unused matrix arg
Campbell Barton [Thu, 27 Apr 2017 11:35:31 +0000 (21:35 +1000)]
Cleanup: remove unused matrix arg

3 years ago3D widgets were obscured by view geometry
Campbell Barton [Thu, 27 Apr 2017 09:43:27 +0000 (19:43 +1000)]
3D widgets were obscured by view geometry