On Mon, Jan 25, 2010 at 5:49 PM, Florian Bösch <[email protected]> wrote:
> On Jan 25, 11:29 pm, Tristam MacDonald <[email protected]> wrote: > > Blending (i.e. glBlend, et al) is not deprecated. No change over GL 2.x. > > Blending is "fixed" as in "not programable". Claiming a programmable > pipeline when in fact you're operating a semi-fixed one is odd. It is a hardware limitation, not an API issue. Even DirectX 11 class GPUs don't have support for fully programmable blending. However, if you need programmable blending it is perfectly possible to use an intermediate render target and perform the blend in an additional pixel shader. I refrained from mentioning this before, because it is somewhat self evident that anything can be done with sufficient indirection. > > Arrange your data better - the same issue would arise with CPU-side > vertex > > arrays, or indeed immediate mode (i.e. have to reallocate the array). > > > > However, you can for both vertex arrays and VBOs emulate a circular > buffer > > using two draw calls to allow use as a double-ended queue. > > I'm not saying the issue isn't there in immediate mode, but it *is* an > issue, especially since we do not have vram to vram memmov. Using one > VBO draw call to blit out 2m triangles is only faster if your > primitive count is static over many frames. As soon as you begin > adding/removing lots of primitves every frame, and you'd translate > that as a bunch memmoves on a stream mapped VBO, you quickly are much > slower then immediate mode of any kind. In that case, sort the vertex buffer on the GPU. For GPU-based particle systems I perform VRAM -> VRAM memmove via either render-to-texture or transform-feedback (Stream Out in DX parlance), in order to sort the particles. For more complex tasks, histopyramid expansion ( http://openvidia.sourceforge.net/index.php/HistoPyramids) is a very flexible method to perform most types of computation directly on textures and vertex buffers, including the task of creating additional geometry on the GPU. -- Tristam MacDonald http://swiftcoder.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
