~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to cogl/cogl-framebuffer-private.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Rico Tzschichholz
  • Date: 2013-02-26 16:43:25 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130226164325-t4z9rylpa20v0p6q
Tags: 1.13.4-0ubuntu1
[ Jeremy Bicha ]
* New upstream release
  - soname bump
* debian/control.in:
  - Bump minimum glib to 2.32
  - Drop obsolete breaks/replaces
  - Bump libclutter-1.0-dev breaks for soname transition
* debian/libcogl-dev.install:
  - Add some missing files

[ Rico Tzschichholz ]
* debian/control.in:
  - Build-depend on libxrandr-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#define __COGL_FRAMEBUFFER_PRIVATE_H
26
26
 
27
27
#include "cogl-object-private.h"
28
 
#include "cogl-matrix-stack.h"
 
28
#include "cogl-matrix-stack-private.h"
29
29
#include "cogl-clip-state-private.h"
30
30
#include "cogl-journal-private.h"
31
31
#include "cogl-winsys-private.h"
53
53
  CoglBool need_stencil;
54
54
  int samples_per_pixel;
55
55
  CoglBool swap_throttled;
 
56
  CoglBool depth_texture_enabled;
56
57
} CoglFramebufferConfig;
57
58
 
58
59
/* Flags to pass to _cogl_offscreen_new_to_texture_full */
104
105
  COGL_READ_PIXELS_NO_FLIP = 1L << 30
105
106
} CoglPrivateReadPixelsFlags;
106
107
 
 
108
typedef struct
 
109
{
 
110
  int red;
 
111
  int blue;
 
112
  int green;
 
113
  int alpha;
 
114
  int depth;
 
115
  int stencil;
 
116
} CoglFramebufferBits;
 
117
 
107
118
struct _CoglFramebuffer
108
119
{
109
120
  CoglObject          _parent;
126
137
  float               viewport_y;
127
138
  float               viewport_width;
128
139
  float               viewport_height;
 
140
  int                 viewport_age;
 
141
  int                 viewport_age_for_scissor_workaround;
129
142
 
130
143
  CoglClipState       clip_state;
131
144
 
132
 
  CoglBool            dirty_bitmasks;
133
 
  int                 red_bits;
134
 
  int                 blue_bits;
135
 
  int                 green_bits;
136
 
  int                 alpha_bits;
137
 
 
138
145
  CoglBool            dither_enabled;
139
146
  CoglColorMask       color_mask;
140
147
 
141
 
  int                 samples_per_pixel;
142
 
 
143
148
  /* We journal the textured rectangles we want to submit to OpenGL so
144
149
   * we have an oppertunity to batch them together into less draw
145
150
   * calls. */
164
169
  int                 clear_clip_x1;
165
170
  int                 clear_clip_y1;
166
171
  CoglBool            clear_clip_dirty;
 
172
 
 
173
  /* driver specific */
 
174
  CoglBool            dirty_bitmasks;
 
175
  CoglFramebufferBits bits;
 
176
 
 
177
  int                 samples_per_pixel;
167
178
};
168
179
 
169
180
typedef enum {
190
201
  int             texture_level_width;
191
202
  int             texture_level_height;
192
203
 
 
204
  CoglTexture *depth_texture;
 
205
 
193
206
  CoglOffscreenAllocateFlags allocation_flags;
194
207
 
195
208
  /* FIXME: _cogl_offscreen_new_to_texture_full should be made to use
300
313
CoglOffscreen *
301
314
_cogl_offscreen_new_to_texture_full (CoglTexture *texture,
302
315
                                     CoglOffscreenFlags create_flags,
303
 
                                     unsigned int level);
 
316
                                     int level);
304
317
 
305
318
/*
306
319
 * _cogl_push_framebuffers:
319
332
 
320
333
/*
321
334
 * _cogl_blit_framebuffer:
 
335
 * @src: The source #CoglFramebuffer
 
336
 * @dest: The destination #CoglFramebuffer
322
337
 * @src_x: Source x position
323
338
 * @src_y: Source y position
324
339
 * @dst_x: Destination x position
363
378
 * a separate function to copy the entire buffer for a given mask.
364
379
 */
365
380
void
366
 
_cogl_blit_framebuffer (unsigned int src_x,
367
 
                        unsigned int src_y,
368
 
                        unsigned int dst_x,
369
 
                        unsigned int dst_y,
370
 
                        unsigned int width,
371
 
                        unsigned int height);
 
381
_cogl_blit_framebuffer (CoglFramebuffer *src,
 
382
                        CoglFramebuffer *dest,
 
383
                        int src_x,
 
384
                        int src_y,
 
385
                        int dst_x,
 
386
                        int dst_y,
 
387
                        int width,
 
388
                        int height);
372
389
 
373
390
void
374
391
_cogl_framebuffer_push_projection (CoglFramebuffer *framebuffer);
421
438
                                       int texture_level,
422
439
                                       int texture_level_width,
423
440
                                       int texture_level_height,
 
441
                                       CoglTexture *depth_texture,
424
442
                                       CoglFramebufferConfig *config,
425
443
                                       CoglOffscreenAllocateFlags flags,
426
444
                                       CoglGLFramebuffer *gl_framebuffer);
427
445
 
428
 
void
429
 
_cogl_gl_framebuffer_bind (CoglFramebuffer *framebuffer, GLenum target);
 
446
unsigned long
 
447
_cogl_framebuffer_compare (CoglFramebuffer *a,
 
448
                           CoglFramebuffer *b,
 
449
                           unsigned long state);
 
450
 
 
451
static inline CoglMatrixEntry *
 
452
_cogl_framebuffer_get_modelview_entry (CoglFramebuffer *framebuffer)
 
453
{
 
454
  CoglMatrixStack *modelview_stack =
 
455
    _cogl_framebuffer_get_modelview_stack (framebuffer);
 
456
  return modelview_stack->last_entry;
 
457
}
 
458
 
 
459
static inline CoglMatrixEntry *
 
460
_cogl_framebuffer_get_projection_entry (CoglFramebuffer *framebuffer)
 
461
{
 
462
  CoglMatrixStack *projection_stack =
 
463
    _cogl_framebuffer_get_projection_stack (framebuffer);
 
464
  return projection_stack->last_entry;
 
465
}
 
466
 
 
467
CoglBool
 
468
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
 
469
                                           int x,
 
470
                                           int y,
 
471
                                           CoglReadPixelsFlags source,
 
472
                                           CoglBitmap *bitmap,
 
473
                                           CoglError **error);
 
474
 
 
475
/*
 
476
 * _cogl_framebuffer_get_stencil_bits:
 
477
 * @framebuffer: a pointer to a #CoglFramebuffer
 
478
 *
 
479
 * Retrieves the number of stencil bits of @framebuffer
 
480
 *
 
481
 * Return value: the number of bits
 
482
 *
 
483
 * Since: 2.0
 
484
 * Stability: unstable
 
485
 */
 
486
int
 
487
_cogl_framebuffer_get_stencil_bits (CoglFramebuffer *framebuffer);
430
488
 
431
489
#endif /* __COGL_FRAMEBUFFER_PRIVATE_H */