another BufferStrategy bug?

This isn’t a crash bug, so don’t worry :slight_smile:

its more of a specification bug.

frame.createBufferStrategy(2, new BufferCapabilities(new ImageCapabilities(true), new ImageCapabilities(false), null));

What would you expect this method to do?

I would expect it to create a buffer strategy with 2 buffers, the front buffer would be in vram, the back buffer[s] would be in main memory.

Hwoever, this is NOT what it does, it creates them all in vram.

Infact, whatever ImageCapabilities are passed in, it seems BufferStrategy always allocates the frame buffers in vram if its possible.

I’ve already highlighted in the past that having your back buffers in vram is not always desired (for instance, if you are performing software pixel operations).

So, is this a bug?

I’m going to stick out my neck, and try to answer your question in an indirect way.

If I understand the purpose of using BufferStrategy, that is to get better performance. Doesn’t trying to use buffers in system RAM ruin that perfomace gain? Why not just use the old methods of creating off-screen buffers?

[quote]I’m going to stick out my neck, and try to answer your question in an indirect way.

If I understand the purpose of using BufferStrategy, that is to get better performance. Doesn’t trying to use buffers in system RAM ruin that perfomace gain? Why not just use the old methods of creating off-screen buffers?
[/quote]
I see BufferStrategy as a way of encapsulating rendering, whether it is vram accelerated buffering, or simply a back bufffer in system ram.

As for the issue about speed - there are certain circumstances where you want to use a back buffer in main memory.
I know you can create the back buffer in main memory using the traditional method, I just thought it’d be alot neater if this functionality was encapsulated within the BufferStrategy class.

It even looks like this was the intended fuunctionality, as the ImageCapabilities class is used to define the desired capabilities of both the front buffer, and the back buffers.