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>
16 //#include "state_tracker/st_api.h"
17 #include "pipe/p_compiler.h"
18 #include "pipe/p_screen.h"
19 #include "postprocess/filters.h"
20 #include "os/os_thread.h"
21 #include "hgl_context.h"
24 #include "bitmap_wrapper.h"
28 class GalliumContext
{
30 GalliumContext(ulong options
);
36 context_id
CreateContext(Bitmap
* bitmap
);
37 void DestroyContext(context_id contextID
);
38 context_id
GetCurrentContext() { return fCurrentContext
; };
39 status_t
SetCurrentContext(Bitmap
*bitmap
,
40 context_id contextID
);
42 status_t
SwapBuffers(context_id contextID
);
44 bool Validate(uint32 width
, uint32 height
);
45 void Invalidate(uint32 width
, uint32 height
);
48 status_t
CreateScreen();
52 struct pipe_screen
* fScreen
;
55 struct hgl_context
* fContext
[CONTEXT_MAX
];
56 context_id fCurrentContext
;
61 #endif /* GALLIUMCONTEXT_H */