Graphics

Reply

Member

Member
Hexage
Posts: 3
Registered: ‎30-04-2012
Message 1 of 3 (208 Views)

SetVertexBuffer with offset

Hello,

 

we're porting some of our games (http://www.hexage.net) to PSS and it's pretty straightforward thanks to our existing XNA code base. However we've hit the wall when using a vertex buffer with offset. Is there any equivalent to XNA function GraphicsDevice.SetVertexBuffer(VertexBuffer buffer, int offset) in PSS?

 

http://msdn.microsoft.com/en-us/library/ff434458(v=xnagamestudio.40).aspx

 

If there is not, is there any chance that it'll be introduced by a later revision of the SDK?

 

In our case we're using separate buffers for vertices and indices. The indices represent separate quads. The index buffer is shared (re-used) by different vertex buffers as there is no point to have multiple index buffers (indices for quads are always the same). We're grouping vertices to one larger vertex buffer (to avoid zillions of small buffers) and then using the offset to set the first vertex for the "zero" index.

 

Thanks,

David

Please use plain text.

Re: SetVertexBuffer with offset

I don't have access to my dev PC right now but I assume that's what the offset parameter in DrawArrays() does?

Martin Caine
Founder and Lead Programmer of Retroburn Game Studios

Twitter | LinkedIn | Facebook
Please use plain text.

Member

Member
Hexage
Posts: 3
Registered: ‎30-04-2012
Message 3 of 3 (185 Views)

Re: SetVertexBuffer with offset

There is no offset parameter in DrawArrays; there is a "first" parameter though (as in OpenGL) that allows you to skip the given number of vertices. However when you're using indices then it skips indices, not vertices; so you can't actually use it as an offset.

 

Anyway, thanks for the reply.

 

 

Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。