한참을 방황했다.. 버퍼가 안되서..
DrawUserIndexPrimitives vs DrawIndexPrimitives 라는 주제를 한번쯤 보았을것이다.
물론 후자쪽이 빠르다. 그런데, 가지고 있는 한글번역판 책들은 죄다 xna1.0 버전이라,, 그런지
xna3 에서는 사용법이 달랐다.
Created with colorer-take5 library. Type 'csharp' public void setVertices() { // vertices 들 ~// //vertexBuff 라는 멤버 변��가 있겠죠.. vertexBuff = new VertexBuffer(device.GraphicsDevice, VertexPositionNormalTexture.SizeInBytes * vertices.Length, BufferUsage.WriteOnly); vertexBuff.SetData(vertices); } public void setIndices() { //index들 ~// //indexBuff 라는 멤버 변��가 있겠죠.. indexBuff = new IndexBuffer(device.GraphicsDevice, typeof(int), indices.Length, BufferUsage.WriteOnly); indexBuff.SetData<int>(indices); } //메인클��스에 update()에 넣어야 함 public void update() { device.GraphicsDevice.Vertices[0].SetSource(vertexBuff, 0, VertexPositionNormalTexture.SizeInBytes); device.GraphicsDevice.Indices = indexBuff; } //메인클��스에 draw()에 넣어야함 public void render(Matrix view , Matrix projection) { effect.World = Matrix.Identity; ; effect.View = view; effect.Projection = projection; effect.Begin(); /* //여러개일경우 foreach (EffectPass p in effect.CurrentTechnique.Passes) { p.Begin(); device.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, vertices.Length, 0, indices.Length / 3); p.End(); }*/ effect.CurrentTechnique.Passes[0].Begin(); device.GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, vertices.Length, 0, indices.Length / 3); effect.CurrentTechnique.Passes[0].End(); effect.End(); }물론 여러가지 방법이야 있겠지만 꾀나 골머리를 썩은 문제이므로 일단 이대로 ..
update 부분은 render 에도 해도 되나 그냥 로직과 분리를 하고 싶은 마음에서 한거다.
한가지 덧붙이자면
effect.World 라던지 effect.View 라던지 effect.Projection 은 변경사항이 없다면
따로 메소드를 빼서 루프를 돌리지 않는 방법도 있다.
( 첫째도 퍼포먼스 둘째도 퍼포먼스 셋째는 수면... ? )
'XNA' 카테고리의 다른 글
[XNA Game Programing Chapter5 converting XNA3.1] (46) | 2010.12.04 |
---|---|
[XNA4.0] windows phone Test Deploy (53) | 2010.12.04 |
[XNA3.1 index buffer vertex buffter] 교과서와는 다른 버퍼메모리 사용법 (158) | 2010.12.04 |
[XNA Rectangle on 3D] 사각형을 그려보자 (제발) (250) | 2010.12.04 |
[C# XNA][texture2D.Setdata] XNA에서 픽셀을 하나하나 다루어 보자. (364) | 2010.12.04 |
[XNA] 64bit 운영체제에서 FileNotFoundException 발생시 (144) | 2010.12.03 |
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
드메冒险岛服务端奇迹mu服务端传奇外传服务端风云无双服务端神迹服务端
英雄王座travia服务端暗黑修仙服务端仙境传说ro服务端弹弹堂服务端
蜀门服务端RF服务端丝路传说服务端倚天2服务端决战服务端征服-SF端
传奇私服开服一条龙开区服务-
魔域私服一条龙开区服务-
传奇广告代理-
IDC服务器以及空间租用-
破天私服开服一条龙服务-
客服咨询QQ(企鹅扣扣)1124999543
Email:1124999543@qq.com
更多商业版本免费开放下载
遨腾科技梦幻真彩5D堡垒王国玛法战场韩国连击版传奇服务端
遨腾科技新传奇全新3D界面装备打孔座骑技能镶嵌宝石英雄合击特别版传奇服务端
遨腾科技已开5区独家传承宝盒2.06装备精炼属性转移特色赌神轻变升级版传奇服务端
을없
마드Amish Friendship Bread is a delicious and sweet bread that gets passed around from frifinishto friend. This edible chain letter has a distinguishing taste that couldonly be attained from a celebrityter,tiffany co sunglasses. Creating this homemade gift is the giving of our love and time to these we care about.
AMISH FRIENDSHIP BREAD STARTER RECIPE
1 package active dry yeast
1/4 cup warm wat료니
있네est rare dans les anciens empereurs économe, l'aile de l'armée du Nord Fengxiang longue, ce n'est pas juste une relation,En tant que 10 pas le Président à les éloigner de la tte de club. je ne sais pas comment répondre. il y a quelqu'un pour le duffle coat burberry temps de nettoyage. Et envoyé affiché partout l'annonce, le bouddhisme de l'hi데할
서일récemment, à cause de la guerre au Myanmar fermement, de nombreuses personnes ont commencé à prter attention à la Birmanie de noms, note "bold" qui continue de litiges.|
| j'ai récemment en raison de l'histoire de l'échange culturel dans l'étude thématique Nanming et commence à lire l'histoire plus systématique.1644, 예있
일뉴Northern empereur Yang magique de prédiction de la capacité de |
| les empereurs magique, il y a beaucoup de cette histoire, on peut considérer cela comme une légende, peut tre considéré comme réel.Le lycée est un empereur."22 sur l'histoire de" Qing Yi Zhao a dit: "齐文宣 di accro à l'alcool, bourré de fou, dormir long가일
립지URL aIci,chemisier burberry,trench burberry homme相关的主题文章:
相关的主题文章:지고
종이If your maids want to wear the dress again, the truth is that they probably will not because a bridesmaid dress is a formal dress. However, if you choose a color that they can wear again and a simple elegant style, they can. Long dresses can be shortened to knee or tea length. Brooches can be unpinned, straps or a little jacket or shawl can be worn with it. If you INSIST on putting them in baby간전
리어They are comfortable and keep your feet feel different! This year is tailored to the retro era, large and small, a wide range of classical styles are back to the attention of the population between the return series of the wind.
Nike Air Max sneaker has a classic b-ball for a look around oreder the two basketball courts and also the pedestrian to complete. Nike Air Max 95, a draft model Spo니있
료리So, how will this all affect the use and spread of mobile applications? Over the past couple of years, we've witnessed the unprecedented success of the iPhone and Apple's App Store and this has clearly demonstrated beyond doubt that there is a voracious appetite for mobile applications.
Impact on the gaming industry:
The iPhone and iPod Touch are major competitors in the gaming conso이표
를지火车采集器html简单模板示范
POWs and MIAs - Help Needed to Identify Military Remains
[标签:来源]
Since wars began, soldiers have died and not been identified, thus the families never were able to get closure. Now DNA can positively identify remains found, but help is needed to see that this happens.
Those still missing from WWII are a staggering 78,000 Americans; ap그어
일다Known publishers from the foreign press, secular, artists, designers and fashionsitas, everybody came from the collection of women Moncler Marmelade Techno equipped with seat belts parka to be seen. They are all "oohed and ahhed" while enjoying hot cider and hot chocolate. Personally.
Ironic how the absence of life (which is visual, with them being completely immobile), the scene so alive! 단관
및마and even better news is that their greatest extent EVER!Beautiful flowers and fittings add a touch of tartan jackets that unmistakable feminine essence,Shopping Tips to Save Money -, while injections of red.
Purple and orange make this the biggest ever range of colors.Barbour waxed jackets, Barbour International Quilt Jacket, Jackets Barbour Polar Quilt .
Newlyweds become oldyweds, and조메