• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
BGLRenderer(BGLView * view,ulong glOptions,BGLDispatcher * dispatcher)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 
~BGLRenderer()25 BGLRenderer::~BGLRenderer()
26 {
27 	delete fDispatcher;
28 }
29 
30 
31 void
Acquire()32 BGLRenderer::Acquire()
33 {
34 	atomic_add(&fRefCount, 1);
35 }
36 
37 
38 void
Release()39 BGLRenderer::Release()
40 {
41 	if (atomic_add(&fRefCount, -1) < 1)
42 		delete this;
43 }
44 
45 
46 void
LockGL()47 BGLRenderer::LockGL()
48 {
49 }
50 
51 
52 void
UnlockGL()53 BGLRenderer::UnlockGL()
54 {
55 }
56 
57 
58 void
SwapBuffers(bool VSync)59 BGLRenderer::SwapBuffers(bool VSync)
60 {
61 }
62 
63 
64 void
Draw(BRect updateRect)65 BGLRenderer::Draw(BRect updateRect)
66 {
67 }
68 
69 
70 status_t
CopyPixelsOut(BPoint source,BBitmap * dest)71 BGLRenderer::CopyPixelsOut(BPoint source, BBitmap* dest)
72 {
73 	return B_ERROR;
74 }
75 
76 
77 status_t
CopyPixelsIn(BBitmap * source,BPoint dest)78 BGLRenderer::CopyPixelsIn(BBitmap* source, BPoint dest)
79 {
80 	return B_ERROR;
81 }
82 
83 
84 void
FrameResized(float width,float height)85 BGLRenderer::FrameResized(float width, float height)
86 {
87 }
88 
89 
90 void
DirectConnected(direct_buffer_info * info)91 BGLRenderer::DirectConnected(direct_buffer_info* info)
92 {
93 }
94 
95 
96 void
EnableDirectMode(bool enabled)97 BGLRenderer::EnableDirectMode(bool enabled)
98 {
99 }
100 
101 
_Reserved_Renderer_0(int32 n,void * p)102 status_t BGLRenderer::_Reserved_Renderer_0(int32 n, void* p) { return B_ERROR; }
_Reserved_Renderer_1(int32 n,void * p)103 status_t BGLRenderer::_Reserved_Renderer_1(int32 n, void* p) { return B_ERROR; }
_Reserved_Renderer_2(int32 n,void * p)104 status_t BGLRenderer::_Reserved_Renderer_2(int32 n, void* p) { return B_ERROR; }
_Reserved_Renderer_3(int32 n,void * p)105 status_t BGLRenderer::_Reserved_Renderer_3(int32 n, void* p) { return B_ERROR; }
_Reserved_Renderer_4(int32 n,void * p)106 status_t BGLRenderer::_Reserved_Renderer_4(int32 n, void* p) { return B_ERROR; }
107