00001 #ifndef MERCURYWINDOWSDL_H 00002 #define MERCURYWINDOWSDL_H 00003 00004 #include "MercuryWindow.h" 00005 00007 class MercuryWindowFB : public MercuryWindow 00008 { 00009 public: 00010 MercuryWindowFB(); 00011 ~MercuryWindowFB(); 00012 virtual bool MakeWindow(const char* title, int width, int height, int bits, bool fullscreenflag); 00013 virtual bool MakeRender(const char* title, int width, int height, int bits, bool fullscreenflag, RendererType RT ); 00014 virtual void DestroyWindow(); 00015 virtual bool Update(const float dTime); 00016 virtual bool HasFocus(); 00017 virtual void DestroyWindowAndRender(); 00018 virtual bool RestoreDevice(); 00019 virtual bool MakeRenderCurrent(); 00020 virtual unsigned char * GetBackDirectBuffer(); 00021 protected: 00022 virtual void SwapBuffersInternal(); 00023 private: 00024 unsigned int length; 00025 int m_flags; 00026 RendererType m_RT; 00027 unsigned char * m_BackBuffer; 00028 unsigned char * m_FrontBuffer; 00029 unsigned int m_iFrame; 00030 int fd; 00031 }; 00032 00033 #endif 00034 00035 /* 00036 * Copyright (c) 2005-2006, Charles Lohr 00037 * All rights reserved. 00038 * 00039 * Redistribution and use in source and binary forms, with or 00040 * without modification, are permitted provided that the following 00041 * conditions are met: 00042 * - Redistributions of source code must retain the above 00043 * copyright notice, this list of conditions and the following disclaimer. 00044 * - Redistributions in binary form must reproduce the above copyright 00045 * notice, this list of conditions and the following disclaimer in 00046 * the documentation and/or other materials provided with the distribution. 00047 * - Neither the name of the Mercury Engine nor the names of its 00048 * contributors may be used to endorse or promote products derived from 00049 * this software without specific prior written permission. 00050 * 00051 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00052 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00053 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00054 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 00055 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00056 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00057 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00058 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00059 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00060 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00061 */