2 * Copyright 2006-2012, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Jérôme Duval, korli@users.berlios.de
7 * Philippe Houdoin, philippe.houdoin@free.fr
8 * Artur Wyszynski, harakash@gmail.com
9 * Alexander von Gluck IV, kallisti5@unixzen.com
11 #ifndef SOFTWARERENDERER_H
12 #define SOFTWARERENDERER_H
15 #include <kernel/image.h>
17 #include "GLRenderer.h"
18 #include "GalliumContext.h"
21 class SoftwareRenderer
: public BGLRenderer
{
23 SoftwareRenderer(BGLView
*view
,
25 BGLDispatcher
*dispatcher
);
26 virtual ~SoftwareRenderer();
28 virtual void LockGL();
29 virtual void UnlockGL();
31 virtual void SwapBuffers(bool vsync
= false);
32 virtual void Draw(BRect updateRect
);
33 virtual status_t
CopyPixelsOut(BPoint source
, BBitmap
*dest
);
34 virtual status_t
CopyPixelsIn(BBitmap
*source
, BPoint dest
);
35 virtual void FrameResized(float width
, float height
);
37 virtual void EnableDirectMode(bool enabled
);
38 virtual void DirectConnected(direct_buffer_info
*info
);
42 void _AllocateBitmap();
44 GalliumContext
* fContextObj
;
46 context_id fContextID
;
48 bool fDirectModeEnabled
;
49 direct_buffer_info
* fInfo
;
54 color_space fColorSpace
;
57 #endif // SOFTPIPERENDERER_H