本文整理匯總了C++中ClearBuffer函數的典型用法代碼示例。如果您正苦於以下問題:C++ ClearBuffer函數的具體用法?C++ ClearBuffer怎麽用?C++ ClearBuffer使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ClearBuffer函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: ClearBuffer
void
StencilMapCanvas::Begin()
{
if (!buffer_drawn) {
ClearBuffer();
buffer_drawn = true;
}
}
示例2: ClearBuffer
bool CFile::Truncate() {
if (m_iFD != -1 && ftruncate(m_iFD, 0) == 0) {
ClearBuffer();
return true;
}
return false;
}
示例3: ClearBuffer
void
MapDrawHelper::BufferRenderStart()
{
if (!buffer_drawn) {
ClearBuffer();
buffer_drawn = true;
}
}
示例4: glEnable
void TGBufferCanvas::Enable()
{
glEnable(GL_DEPTH_TEST);
BindFrameBuffer(m_frameBuffer);
glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT);
ClearBuffer();
GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_COLOR_ATTACHMENT2_EXT ,GL_COLOR_ATTACHMENT3_EXT};
glDrawBuffers(4, buffers);
}
示例5: ClearBuffer
SERIALISATION_INLINE void StreamWriter::Close()
{
ClearBuffer();
if (mFileStream.is_open())
{
mFileStream.close();
}
}
示例6: StopTransfer
CloHttpCurl::~CloHttpCurl(void)
{
StopTransfer();
ClearBuffer();
ClearParam();
delete m_pAssoc;
m_pAssoc = NULL;
}
示例7: m_bEnabled
////////////////////////////////////////////////
//
// CStatEvents::CStatEvents
//
//
//
////////////////////////////////////////////////
CStatEvents::CStatEvents ( void )
: m_bEnabled ( false )
, m_ItemBuffer ( 0 )
, m_BufferPos ( 0 )
, m_BufferPosMax ( 0 )
, m_BufferPosMaxUsing ( 0 )
{
ClearBuffer ( true );
}
示例8: BiquadFilterInit
/*******************************************************************************
BiquadFilterInit */
BiquadFilter*
BiquadFilterInit(const float *bCoeff, const float *aCoeff)
{
// Allocate Memory
BiquadFilter* filter = (BiquadFilter*)malloc(sizeof(BiquadFilter));
if (filter)
{
// Initialize Buffers
CopyBuffer(filter->b, bCoeff, 3);
CopyBuffer(filter->a, aCoeff, 2);
ClearBuffer(filter->x, 2);
ClearBuffer(filter->y, 2);
ClearBuffer(filter->w, 2);
}
return filter;
}
示例9: ClearBuffer
void CBuffer::Copy(CBuffer& buffer)
{
int nReSize = buffer.GetMemSize(); //2048 2048
int nSize = buffer.GetBufferLen(); //1025 0 1025
ClearBuffer();
if (ReAllocateBuffer(nReSize) == -1)
return;
CopyMemory(m_pBase,buffer.GetBuffer(),buffer.GetBufferLen());
m_pPtr = m_pBase + nSize;
}
示例10: DEBUG
void CFile::Close() {
if (m_iFD >= 0) {
if (close(m_iFD) < 0) {
DEBUG("CFile::Close(): close() failed with ["
<< strerror(errno) << "]");
}
}
m_iFD = -1;
ClearBuffer();
}
示例11: ZeroMemory
HRESULT CMpcAudioRenderer::CreateDSBuffer()
{
if (! m_pWaveFileFormat) return E_POINTER;
HRESULT hr = S_OK;
LPDIRECTSOUNDBUFFER pDSBPrimary = NULL;
DSBUFFERDESC dsbd;
DSBUFFERDESC cDSBufferDesc;
DSBCAPS bufferCaps;
DWORD dwDSBufSize = m_pWaveFileFormat->nAvgBytesPerSec * 4;
ZeroMemory(&bufferCaps, sizeof(bufferCaps));
ZeroMemory(&dsbd, sizeof(DSBUFFERDESC));
dsbd.dwSize = sizeof(DSBUFFERDESC);
dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER;
dsbd.dwBufferBytes = 0;
dsbd.lpwfxFormat = NULL;
if (SUCCEEDED (hr = m_pDS->CreateSoundBuffer( &dsbd, &pDSBPrimary, NULL )))
{
hr = pDSBPrimary->SetFormat(m_pWaveFileFormat);
ATLASSERT(SUCCEEDED(hr));
SAFE_RELEASE (pDSBPrimary);
}
SAFE_RELEASE (m_pDSBuffer);
cDSBufferDesc.dwSize = sizeof (DSBUFFERDESC);
cDSBufferDesc.dwFlags = DSBCAPS_GLOBALFOCUS |
DSBCAPS_GETCURRENTPOSITION2 |
DSBCAPS_CTRLVOLUME |
DSBCAPS_CTRLPAN |
DSBCAPS_CTRLFREQUENCY;
cDSBufferDesc.dwBufferBytes = dwDSBufSize;
cDSBufferDesc.dwReserved = 0;
cDSBufferDesc.lpwfxFormat = m_pWaveFileFormat;
cDSBufferDesc.guid3DAlgorithm = GUID_NULL;
hr = m_pDS->CreateSoundBuffer (&cDSBufferDesc, &m_pDSBuffer, NULL);
m_nDSBufSize = 0;
if (SUCCEEDED(hr))
{
bufferCaps.dwSize = sizeof(bufferCaps);
hr = m_pDSBuffer->GetCaps(&bufferCaps);
}
if (SUCCEEDED (hr))
{
m_nDSBufSize = bufferCaps.dwBufferBytes;
hr = ClearBuffer();
m_pDSBuffer->SetFrequency ((long)(m_pWaveFileFormat->nSamplesPerSec * m_dRate));
}
return hr;
}
示例12: ReadTagName
void ReadTagName(char c)
{
if (IsWhitespace(c))
{
if (buffer == "a")
state = State::ReadTag;
else if (buffer == "!--")
state = State::SkipComment;
else
state = State::SkipTag;
ClearBuffer();
}
else if (c == '>')
{
state = State::Default;
ClearBuffer();
}
else
StoreToLower(c);
}
示例13: NO_DEBUG
void NoFile::Close()
{
if (m_fd >= 0) {
if (close(m_fd) < 0) {
m_hadError = true;
NO_DEBUG("NoFile::Close(): close() failed with [" << strerror(errno) << "]");
}
}
m_fd = -1;
ClearBuffer();
}
示例14: SaveReleaseDevice
bool Mouse::SetCoopLevel(HWND hWnd)
{
HRESULT result = _dDevice->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND);
if (FAILED(result))
{
SaveReleaseDevice();
return false;
}
ClearBuffer();
return true;
}
示例15: ClearBuffer
////////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: Copy
//
// DESCRIPTION: Copy from one buffer object to another...
//
// RETURNS:
//
// NOTES:
//
// MODIFICATIONS:
//
// Name Date Version Comments
// N T ALMOND 270400 1.0 Origin
//
////////////////////////////////////////////////////////////////////////////////
void CBuffer::Copy(CBuffer& buffer)
{
int nReSize = buffer.GetMemSize();
int nSize = buffer.GetBufferLen();
ClearBuffer();
ReAllocateBuffer(nReSize);
m_pPtr = m_pBase + nSize;
CopyMemory(m_pBase,buffer.GetBuffer(),buffer.GetBufferLen());
}