Comments (8)
It's interesting, But, how to detect which vertices are modified ? Set a modification flag per vertices ?
If this is the only case we need first to optimize data send to the VBO.
from upbge.
how about when we move a vert or change the vertex color , add it to the list?
from upbge.
So just a list of index of vertices ? maybe the index + a modifiaction flag like the current one in RAS_MeshObject.
e.g:
struct VertexModified
{
unsigned int index;
char flag;
}
So it will be :
RAS_MeshObject::SetVeterxModified(array, VertexModified(index, RAS_MeshObject::POSITION_MODIFIED)
from upbge.
To reduce the glBufferSubData call i have an idea:
We store all vertex index in a list, we sort the index and iterate on all indices.
If an index = next_index - 1 we remove the index (if it's not the first one). By doing this we will get a list of continuous modified vertexes, e.g:
0:9, 16:18, 150:201
After this sort stage, we use glMapBufferRange to update these part of the buffer (iirc we can multi thread these call) and finally a glUnmapBuffer.
from upbge.
Would this be compatible with GLSL shaders already compiled (gpu_material.c and gpu_shader_material.glsl) that use gl_Vertex?
from upbge.
Why did you close this?
On Sun, Jul 24, 2016 at 8:37 AM, Diego Lopes [email protected]
wrote:
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#42 (comment), or mute the
thread
https://github.com/notifications/unsubscribe-auth/AG25WScXkGPIacl5ldW0j1-p_vjkKbiyks5qY4aogaJpZM4HhKtR
.
from upbge.
I have a better approach. Whenever the user calls the method to change a vertex or the vertex data, switch a boolean isChanged to true, then before rendering check if it has been changed. Then switch the isChanged variable back to false and update the vertex data in the VBO.
from upbge.
This is already done by the RAS_MeshObject::m_modifiedFlag and RAS_IStorageInfo::SetMeshModified.
from upbge.
Related Issues (20)
- logic setup crashes upbge HOT 1
- Program crashed when i press p / error code: "EXCEPTION_ACCESS_VIOLATION" HOT 2
- Physics abruptly stop working randomly
- VERSION 0.4.0 importing and converting objects from other Blend files causes a crash IF you are in camera view. HOT 1
- No available Apple Silicon download HOT 9
- 0.3+: Mouselook bug HOT 1
- Flatpak/Snap releases? HOT 3
- 0.3+: blenderplayer leaks reported from 6 to 8 HOT 1
- 0.3+: Parent/children replication remapping issue
- Component scripts freezing and not updating HOT 2
- 4.1: `sensor.link(controller)` and `controller.link(actuator)` seem to cause an access violation HOT 3
- UPBGE 0.3 cant go back to Previous scene
- UPBGE crashes when moving UPBGE window while game plays
- Cannot change theme of Logic Bricks Editor HOT 1
- UPBGE crashes when python script has syntax error
- UPBGE 0.4.1: instances of Collections that use "LOD"cause crash.
- development idea : build ubpge around bforartists
- Wayland Flickering UI HOT 1
- Viewport "Zoom In" using Embedded Start
- AliceLG Aden (Lookingglass for Blender)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upbge.