Skip to main content
GameDev.net gamedev.net
🔒 Locked

Lightning fast 2d engine specifics

Started by Maverick the divider Jun 4, 2002 at 1:24 PM 1 replies 250+ views
Original Post
Maverick the divider
Maverick the divider
Hi Could someone, anyone clear out what is the best way to create a 2d engine in directgraphics that''s ment for speed. As far as I can see, there are options: a) 1 vertex buffer with 4 vertices, each sprite is drawn on the modified vertices. The Z buffer is disabled, so you draw everything like in good old DirectDraw - on top. b) 1 vertex buffer with a selectable amount of vertices for each texture, each holds 6 vertices (4 if indexing is used) for each sprite drawn. The Z buffer is enabled, so we need to control the Z level also. c) 1 vertex buffer for everything, seperate index buffers for textures, same as ''b'' any other ideas? --- Keep it simple, stupid
---Quite soon...ICQ: 163187735
Jim Adams
Jim Adams
I would personally use a vertex shader with four vertices. The shader would position the quad during every blit, plus modify the texture coordinates on the fly. Either that, or wait for DX 9...



Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
Maverick the divider
Maverick the divider
So basicaly you mean the first option from the list right?


---
Keep it simple, stupid
---Quite soon...ICQ: 163187735

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.