2 Copyright (C) 2005 Rice1964
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #include "osal_opengl.h"
22 #include "FrameBuffer.h"
23 #include "OGLTexture.h"
25 // ===========================================================================
26 COGLRenderTexture::COGLRenderTexture(int width, int height, RenderTextureInfo* pInfo, TextureUsage usage)
27 : CRenderTexture(width, height, pInfo, usage),
30 if( usage == AS_BACK_BUFFER_SAVE )
32 m_pTexture = m_pOGLTexture = new COGLTexture(width, height, usage);
35 TRACE0("Error to create OGL render_texture");
36 SAFE_DELETE(m_pTexture);
42 m_beingRendered = false;
45 COGLRenderTexture::~COGLRenderTexture()
49 g_pFrameBufferManager->CloseRenderTexture(false);
50 SetAsRenderTarget(false);
54 SAFE_DELETE(m_pTexture);
56 m_beingRendered = false;
59 bool COGLRenderTexture::InitPBuffer( void )
64 void COGLRenderTexture::ShutdownPBuffer(void)
68 bool COGLRenderTexture::SetAsRenderTarget(bool enable)
73 void COGLRenderTexture::LoadTexture(TxtrCacheEntry* pEntry)
77 void COGLRenderTexture::StoreToRDRAM(int infoIdx)