Commit Graph

7 Commits

Author SHA1 Message Date
Robert Bragg
0273b13d75 test-cogl-pixel-array: fix how data is initialized
There was a missing '* 4' and '* i' in the for() loops that initialized
the first test buffer, so it was containing uninitialized data causing
the test to fail.
2010-07-06 12:07:28 +01:00
Robert Bragg
8a5aed36fe pixel-array: Only allow allocation of arrays with a 2D size
This removes cogl_pixel_array_new which just took a size in bytes.

Without the image size and pixel format then the driver often doesn't
have enough information to allocate optimal GPU memory that can be
textured from directly. This is because GPUs often have ways to
spatially alter the layout of a texture to improve cache access patterns
which may require special alignment and padding dependant in the images
width, height and bpp.

Although currently we are limited by OpenGL because it doesn't let us
pass on the width and height when allocating a PBO, the hope is that we
can define a better extension at some point.
2010-07-05 15:20:04 +01:00
Robert Bragg
54f4a3a752 rename CoglPixelBuffer to CoglPixelArray
This renames CoglPixelBuffer to CoglPixelArray to be consistent with the
new CoglVertexArray API.
2010-07-05 15:20:04 +01:00
Robert Bragg
57341dbb60 cogl-buffer: make the COGL_BUFFER_USAGE_HINT private
The usage hint should be implied by the CoglBuffer subclass type so the
public getter and setter APIs for manually changing the usage hint of a
CoglBuffer have now been removed.
2010-07-05 15:20:04 +01:00
Emmanuele Bassi
fef82fae5c build: Enable experimental COGL API in tests/conform
Enable the experimental API when building the conformance test suite.
2010-02-15 11:58:55 +00:00
Damien Lespiau
c02dded0f6 cogl-buffer: Use TEXTURE as the only value for CoglBufferUsageHint
We should try to use more explicit defines than GL for our hints. For
now we only support using a CoglBuffer to generate textures.
2010-02-08 17:14:49 +00:00
Damien Lespiau
b5d5821304 tests: Add a test for CoglPixelBuffers
Exercise the whole public CoglBuffer / CoglPixelBuffer and
cogl_texture_new_from_buffer API.
2010-02-08 17:14:49 +00:00