btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / tests / add-ons / opengl / fake_renderer / FakeRenderer.h
blob391d2471da895f48871a535992902c2622b56d64
1 /*
2 * Copyright 2006-2008, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Philippe Houdoin, philippe.houdoin@free.fr
7 */
9 #ifndef FAKE_RENDERER_H
10 #define FAKE_RENDERER_H
12 #include "GLRenderer.h"
14 class FakeRenderer : public BGLRenderer {
15 public:
16 FakeRenderer(BGLView* view,
17 ulong bgl_options,
18 BGLDispatcher* dispatcher);
19 virtual ~FakeRenderer();
21 virtual void SwapBuffers(bool VSync = false);
22 virtual void Draw(BRect updateRect);
24 virtual void EnableDirectMode(bool enabled);
25 virtual void DirectConnected(direct_buffer_info* info);
27 private:
28 static int32 _DirectDrawThread(void *data);
29 int32 _DirectDrawThread();
31 ulong fOptions;
33 sem_id fDrawSem;
34 thread_id fDrawThread;
35 BLocker fDrawLocker;
37 rgb_color fDrawColor;
39 uint8 * fFrameBuffer;
40 int32 fBytesPerRow;
41 color_space fColorSpace;
42 clipping_rect fBounds;
43 clipping_rect * fRects;
44 int fRectsCount;
46 bool fConnected;
47 bool fDisabled;
50 #endif // FAKE_RENDERER_H