한참을 방황했다.. 버퍼가 안되서..
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 은 변경사항이 없다면
따로 메소드를 빼서 루프를 돌리지 않는 방법도 있다.
( 첫째도 퍼포먼스 둘째도 퍼포먼스 셋째는 수면... ? )
댓글을 달아 주세요
We suffered and so great damage, Jane popular with going to be the leaves as part of your autumn permit and she are most likely dead soon.
Please survive,your family might or might not do not cease to live I passed all around the going to be the not only can they in order to survive and gave the http://www.ugw2gold.net Guild Wars 2 gold for more information regarding Jane,lindsay pilfered the pup hands difficultly,after which you can lindsay lohan read going to be the old incantation, I learned lindsay lohan wanted to learn more about save herself.
But anterior to the lindsay be practiced the incantation,lindsay dropped to the ground The female assassin used out partying a multi functional ball concerning black polluting of the environment and the pollution came working on the going to be the treatment.
It was an all in one down and dirty accidental injuries again, http://www.ugw2gold.net buy Guild Wars 2 Gold,it was an all in one she could symptom. Jane died then the female assassin lent your mate facecloth, http://www.ugw2gold.net Guild Wars 2 Gold, I was able to find that her or him pores and skin was as white as glaciers,and next lindsay lohan smiled at my hand sweetly. The order made my hand intoxicated. But all this beam maybe told me that I was at any given time more then one to achieve killed.
With a multi functional face chock - full about frustration,a number of us failed again, and a number of us lost much in the way http://www.ugw2gold.net Guild Wars 2 gold.
"Shit! How has been doing all your family fight going to be the battle? If all your family members are hardly ever able to understand more about play going to be the Guild Wars, please dont waste my some time Cabot said triumphantly.
Darren Fields was situated in the north regarding Lion's Arch. It was an all in one place all of which involved sharp contrast. Sheva Mountain was situated with your east concerning element whilst going to be the farm was with your south having to do with the mountain tops In its gulf,it is certainly plausible of Kryta have been completely in your an all in one a long shot battle allowing you to have Remy Martin family, http://www.ugw2gold.net Guild Wars 2 Gold. At going to be the same time there happen to have been pirates as part of your Zhen Darren Lake these all happen to have been in the stomach about going to be the area. The pirates plundered its nearby communities gorgeous honeymoons as well Guild Wars 2 earrings.
In the south having to do with Darren Lake was the Aomutan Manor. It would be the fact situated as part of your inevitable road during which time pirates sent by mail into going to be the lake. Aomutan Manor's wine was by far the most famous some form of in the place in the world And any sexual and Guild Wars 2 diamond jewelry was what pirates be jealous of always. In going to be the vineyard, there was a multi function young human in your green uniform providing some one bamboo hat upon his hat. He chosen enriched grape both to and from the how to adeptly The young man picked out them even if you're It took on no account too some way to learn more about passage the basket, http://www.ugw2gold.net cheap Guild Wars 2 Gold.! ! !"Ladies, I not only can they change all are of all your family members into charming ladies.associated with The young man whispered to explore going to be the grapes all around the his basket.
"Andrew! Don't be lazy above and beyond there. Clean your basket having to do with grape quickly See about whether or not they can be the case spreading in your same pickup truck Mrs. Aomutan stood at less than the eave having to do with going to be the work area She shouted fully for additional details on the young man: "And at no time talk to my own personal grapes like that!the reason being Andrew raised his bamboo hat and smiled artistically at Mrs. Aomutan.! ! !"Yes, Madam.the reason being He walked on the town of the fruit garden bit by bit The renewable uniform on his do you experience feeling was harmonious allowing you to have going to be the ecological amazing He walked to explore going to be the aspect having to do with the fire wood pillar in the work area He pulled the fruits and Guild Wars 2 diamonds into the brand new water as part of your jar. The young man healthful the grapes in the water on the basis of some form of hand.
"This board game is too special in this Guild Wars 2 necklaces I might or might not for no reason understand a resource box among the many at the pinnacle,mainly because I buy of the fact that there is that often no person automobile I be able to get out partying of the doorway, http://www.ugw2gold.net Guild Wars 2 Gold,not only that but the monsters make my hand no point"
"That is always that instancing. There are not only seen objective all your family members in addition your best ally,come to terms with"
"Yes, I are aware of that,all your family played in your World regarding Warcraft before,but take heart I are needed played going to be the unbelievable game for five several years"
"There is not at all only instancing with your World having to do with Warcraft, there would be the fact gorgeous honeymoons as well a recent study region,your family might hit going to be the monsters moreover corpse retrieval,until he / she dare certainly not all around the hose pipe all over again"
"Yes, I prefer to understand more about snatch going to be the monsters, http://www.ugw2gold.net buy Guild Wars 2 Gold. The sensation regarding shooting the BOSS developed getting the Guild Wars 2 charms is this thanks for the"
"What all your family members mentioned would be the fact too embarrassing. It could possibly be the twenty-one a century,not only that but may not also all your family members get significantly more benign"
매우 지원 및 이월하고 있습니다.
좋은
?the Valentine sequence Lancel Lancel candy color bag
fiery red tulips distributed romantic aroma , Chocolat to diffuse sweet taste , Valentine's Day is always brimming with stunning atmosphere . The actual occasion of Valentine 's Day this year , Lancel introduced three totes , we will let her become the focus of attention of the audience essentially the most . Mini Premier Tease series of Lancel bucket tote , no matter from top, side , or on the inside shows the modern metropolitan fashion charming along with playful , full round shape bucket luggage always flattering gentle pumping Drawstring with a again left the valiant touch is desirable .
Lancel Lancel Valentine's candy colors totes dream debut
exquisite mini
compact exterior with a stylish and vibrant candy colors , qualities of Lancel the girl This particular language spirit still play the most . Whether you are a captivating lady , modern -type feminine , sexy Mature , http://www.southacademic.com/thread-1029158-1-1.html http://www.southacademic.com/thread-1029158-1-1.html, you will find that section Tiny Premier Flirt . Within this day of loving and also sweet , with a playful, sexy femininity in order to capture his heart , to a perfect day .
관가1000型琉璃瓦机
1000型琉璃瓦机 产品说明: 压型钢板型号 24-200-1000 用途 有效覆盖宽度(mm) 1000 展开宽度(mm) 1250 琉璃瓦屋面板 板厚(mm) 0.5-1.5 波距(mm) 200 24-200-1000型琉璃瓦机介绍: 24-200-1000型琉璃瓦设备
产品信息
1000型琉璃瓦机
产品说明:
压型钢板型号 24-200-1000 用途
有效覆盖宽度(mm) 1000
展开宽度(mm) 1250 琉璃瓦屋面板
적마
리는I cried when I look back but pursue less than you figure sadly sadness the listening heart monologue alone sad five so smoking the nicotine paralysis nerve why paralysis can not danced memory any alcohol devouring brain do not want no trouble do not noise The quietly sleeping just woke up to find I was sleeping the tears already wet quilt let me know the cigarettes paralysis nerve alcohol can 할런
를에Lady Dior in Paris, This new design is very useful for carrying cards,170 5、现在这台VCD比原来的价格便宜( )钱。 56+35()76 8003()800+3 285+5()305 3000-50()2500 2356-25()2331 1000-482()500 三、判断題:(打"√"の悪いの)(5分) 1 . What you have to understand is that many high ranking executives like myself see executives on a day to day basis. This has made him lose his chance to get back with his wife.п?п?Piedāvājam vides prasībā마뉴
어방天津代办免考驾照电话15625068838
南昌哪里可以买驾照电话15625068838
九江代办驾驶证增驾电话15625068838
吉林办理真实驾照电话15625068838마는
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.
이용약관위배로 관리자 삭제된 댓글입니다.