home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
People with DirectX knowledge wanted!
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Frodo" data-source="post: 9332" data-attributes="member: 10277"><p>Ok, here's what we do now:</p><p>1. I create 1 big vertexbuffer per texture (lets say a button)</p><p>2. I update the vertex buffer with all positions of all buttons onscreen</p><p>3. I render the screen (no updates/locks here)</p><p>4. goto 3</p><p></p><p>Now when something changes, say position or color of a button changes then I update the position of the changed button in the vertex buffer ( 1 lock) This can happen for example when you scroll through a thumbnail list and then go back to step 3</p><p></p><p>So at the moment i only do a few vertexbuffer locks when something changed (coordinates or color of a texture)</p><p>For the rest i just do</p><p></p><p>Foreach (Texture tex in onscreentextures)</p><p> DX9Device.SetTexture(tex )</p><p> DX9Device.SetStreamSource(tex )</p><p> DX9Device.DrawPrimitive(...)</p><p>Next</p><p></p><p></p><p>Vertex buffer/textures are created with Usage.None & placed in Pool.Managed. </p><p>Reason for this is that the resources stay valid when the user resizes the screen ( windowed<->fullscreen) </p><p>I tried Usage.Dynamic & Pool.Default, but it didnt give me a better performance</p><p></p><p>Frodo</p></blockquote><p></p>
[QUOTE="Frodo, post: 9332, member: 10277"] Ok, here's what we do now: 1. I create 1 big vertexbuffer per texture (lets say a button) 2. I update the vertex buffer with all positions of all buttons onscreen 3. I render the screen (no updates/locks here) 4. goto 3 Now when something changes, say position or color of a button changes then I update the position of the changed button in the vertex buffer ( 1 lock) This can happen for example when you scroll through a thumbnail list and then go back to step 3 So at the moment i only do a few vertexbuffer locks when something changed (coordinates or color of a texture) For the rest i just do Foreach (Texture tex in onscreentextures) DX9Device.SetTexture(tex ) DX9Device.SetStreamSource(tex ) DX9Device.DrawPrimitive(...) Next Vertex buffer/textures are created with Usage.None & placed in Pool.Managed. Reason for this is that the resources stay valid when the user resizes the screen ( windowed<->fullscreen) I tried Usage.Dynamic & Pool.Default, but it didnt give me a better performance Frodo [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
People with DirectX knowledge wanted!
Contact us
RSS
Top
Bottom