一个3D的保龄球的源代码
源代码在线查看: rendertarget.cpp
#include "RenderTarget.h"
#include "..\System\Sysdef.h"
#include "..\System\simplememory.h"
CRenderTarget::~CRenderTarget()
{
m_pEngine = NULL;
m_width = 0;
m_height = 0;
m_pColorBuffer = NULL;
m_pZBuffer = NULL;
m_pMirrorBuffer = NULL;
}
CRenderTarget::CRenderTarget(CEngine *pEngine)
{
m_pEngine = pEngine;
m_width = SCREEN_WIDTH;
m_height = SCREEN_HEIGHT;
m_pZBuffer = (int *)pEngine->GetMem()->GlobalMalloc(sizeof(int)*m_width*m_height);
m_pMirrorBuffer = (int *)pEngine->GetMem()->GlobalMalloc(sizeof(int)*m_width*m_height);
}
void CRenderTarget::NewColorBuffer()
{
}