Age | Commit message (Collapse) | Author |
|
|
|
culling was on)
|
|
Use OpenGL 3.2 extension ARB_draw_elements_base_vertex, which allows us
to add offset in index buffer indices automatically. This should reduce
the number of draw calls significantly.
We may have some errors on the Mac with VBO setting off.
OSX OpenGL extensions don't play well with vertex arrays.
Will test that more later.
We might also use a full element buffer here, like we do when hiding
some quads, but this approach keeps the memory savings intended
originally.
|
|
Was overdrawing the buffer, in case of fast drawing just use one
draw call. Should also make performance quite smoother.
Note:
Just discovered we are doing one draw call - per grid - in multires
apparently to keep reusing the same element buffer.
This is horribly, dreadfully slow and will check about fixing it later.
|
|
Wasn't working correctly since using MLoopTri,
this is improved over 2.75 which only handled tris & quads.
|
|
It's not actually used during drawing though.
|
|
Separate and reuse some shared code.
Also avoid counting for information we already know,
such as total loop triangles etc.
|
|
mode.
Issue from looptri merge.
|
|
Also the refactor exposed an error where we requested too much
memory from the video memory in general for all mesh types.
Now we are back to normal :)
|
|
I suspect code here can be cleaned up but for now try this.
Alternatively we can check for errors around buffer allocation
but this needs bigger changes.
|
|
properly.
This should fix failure to use vertex arrays in OSX with high
polycounts.
Note this will not suffice as a fix when we move to VBOs exclusively
(GL 3+), we'll have to think of some way to separate huge meshes to many
VBOs.
|
|
|
|
don't support VBOs.
Exposed by initialization error in GLEW, which should be fixed
seperately.
|
|
subdivision.
Classic integet overflow/size_t substitution case. Machines are getting
powerful enough to easily expose these kinds of error now.
|
|
This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.
This doesn't yet move all internal code from MFace to LoopTri just yet.
Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint
Thanks to @psy-fi for review, fixes and improvements to drawing!
|
|
Remove legacy code completely, now dyntopo, multires et al even work on
GL 1.1 for really hardcore users :p
Real purpose here though is to be able to have fast multires drawing
even with VBO off, since it requires using indices for vertex buffers.
Also made own code elf puke an eaten normal update function which
made multires not update normals in solid mode...sorry.
|
|
Get rid of legacy drawing, it's only used for selection,
in which case we can prepare a temporary color buffer and draw
at once. Code is not complete here because we still redundantly
set the draw color in the draw function and don't ommit hidden
faces automatically. Still it works 100% without immediate mode
now.
|
|
This patch changes the way we draw meshes by introducing
indexed drawing. This makes it possible to easily
upload and rearrange faces ad lib according to any criteria.
Currently we use material sorting but textured sorting and
hiding will be added to optimize textured drawing and skip
per face testing.
It also adds support for vertex buffers for subsurf
modifiers (Except from GLSL drawing), making drawing of
subsurf much faster without need for bogus modifiers.
Tests show that we gain approximately 20-25% performance
by that for solid mode drawing with up to 50% gains for
material drawing. Textured drawing should also have a
small performance gain, but more substantial optimizations
are possible there.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1406
|
|
|
|
|
|
We really don't need to iterate all edges of the mesh every frame to
search for loose edges, this calculation can be cached when filling the
edge index buffer.
|
|
while studying GPU lib
|
|
do it twice.
|
|
|
|
Issue here is that remote connection will use OpenGL 1.1.
There was a call here that would free VBOs always without a check,
however the VBO free function pointer is NULL on such contexts causing a
crash.
This must have been causing some of the crashes with old contexts. While
I think supporting those systems is not such a good idea in general,
they can have a few more moments of support I guess.
Things might be better now for systems using OGL 1.1 though there are
still things that could be done better here - for instance going to
dyntopo can crash immediately because we don't have a fallback
implementation there. It might be worth reimplementing sculpting with
vertex arrays for the legacy case too, but I guess if we move on to
OpenGL 2.1 soon this is a bit of a wasted effort.
|
|
|
|
|
|
GLSL used a global variable to store the enabled vertex attributes which
were not set for vertex arrays after the VBO refactor.
|
|
|
|
|
|
|
|
Basically this commit gets rid of most of the derived mesh immediate mode
drawing (cases such as subsurf excluded). Even when VBO is turned off
in user preferences, we still use vertex arrays, which are very similar to
VBOs but memory is client side. Vertex arrays are OpenGL 1.1 so compatibility
is not an issue here.
Reviewers: campbellbarton, sergey, jwilkins
Differential Revision: https://developer.blender.org/D919
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
Bring back shading in texture painting.
This works now but it uses 3 texture units instead of two. Most GPUs of
DirectX 8 (OpenGL 1.4 should cover that) functionality even should have
those, but some old GPUs might not work with that. In any case, I hope
we will be moving to OpenGL 2.1 requirement soon anyway where 4-8
texture units are usually the norm.
|
|
|
|
Some nodes could end up without any faces and in that case getting a
face material would fail.
|
|
|
|
Yep, at last it's here!
There are a few minor issues remaining but development can go on in
master after discussion at blender institute.
For full list of features see:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting
Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
|
|
Set hidden when rebuilding the PBVH tree if all primitives are hidden.
|
|
Avoid filling up buffers when total buffer triangles are zero.
Better still would be to tag a node as hidden when doing recreation of
the PBVH tree by checking for any visible elements. Original bug report
probably has to do with OpenGL doing something funky but hidden nodes
should be tagged as hidden to completely avoid iterating for painting.
This is to be done in a later commit.
Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to
GPU_build_mesh_pbvh_buffers.
|
|
To enable enter debug value 14.
Leaf nodes are green while container nodes are red.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
modifiers, nodes)
|
|
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
|
|
|
|
Mostly monkey coding in gpu ("modern" VBO drawing) and DM variants ("legacy" drawing) code...
Reviewers: brecht
Reviewed By: brecht
CC: campbellbarton
Differential Revision: https://developer.blender.org/D367
|
|
and done at PBVH update time, since it is possible to have no triangles
to display in a buffer if node is hidden.
|
|
|
|
While hiding, flush the hidden flags to the faces. This avoids iterating
through all the loops while updating the GPU buffers.
|