Files
eepp/src/graphics/cframebufferpbuffer.hpp
spartanj 181326273d Added cUIPushButton.
Added debug helper functions.
Fixed some skin state changes.
Improved UI performance.
Changed EE_PLATFORM_WIN32 for EE_PLATFORM_WIN, and added as platform WIN64.
Added detection of 64bits compilation.
Implemented some asserts.
2010-10-09 04:47:50 -03:00

80 lines
2.3 KiB
C++

#ifndef EE_GRAPHICSCFRAMEBUFFERPBUFFER_HPP
#define EE_GRAPHICSCFRAMEBUFFERPBUFFER_HPP
/** Part of this code is based on the implementation of PBuffers from:
*
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
*
* NOTE by Martin Lucas Golini: This is not the original version, so differs from SFML implementation.
*/
#include "base.hpp"
#include "cframebuffer.hpp"
#if EE_PLATFORM == EE_PLATFORM_WIN
#include "../helper/glew/wglew.h"
#elif EE_PLATFORM == EE_PLATFORM_LINUX
#include "../helper/glew/glxew.h"
#include <X11/Xlib.h>
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
//#include <AGL/agl.h>
#warning No PBuffer implemented on MAC
#else
#warning No PBuffer implemented on this platform
#endif
namespace EE { namespace Graphics {
class EE_API cFrameBufferPBuffer : public cFrameBuffer {
public:
cFrameBufferPBuffer();
~cFrameBufferPBuffer();
cFrameBufferPBuffer( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false );
bool Create( const Uint32& Width, const Uint32& Height );
bool Create( const Uint32& Width, const Uint32& Height, bool DepthBuffer );
void Bind();
void Unbind();
void Reload();
static bool IsSupported();
protected:
#if EE_PLATFORM == EE_PLATFORM_WIN
HDC mDeviceContext;
HPBUFFERARB mPBuffer;
HGLRC mContext;
#elif EE_PLATFORM == EE_PLATFORM_LINUX
::Display* mDisplay;
GLXPbuffer mPBuffer;
GLXContext mContext;
#endif
};
}}
#endif