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