SO3Engine
RenderBuffer.h
Go to the documentation of this file.
1/*
2 This file is part of Hikari, a library that allows developers
3 to use Flash in their Ogre3D applications.
4
5 Copyright (C) 2008 Adam J. Simmons
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21/****************************************************************************************************
22 ___ ___ .__ __ .__
23 / | \|__| | _______ _______|__|
24/ ~ \ | |/ /\__ \\_ __ \ |
25\ Y / | < / __ \| | \/ |
26 \___|_ /|__|__|_ \‍(____ /__| |__| v0.4
27 \/ \/ \/
28
29
30* Zed Games PC Development Team - Jaime Crespillo Vilchez (jcrespillo@zed.com)
31* Build: 0.1 - Date: 13/10/2008
32* Undocked version of Hikari Lib
33* Brief: buffer declared protected, new getter method for buffer
34******************************************************************************************************/
35#ifndef __RenderBuffer_H__
36#define __RenderBuffer_H__
37
38#include <windows.h>
40
41namespace Hikari {
42namespace Impl {
43
44class _HikariExport RenderBuffer
45{
46protected:
47unsigned char* buffer;
48public:
49
50 int width, height, rowSpan;
51
52 RenderBuffer(int width, int height);
53
55 inline unsigned char* getBuffer(){
56 return buffer;
57 }
58 void reserve(int width, int height);
59 void copyFrom(unsigned char* srcBuffer, int srcRowSpan);
60 void copyArea(RECT srcRect, unsigned char* srcBuffer, int srcRowSpan);
61 void blitBGR(unsigned char* destBuffer, int destRowSpan, int destDepth);
62};
63
64}
65}
66#endif
unsigned char * getBuffer()