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