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