<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Direct3D 10 </title><link>http://forums.xna.com/forums/29.aspx</link><description>Only questions about the Direct3D 10 API are permitted here.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: drawing method dx10</title><link>http://forums.xna.com/forums/thread/194484.aspx</link><pubDate>Mon, 29 Jun 2009 09:50:56 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:194484</guid><dc:creator>giugio</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/194484.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=194484</wfw:commentRss><description>my problem is that now i created a mesh class inherited from a baseMesh
class for each type of shader that i have with all the initialize of
the shader and bind resources.&lt;br /&gt;
The problem is that for each new shader i must create a new mesh class.&lt;br /&gt;
Another problem is that if i have a hierarchy of mesh generic draw
classes i can&amp;#39;t implement another type of hierarchy for ex.
baseHumanoidMeshClass ,genericHumanoidMeshClass,enemyHumanoidMeshClass
ecc... for the humanoids in my game and i must incapsulate the geometry
meshes in these classes.&lt;br /&gt;
I&amp;#39;m search to separate the geometry to the drawing and resources.&lt;br /&gt;
&lt;br /&gt;
There are any other methods that should advice to me?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks.</description></item><item><title>drawing method dx10</title><link>http://forums.xna.com/forums/thread/194070.aspx</link><pubDate>Sat, 27 Jun 2009 18:17:59 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:194070</guid><dc:creator>giugio</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/194070.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=194070</wfw:commentRss><description>hy.&lt;br /&gt;
i&amp;#39;m think on a solution for draw meshes and classes in dx10 and c++.&lt;br /&gt;
My idea is to use a MVP(model view presenter pattern) and a class material.&lt;br /&gt;
All is focused on a class that define &amp;quot;the material&amp;quot; , the material it&amp;#39;isnt like at dx9 , but is a class&lt;br /&gt;
that define the method of drawing and the resources.&lt;br /&gt;
this for separate geometrics data from the &amp;quot;logic&amp;quot; of draw data.&lt;br /&gt;
It carry itself the resources(the data of textures , material ,color ecc..) of the mesh and the shader type.&lt;br /&gt;
the class that link the model and the view(that is the mesh and both contains geometric data and material data)&lt;br /&gt;
is the presenter , that contains a pointer to the model&lt;br /&gt;
and take the data from the view.&lt;br /&gt;
At first the mesh call a method of the presenter , like initialize() and the presenter get the data from&lt;br /&gt;
the material class (texture ecc...), then call on a Model(the model class have a collection of all the shaders)&lt;br /&gt;
the function initialize, that create or get(if there is arleady) the shader from the type in a factory &lt;br /&gt;
, and set the resources always in the model , now I have a shader with all the resources and i can draw.&lt;br /&gt;
&lt;br /&gt;
finally the mesh call the draw() method of the presenter ,the presenter take the geometric data and the &lt;br /&gt;
ready shader and draw.&lt;br /&gt;
&lt;br /&gt;
Then if i change a shader or the resources i don&amp;#39;t must change all the mesh classes that work in that mode, &lt;br /&gt;
i change the method on the model that get or initialize the shader and all the meshes work like before. &lt;br /&gt;
&lt;br /&gt;
also i must have a more controls on the resources and the shaders that can be all in the model and not sparse&lt;br /&gt;
in the classes.&lt;br /&gt;
&lt;br /&gt;
Can be a good method?&lt;br /&gt;
by</description></item></channel></rss>