haiku libGL: Move from gallium target to src/hgl
[mesa.git] / src / hgl / GLRenderer.cpp
1 /*
2 * Copyright 2006-2008, Philippe Houdoin. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7 #include <kernel/image.h>
8
9 #include "GLRenderer.h"
10
11 #include "GLDispatcher.h"
12
13
14 BGLRenderer::BGLRenderer(BGLView* view, ulong glOptions,
15 BGLDispatcher* dispatcher)
16 :
17 fRefCount(1),
18 fView(view),
19 fOptions(glOptions),
20 fDispatcher(dispatcher)
21 {
22 }
23
24
25 BGLRenderer::~BGLRenderer()
26 {
27 delete fDispatcher;
28 }
29
30
31 void
32 BGLRenderer::Acquire()
33 {
34 atomic_add(&fRefCount, 1);
35 }
36
37
38 void
39 BGLRenderer::Release()
40 {
41 if (atomic_add(&fRefCount, -1) < 1)
42 delete this;
43 }
44
45
46 void
47 BGLRenderer::LockGL()
48 {
49 }
50
51
52 void
53 BGLRenderer::UnlockGL()
54 {
55 }
56
57
58 void
59 BGLRenderer::SwapBuffers(bool VSync)
60 {
61 }
62
63
64 void
65 BGLRenderer::Draw(BRect updateRect)
66 {
67 }
68
69
70 status_t
71 BGLRenderer::CopyPixelsOut(BPoint source, BBitmap* dest)
72 {
73 return B_ERROR;
74 }
75
76
77 status_t
78 BGLRenderer::CopyPixelsIn(BBitmap* source, BPoint dest)
79 {
80 return B_ERROR;
81 }
82
83
84 void
85 BGLRenderer::FrameResized(float width, float height)
86 {
87 }
88
89
90 void
91 BGLRenderer::DirectConnected(direct_buffer_info* info)
92 {
93 }
94
95
96 void
97 BGLRenderer::EnableDirectMode(bool enabled)
98 {
99 }
100
101
102 status_t BGLRenderer::_Reserved_Renderer_0(int32 n, void* p) { return B_ERROR; }
103 status_t BGLRenderer::_Reserved_Renderer_1(int32 n, void* p) { return B_ERROR; }
104 status_t BGLRenderer::_Reserved_Renderer_2(int32 n, void* p) { return B_ERROR; }
105 status_t BGLRenderer::_Reserved_Renderer_3(int32 n, void* p) { return B_ERROR; }
106 status_t BGLRenderer::_Reserved_Renderer_4(int32 n, void* p) { return B_ERROR; }