20 static int get_max_nr_color_attachments(
const context& ctx);
22 static int get_max_nr_draw_buffers(
const context& ctx);
30 void destruct(
const context& ctx);
34 bool create(
const context& ctx,
int _width = -1,
int _height = -1);
36 void set_width(
int _width);
38 void set_height(
int _height);
40 void set_size(
int _width,
int _height);
49 bool attach(
const context& ctx,
const texture& tex2d,
int level = 0,
int i = 0);
51 bool attach(
const context& ctx,
const texture& tex3d,
int z_or_cube_side,
int level,
int i);
53 bool is_complete(
const context& ctx)
const;
57 bool enable(
context& ctx,
int i0 = -1,
int i1 = -1,
int i2 = -1,
int i3 = -1
58 ,
int i4 = -1,
int i5 = -1,
int i6 = -1,
int i7 = -1
59 ,
int i8 = -1,
int i9 = -1,
int i10= -1,
int i11= -1
60 ,
int i12= -1,
int i13= -1,
int i14= -1,
int i15= -1);
63 bool enable(
context& ctx, std::vector<int>& indices);
67 void pop_viewport(
context& ctx);
72 void blit_to(
context& ctx,
const ivec4& src_rect,
BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false)
const { blit_to(ctx, src_rect,
ivec4(-1), btbs, interpolate); }
73 void blit_to(context& ctx,
const ivec4& src_rect,
const ivec4& dst_rect, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false)
const;
74 void blit_to(context& ctx, frame_buffer& dst_fbo, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false)
const { blit_to(ctx, dst_fbo,
ivec4(0, 0, width, height),
ivec4(0, 0, dst_fbo.width, dst_fbo.height), btbs, interpolate); }
75 void blit_to(context& ctx, frame_buffer& dst_fbo,
const ivec4& src_rect, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false)
const { blit_to(ctx, dst_fbo, src_rect, ivec4(0, 0, dst_fbo.width, dst_fbo.height), btbs, interpolate); }
76 void blit_to(context& ctx, frame_buffer& dst_fbo,
const ivec4& src_rect,
const ivec4& dst_rect, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false)
const;
79 void blit_from(
context& ctx,
const ivec4& dst_rect,
BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false) { blit_from(ctx, dst_rect,
ivec4(-1), btbs, interpolate); }
80 void blit_from(context& ctx,
const ivec4& dst_rect,
const ivec4& src_rect, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false);
81 void blit_from(context& ctx, frame_buffer& src_fbo, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false) { blit_from(ctx, src_fbo,
ivec4(0, 0, width, height),
ivec4(0, 0, src_fbo.width, src_fbo.height), btbs, interpolate); }
82 void blit_from(context& ctx, frame_buffer& src_fbo,
const ivec4& dst_rect, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false) { blit_to(ctx, src_fbo, dst_rect, ivec4(0, 0, src_fbo.width, src_fbo.height), btbs, interpolate); }
83 void blit_from(context& ctx, frame_buffer& src_fbo,
const ivec4& dst_rect,
const ivec4& src_rect, BufferTypeBits btbs = BTB_ALL_BITS,
bool interpolate =
false);
base class for all drawables, which is independent of the used rendering API.
the texture class encapsulates all functionality independent of the rendering api.