Jump to content
  • Advertisement
Sign in to follow this  
Grain

OpenGL The basics...(please move)

This topic is 3050 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!