opengl es - opengles 2.0 2D scene graph implementation -


I want to create a 2D open engine to use for my apps. This engine should support a visible graph. Each node in the graph can have its own shader, texture, content and conversion matrix, according to which its parent node. But I am new to open 2.0 and so I have some questions:

  1. How does the Matrix Multiplication 2.0 work in the open? Is this a good way to attract first parents, then this is the child's nodes (this model will give some optimization while multiplying matrices) Where is matrix multiplication? Should I do it on a CPU or a GPU
  2. Is it a better way to attract nodes according to the shader's use, then for texture and content? How do I apply visual graph changes in this case (CPU or GPU and how)?

    How does the Matrix Multiplication 2.0 work in the open? Is this a good way to attract first parents, then this is the child's nodes (this model will give some optimization while multiplying matrices) Where is matrix multiplication? Should I do it on a CPU or GPU?

    Except some ancient SGI machines, conversion matrix times were always on the CPU. However, it is possible to multiply the matrix in a shader, but it should not be used to implement conversion changes. You should use a small linear algebra library or apply it. If it is ready for 4x4 identical transformations, then it is used in 3D graphics, it can be applied under 1k lines of C code.

    Instead of depending on the old OpenGL matrix stack, which has been disliked and removed from later versions, for every level in the Transaction Stack, you make a copy of the current matrix, apply the next transformation on it Do and Provide New Matrix in Transformation Uniform.

    Is it better to use it according to the shader approach to draw nodes, then for texture and content? How do I apply visual graph changes in this case (CPU or GPU and how)?

    Usually uses a two-phase approach to a rendering. In the first step, you can draw objects and all about the drawing input data (shader, texture, conversion metrics). Collect information and put it in a list. You can then sort that list according to some criteria. The state wants to reduce the total cost of changes.

    The most expensive type of state is making the text change because it invalidates the cache, there are some costs by creating a texture between the texting units, but the shaders are still cheaper than switching, which is the performance path predictor Invalidates the status of Changing uniform data is very cheap, so the uniform should not be worried about frequent switches. So if you can make enough settings through the uniform, do so though you must know that the conditioner has a display in the conditional code, so you need to balance the cost of changing the shaders with the cost of the conditional shader code. Will happen.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -