Age | Commit message (Collapse) | Author |
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
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.
|
|
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
|
|
|
|
|
|
- immAttrib* -> immAttr*
- immSkipAttrib -> immAttrSkip
Term 'attr' is a convention for GPU module.
|
|
|
|
|
|
|
|
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
|
|
Applied to newly added files in 2.8
|
|
Looking up names project wide or setting breakpoints wasn't so.
Names like common.h or element.h are also too generic.
|
|
|
|
Core of the issue was that some of our Theme colors are RGB-only, but
were loaded as RGBA.
Note that tracking all possible cases is pretty impossible, so we'll
have to tackle those as they get reported am afraid.
|
|
Before now it lived in source/blender/gpu for convenience. Only a few files in the gpu module use Gawain directly.
Tested on Mac, time to push and test on Windows.
Todo: some CMake magic to make it easy to
#include "gawain/some_header.h"
from any C or H file. Main problem here is the many editors that include GPU_immediate.h which includes Gawain's immediate.h -- is there a way to avoid changing every editor's CMakeLists?
|
|
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
|
|
|
|
Plus some naming cleanup.
Supports T49043
|
|
immUniformThemeColorBlendShade
|
|
|
|
|
|
Caller is responsible for setting up vertex format, binding a shader program, and setting the color *before* calling immRect.
|
|
Was already done for immediate mode, but rearranged code to make a clean separation. Cleaned up #includes for code that uses this feature.
Added same for batched rendering.
|
|
Put Gawain source code in a subfolder to make the boundary between the
library and the rest of Blender clear.
Changed Gawain’s license from Apache to Mozilla Public License. Has
more essence of copyleft — closer to GPL but not as restrictive.
Split immediate.c into several files so parts can be reused (adding
more files soon…)
|
|
immBegin requires us to know how many vertices will be drawn. Most times this is fine, but sometimes it can be tricky. Do we make the effort to count everything in one pass, then draw it in a second?
immBeginAtMost makes this simple. Example: I'll draw at most 100 vertices. Supply only 6 verts and it draws only 6.
Any unused space is reclaimed and given to the next immBegin.
|
|
Application code can pass ubytes, Gawain converts to float vec4 expected by shader.
For now the conversion is simple linear. We can add sRGB support later if needed.
|
|
Scanned Blender code for commonly used glVertex, glColor functions.
Implemented immVertex, immAttrib versions of these to ease transition
away from legacy OpenGL.
|
|
Legacy OpenGL has a matching Vertex3fv for every Vertex3f, and so on. Add something similar to Gawain, just for a few common functions. Might add more as the need arises.
|
|
Should be simpler to use now.
Made vertex format structure private. New immVertexFormat() function
clears and returns the format. Devs can start with add_attrib(format...)
and not have to clear it first.
immBindProgram automatically packs the vertex format if needed.
Updated 3D cursor drawing to use new API.
|
|
Start simple with vec4 uniforms. Add more later.
|
|
More ways to send values via immAttrib:
2D float vectors
3 & 4 component ubytes (for colors mostly)
New immVertex functions that act more like familiar glVertex. We’ll
find a balance between making this API convenient and keeping it small.
2f and 3f are enough for now.
|
|
Introducing an immediate mode drawing API that works with modern GL 3.2
core profile. I wrote and tested this using a core context on Mac.
This is part of the Gawain library which is Apache 2 licensed. Be very
careful not to pull other Blender code into these files.
Modifications for the Blender integration:
- prefix filenames to match rest of Blender’s GPU libs
- include GPU_glew.h instead of <OpenGL/gl3.h>
- disable thread-local vars until we figure out how best to do this
|