The basics...(please move)

Started by
0 comments, last by Grain 14 years, 3 months ago
First off let me state that I'm using SlimDX and C# and want to make a 2D renderer that has a look similar to Geometry Wars ie colorful vector graphics. But I'm not actually making a game that's anything like GW, it's just the look of it I like. I want to use this renderer in several projects actually. Anyhow, I'm a novice when it comes to graphics programing and I want to know the best practices for passing lines and points and all that to the graphics card in an efficient manner. I remember from a few years back dealing with openGL that it was better to load every thing into a contiguous memory area and pass the whole thing at one shot. I'm amusing this still hold true? The problem I'm facing is that I have many small shapes that are all updated independently. Each of these objects would store just a handful of points (x and y values and a color value, maybe a "glow" parameter). Passing each individually seems inefficient and copying each into a big array and passing that to the GPU seems expensive. (lots of copies). I had an idea to just have a general pool of points stored in a contiguous array, and have each object store references to the points in that array that belong to it and just update them as needed. Then the renderer goes over that whole array in one shot. Sound good? Or am I over thinking it? If I'm barring up the wrong tree then what would a good render loop look like, and what kind of structure should I use to store or pass my geometry data to the GPU? Also what specific SlimDX calls am I looking for to render everything. [Edited by - Grain on February 16, 2010 8:22:47 AM]
Advertisement
Could a moderator move this to the DirectX section please.

Thanks.

This topic is closed to new replies.

Advertisement