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