void GLBufferObject::Delete() { if(!IsCreated()) return; glDeleteBuffers(m_id.GetCount(), &m_id[0]); m_id.Clear(); m_type = 0; }
/************************************* * SetHandle *************************************/ void SHVControlImplementerWin32Base::SetHandle(HWND handle) { if (Window == handle) return; SHVASSERT(!IsCreated()); Window = handle; }
void GLvao::Delete() { if(!IsCreated()) return; Unbind(); glDeleteVertexArrays(1, &m_id); m_id = 0; }
/************************************* * Create *************************************/ SHVBool SHVControlImplementerButtonGtk::Create(SHVControl* owner, SHVControlImplementer* parent, int flags) { if (!IsCreated() && parent && parent->IsCreated()) { SetHandle(gtk_button_new_with_label(NULL)); gtk_container_add(GTK_CONTAINER (parent->GetNative()), GetHandle()); g_signal_connect (G_OBJECT (GetHandle()), "clicked", G_CALLBACK (SHVControlImplementerButtonGtk::on_clicked), owner); owner->SetFont(NULL,true); owner->SetFlag(flags); return IsCreated(); } return SHVBool::False; }
void XLAcceptorThread::Stop() { if(IsCreated()) { m_bExit = true; XLSimpleThreads::Destroy(); } }
void XLAcceptorThread::Start() { if(!IsCreated()) { m_bExit = false; XLSimpleThreads::Create("ACCEPTORTHREAD"); } }
void GLBufferObject::Create(GLuint type, u32 count) { if(IsCreated()) return; m_id.InsertRoomEnd(count); glGenBuffers(count, &m_id[0]); m_type = type; }
/************************************* * SetText *************************************/ void SHVControlImplementerWin32Base::SetText(const SHVStringC& text) { SHVASSERT(IsCreated()); if (Win32::CheckForNewlines(text)) SetWindowTextBase(Win32::ConvertNewlinesC(text)); else SetWindowTextBase(text); }
void PS_TransparencyDialog::OpenTransparencyDialog(CWnd* pParentWnd) { if (!IsCreated()) DoCreateDialog(pParentWnd); Manage(); UpdateUIFromDef(); }
void GLfbo::Create() { if(IsCreated()) { return; } glGenFramebuffers(1, &m_id); }
void Nametag::OnPropertyChanged(const PropertyInfo *id, bool implicit) { if(id == &PlayerNameProperty || id == &HealthProperty) { if(IsCreated()) UpdateStatus(); } Billboard::OnPropertyChanged(id, implicit); }
Void D2D1RenderState::GetDesc( D2D1RenderStateDesc * outDesc ) const { DebugAssert( IsCreated() ); D2D1_DRAWING_STATE_DESCRIPTION hDesc; m_pStateBlock->GetDescription( &hDesc ); outDesc->ConvertFrom( &hDesc ); }
void GridControl::SetWindowPosition(const CRect& rect, int level) { CRect rcOff = AdjustOffsets(rect); if (!IsCreated()) { Create(rcOff); } else { CWnd::MoveWindow(rcOff); } }
void TButton::SetEnabled(bool enabled) { if (fEnabled != enabled) { fEnabled = enabled; if (IsCreated()) Redraw(); } }
Void D2D1RenderState::SetDesc( const D2D1RenderStateDesc * pDesc ) { DebugAssert( IsCreated() ); D2D1_DRAWING_STATE_DESCRIPTION hDesc; pDesc->ConvertTo( &hDesc ); m_pStateBlock->SetDescription( &hDesc ); }
// --------------------------------------------------------------------- void WinBitmapDC::Create( HDC dc, //!< 作成したいビットマップDCと互換性のあるDC SInt32 width, //!< ビットマップの幅 SInt32 height //!< ビットマップの高さ ) { if (IsCreated()) { throw new WinBitmapDCExceptions::AlreadyCreated(); } HDC memDC; HBITMAP bitmap; // 指定されたDCと互換性のあるメモリDCを作成 memDC = ::CreateCompatibleDC(dc); if (NULL == memDC) { throw new WinBitmapDCException(); } try { // 指定されたDCと互換性のあるビットマップを作成 bitmap = ::CreateCompatibleBitmap(dc, width, height); if (NULL == bitmap) { throw new WinBitmapDCException(); } try { // メモリDC にビットマップを結びつけておく this->oldBitmap = static_cast<HBITMAP>(::SelectObject(memDC, bitmap)); if (NULL == this->oldBitmap) { throw new WinBitmapDCException(); } } catch (...) { ::DeleteObject(bitmap); bitmap = NULL; throw; } } catch (...) { ::DeleteDC(memDC); memDC = NULL; throw; } this->memDC = memDC; this->bitmap = bitmap; }
Void D3D11Texture2D::AttachToBackBuffer( UInt iBackBuffer ) { DebugAssert( !(IsCreated()) ); DebugAssert( iBackBuffer < m_pRenderer->m_hSwapChainDesc.iBufferCount ); m_hCreationParameters.pData = NULL; m_iBoundToBackBuffer = iBackBuffer; _NakedCreate(); }
void Erase(uint64_t aID) { if (!IsCreated() || aID == 0) { return; } CompositableMap_t::iterator it = sCompositableMap->find(aID); if (it != sCompositableMap->end()) { sCompositableMap->erase(it); } }
void wxVListBoxComboPopup::SetSelection( int item ) { wxCHECK_RET( item == wxNOT_FOUND || ((unsigned int)item < GetCount()), wxT("invalid index in wxVListBoxComboPopup::SetSelection") ); m_value = item; if ( IsCreated() ) wxVListBox::SetSelection(item); }
void TWindow::Redraw() { if (IsCreated()) { TRect r(0, 0, GetWidth(), GetHeight()); const TPoint& scroll = GetScroll(); r.Offset(scroll.h, scroll.v); RedrawRect(r); } }
Float D3D11Texture::GetMinLOD( D3D11DeferredContext * pContext ) const { DebugAssert( IsCreated() ); ID3D11DeviceContext * pDeviceContext = m_pRenderer->m_pImmediateContext; if ( pContext != NULL && pContext->IsCreated() ) pDeviceContext = pContext->m_pDeferredContext; return pDeviceContext->GetResourceMinLOD( m_pResource ); }
void GLrbo::Delete() { if(!IsCreated()) { return; } glDeleteRenderbuffers(m_id.GetCount(), m_id.GetPtr()); m_id.Clear(); }
/************************************* * Create(parent) *************************************/ SHVBool SHVControlImplementerContainerWindowWin32::Create(SHVControl* owner, SHVControlImplementer* parent, int flags) { if (!IsCreated() && parent && parent->IsCreated()) { SetHandle(::CreateWindowExW(WS_EX_CONTROLPARENT,SHVWIN32CLASS_CONTAINERWND, L"", WS_CHILD|Win32::MapFlags(flags), CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, Win32::GetHandle(parent), NULL, Win32::GetInstance(owner), NULL)); if (IsCreated()) { owner->SetFont(NULL,false); SetWindowLongPtr(GetHandle(),0,(LONG_PTR)owner); } return IsCreated(); } return SHVBool::False; }
void GLfbo::Delete() { if(!IsCreated()) { return; } glDeleteFramebuffers(1, &m_id); m_id = 0; }
void GLrbo::Delete() { if(!IsCreated()) { return; } glDeleteRenderbuffers(m_id.size(), m_id.data()); m_id.clear(); }
Void D3D11Texture::SetMinLOD( Float fMinLOD, D3D11DeferredContext * pContext ) const { DebugAssert( IsCreated() ); ID3D11DeviceContext * pDeviceContext = m_pRenderer->m_pImmediateContext; if ( pContext != NULL && pContext->IsCreated() ) pDeviceContext = pContext->m_pDeferredContext; pDeviceContext->SetResourceMinLOD( m_pResource, fMinLOD ); }
Void D2D1TextRenderState::Create( const D2D1TextRenderStateDesc * pDesc ) { DebugAssert( !(IsCreated()) ); m_pTextRenderingParams = NULL; HRESULT hRes = D2D1RenderingContext::sm_pDWFactory->CreateCustomRenderingParams( pDesc->fGamma, pDesc->fEnhancedContrast, pDesc->fClearTypeLevel, D2D1TextPixelGeometryToD2D1[pDesc->iPixelGeometry], D2D1TextRenderingModeToD2D1[pDesc->iRenderingMode], &m_pTextRenderingParams ); DebugAssert( hRes == S_OK && m_pTextRenderingParams != NULL ); }
void Textbox::OnPropertyChanged(const PropertyInfo *id, bool implicit) { if(id == &TextProperty || id == &ColorProperty) { //Debug("Change text"); if(IsCreated()) UpdateText(); } GUISprite::OnPropertyChanged(id, implicit); }
Void D2D1TextRenderState::GetDesc( D2D1TextRenderStateDesc * outDesc ) const { DebugAssert( IsCreated() ); outDesc->fGamma = m_pTextRenderingParams->GetGamma(); outDesc->fEnhancedContrast = m_pTextRenderingParams->GetEnhancedContrast(); outDesc->fClearTypeLevel = m_pTextRenderingParams->GetClearTypeLevel(); outDesc->iPixelGeometry = D2D1TextPixelGeometryFromD2D1[m_pTextRenderingParams->GetPixelGeometry()]; outDesc->iRenderingMode = D2D1TextRenderingModeFromD2D1[m_pTextRenderingParams->GetRenderingMode()]; }
/************************************* * GetRegionRect *************************************/ SHVRect SHVControlImplementerContainerWindowWin32::GetRegionRect() { RECT nativeRect; SHVASSERT(IsCreated()); ::GetClientRect(GetHandle(),&nativeRect); return SHVRect(nativeRect.left,nativeRect.top,nativeRect.right,nativeRect.bottom); }