2 * Copyright 2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Alexander von Gluck IV, kallisti5@unixzen.com
8 #ifndef GALLIUMCONTEXT_H
9 #define GALLIUMCONTEXT_H
13 #include <kernel/image.h>
15 #include "pipe/p_compiler.h"
16 #include "pipe/p_screen.h"
17 #include "postprocess/filters.h"
18 #include "hgl_context.h"
20 #include "bitmap_wrapper.h"
24 class GalliumContext
{
26 GalliumContext(ulong options
);
32 context_id
CreateContext(Bitmap
* bitmap
);
33 void DestroyContext(context_id contextID
);
34 context_id
GetCurrentContext() { return fCurrentContext
; };
35 status_t
SetCurrentContext(Bitmap
*bitmap
,
36 context_id contextID
);
38 status_t
SwapBuffers(context_id contextID
);
40 bool Validate(uint32 width
, uint32 height
);
41 void Invalidate(uint32 width
, uint32 height
);
44 status_t
CreateScreen();
48 struct pipe_screen
* fScreen
;
51 struct hgl_context
* fContext
[CONTEXT_MAX
];
52 context_id fCurrentContext
;
57 #endif /* GALLIUMCONTEXT_H */