Re: [PyOpenGL-Users] Fastest way to draw lots of points
Brought to you by:
mcfletch
From: Rajan <nag...@gm...> - 2012-10-19 17:32:05
|
The usual idea is that the star field is in one place and the camera moves through it, so the star field can stay static. If you want to move your star field and keep the camera in one place (like a hail storm), you can still get away with a static star field and a shader which adds the dynamic nature to the star field. The shader can take as input the time as parameter and add offset to each starfield coordinate depending on the time. This will be much much faster than sending new starfield coordinates each frame. A major rule of thumb for fast graphics... transfer minimum data between CPU / GPU - whatever you want to send, do it in the beginning and manipulate stuff on the GPU. On Fri, Oct 19, 2012 at 10:02 AM, Ryan Hope <rm...@gm...> wrote: > I think miss the point that this is a moving star field, the points > are in new locations every frame. I dont see how display lists can > help with dynamic data. > > On Fri, Oct 19, 2012 at 1:00 PM, Ian Mallett <geo...@gm...> wrote: > > The most efficient ways to draw points are none of what you have here. > You > > should look into display lists (or better, VBOs). > > > > Most of your overhead is caused by having to transfer all the data across > > the graphics bus to the GPU each frame. Display lists and VBOs both > transfer > > the data once and then invoke the GPU to draw the cached data. > > > > Ian > > > > -- > Ryan Hope, M.S. > CogWorks Lab > Cognitive Science Department > Rensselaer Polytechnic Institute > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |