本文整理汇总了C++中IsSupported函数的典型用法代码示例。如果您正苦于以下问题:C++ IsSupported函数的具体用法?C++ IsSupported怎么用?C++ IsSupported使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsSupported函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ImagesProvider
IImageProvider * ImagesProvider::create(const QString & source)
{
if (PathIsDirectoryA(source.toStdString().c_str()) || IsSupported(source))
return new ImagesProvider(source);
return nullptr;
}
开发者ID:caronnee,项目名称:Castler,代码行数:7,代码来源:ImagesProvider.cpp
示例2: TEST_F
TEST_F(TaggedControlOptionsTest, IsSupportedFalse) {
bool supported = false;
uint8_t value = 3;
EXPECT_CALL(*mock_options_, IsSupported(value)).WillOnce(Return(supported));
PrepareDUT();
ASSERT_EQ(dut_->IsSupported(value), supported);
}
开发者ID:MIPS,项目名称:hardware-libhardware,代码行数:7,代码来源:tagged_control_options_test.cpp
示例3: ASSERT
ULONGLONG CGetCompressedFileSizeApi::GetCompressedFileSize(LPCTSTR lpFileName)
{
ASSERT(IsSupported());
ULARGE_INTEGER ret;
ret.LowPart = (*m_GetCompressedFileSize)(lpFileName, &ret.HighPart);
return ret.QuadPart;
}
开发者ID:coapp-packages,项目名称:windirstat,代码行数:7,代码来源:osspecific.cpp
示例4:
/**
* Unbinds the framebuffer and deletes it
*/
FBO::~FBO()
{
if (!IsSupported()) return;
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
for (std::vector<GLuint>::iterator ri=myRBOs.begin(); ri!=myRBOs.end(); ++ri) {
glDeleteRenderbuffersEXT(1, &(*ri));
}
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
if (fboId)
glDeleteFramebuffersEXT(1, &fboId);
for (std::vector<FBO*>::iterator fi=fboList.begin(); fi!=fboList.end(); ++fi) {
if (*fi==this) {
fboList.erase(fi);
break;
}
}
// seems the application exits and we are the last fbo left
// so we delete the remaining alloc'ed stuff
if (fboList.empty()) {
for (std::map<GLuint,FBO::TexData*>::iterator ti=texBuf.begin(); ti!=texBuf.end(); ++ti) {
FBO::TexData* tex = ti->second;
delete[] tex->pixels;
delete tex;
}
texBuf.clear();
}
}
开发者ID:BrainDamage,项目名称:spring,代码行数:34,代码来源:FBO.cpp
示例5: GLContextReinit
/**
* @brief GLContextReinit
*/
void FBO::GLContextReinit()
{
if (!IsSupported()) return;
for (std::map<GLuint,FBO::TexData*>::iterator ti=texBuf.begin(); ti!=texBuf.end(); ++ti) {
FBO::TexData* tex = ti->second;
if (glIsTexture(tex->id)) {
glBindTexture(tex->target,tex->id);
//todo: regen mipmaps?
switch (tex->target) {
case GL_TEXTURE_3D:
//glTexSubImage3D(tex->target, 0, 0,0,0, tex->xsize, tex->ysize, tex->zsize, /*FIXME?*/GL_RGBA, /*FIXME?*/GL_UNSIGNED_BYTE, tex->pixels);
glTexImage3D(tex->target, 0, tex->format, tex->xsize, tex->ysize, tex->zsize, 0, /*FIXME?*/GL_RGBA, /*FIXME?*/GL_UNSIGNED_BYTE, tex->pixels);
break;
case GL_TEXTURE_1D:
//glTexSubImage1D(tex->target, 0, 0, tex->xsize, /*FIXME?*/GL_RGBA, /*FIXME?*/GL_UNSIGNED_BYTE, tex->pixels);
glTexImage1D(tex->target, 0, tex->format, tex->xsize, /*FIXME?*/GL_RGBA, 0, /*FIXME?*/GL_UNSIGNED_BYTE, tex->pixels);
break;
default: //GL_TEXTURE_2D & GL_TEXTURE_RECTANGLE
//glTexSubImage2D(tex->target, 0, 0,0, tex->xsize, tex->ysize, /*FIXME?*/GL_RGBA, /*FIXME?*/GL_UNSIGNED_BYTE, tex->pixels);
glTexImage2D(tex->target, 0, tex->format, tex->xsize, tex->ysize, 0, /*FIXME?*/GL_RGBA, /*FIXME?*/GL_UNSIGNED_BYTE, tex->pixels);
}
}else if (glIsRenderbufferEXT(tex->id)) {
//FIXME
}
delete[] tex->pixels;
delete tex;
}
texBuf.clear();
}
开发者ID:BrainDamage,项目名称:spring,代码行数:35,代码来源:FBO.cpp
示例6: Init
void Init()
{
// New game, clean slate.
spamProtectionCount = 0;
logOnceUsed.clear();
everUnsupported = false;
currentSupported = IsSupported();
}
开发者ID:makotech222,项目名称:ppsspp,代码行数:8,代码来源:Reporting.cpp
示例7: Enable
void Enable(bool flag, std::string host)
{
if (IsSupported() && IsEnabled() != flag)
{
// "" means explicitly disabled. Don't ever turn on by default.
// "default" means it's okay to turn it on by default.
g_Config.sReportHost = flag ? host : "";
}
}
开发者ID:JakotsuTheOne,项目名称:ppsspp,代码行数:9,代码来源:Reporting.cpp
示例8: LIB_PART
void LIB_EDIT_FRAME::OnPasteDuplicatePart( wxCommandEvent& aEvent )
{
int dummyUnit;
LIB_ID libId = m_treePane->GetLibTree()->GetSelectedLibId( &dummyUnit );
wxString lib = libId.GetLibNickname();
if( !m_libMgr->LibraryExists( lib ) )
return;
LIB_PART* srcPart = nullptr;
LIB_PART* newPart = nullptr;
if( aEvent.GetId() == ID_LIBEDIT_DUPLICATE_PART )
{
srcPart = m_libMgr->GetBufferedPart( libId.GetLibItemName(), lib );
newPart = new LIB_PART( *srcPart );
}
else if( aEvent.GetId() == ID_LIBEDIT_PASTE_PART )
{
auto clipboard = wxTheClipboard;
wxClipboardLocker clipboardLock( clipboard );
if( !clipboardLock || ! clipboard->IsSupported( wxDF_TEXT ) )
return;
wxTextDataObject data;
clipboard->GetData( data );
wxString partSource = data.GetText();
STRING_LINE_READER reader( TO_UTF8( partSource ), "Clipboard" );
try
{
reader.ReadLine();
newPart = SCH_LEGACY_PLUGIN::ParsePart( reader );
}
catch( IO_ERROR& e )
{
wxLogError( wxString::Format( "Malformed clipboard: %s" ), GetChars( e.What() ) );
return;
}
}
else
wxFAIL;
if( !newPart )
return;
fixDuplicateAliases( newPart, lib );
m_libMgr->UpdatePart( newPart, lib );
SyncLibraries( false );
m_treePane->GetLibTree()->SelectLibId( LIB_ID( lib, newPart->GetName() ) );
delete newPart;
}
开发者ID:johnbeard,项目名称:kicad,代码行数:55,代码来源:libedit.cpp
示例9: ShutdownModule
virtual void ShutdownModule() override
{
if (IsSupported())
{
IMediaModule* MediaModule = FModuleManager::GetModulePtr<IMediaModule>("Media");
if (nullptr != MediaModule)
{
MediaModule->UnregisterPlayerFactory(*this);
}
}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:11,代码来源:AndroidMediaModule.cpp
示例10: CreatePlayer
virtual TSharedPtr<IMediaPlayer> CreatePlayer() override
{
if (IsSupported())
{
return MakeShareable(new FAndroidMediaPlayer());
}
else
{
return nullptr;
}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:11,代码来源:AndroidMediaModule.cpp
示例11: GLFeature
void
GLContext::InitFeatures()
{
for (size_t featureId = 0; featureId < size_t(GLFeature::EnumMax); featureId++) {
GLFeature feature = GLFeature(featureId);
if (IsFeaturePartOfProfileVersion(feature, mProfile, mVersion)) {
mAvailableFeatures[featureId] = true;
continue;
}
mAvailableFeatures[featureId] = false;
const FeatureInfo& featureInfo = GetFeatureInfo(feature);
if (IsExtensionSupported(featureInfo.mARBExtensionWithoutARBSuffix)) {
mAvailableFeatures[featureId] = true;
continue;
}
for (size_t j = 0; true; j++) {
MOZ_ASSERT(j < kMAX_EXTENSION_GROUP_SIZE,
"kMAX_EXTENSION_GROUP_SIZE too small");
if (featureInfo.mExtensions[j] == GLContext::Extensions_End)
break;
if (IsExtensionSupported(featureInfo.mExtensions[j])) {
mAvailableFeatures[featureId] = true;
break;
}
}
}
if (ShouldDumpExts()) {
for (size_t featureId = 0; featureId < size_t(GLFeature::EnumMax); featureId++) {
GLFeature feature = GLFeature(featureId);
printf_stderr("[%s] Feature::%s\n",
IsSupported(feature) ? "enabled" : "disabled",
GetFeatureName(feature));
}
}
if (WorkAroundDriverBugs()) {
#ifdef XP_MACOSX
// MacOSX 10.6 reports to support EXT_framebuffer_sRGB and EXT_texture_sRGB but
// fails to convert from sRGB to linear when reading from an sRGB texture attached
// to an FBO. (bug 843668)
if (!nsCocoaFeatures::OnLionOrLater())
MarkUnsupported(GLFeature::sRGB_framebuffer);
#endif // XP_MACOSX
}
}
开发者ID:MekliCZ,项目名称:positron,代码行数:53,代码来源:GLContextFeatures.cpp
示例12: win8_provider_dictionary_exists
static int
win8_provider_dictionary_exists (EnchantProvider *provider, const char *const tag)
{
auto factory = static_cast<ISpellCheckerFactory*>(provider->user_data);
wchar_t *wtag = utf8_to_utf16 (tag, -1, TRUE);
BOOL is_supported = FALSE;
factory->IsSupported (wtag, &is_supported);
g_free (wtag);
return is_supported;
}
开发者ID:HextorIRC,项目名称:hextor,代码行数:12,代码来源:win8_provider.cpp
示例13: OnSourceModShutdown
virtual void OnSourceModShutdown()
{
if (!IsSupported())
{
return;
}
delete [] m_PlayerHuds;
handlesys->RemoveType(m_hHudSyncObj, g_pCoreIdent);
g_Players.RemoveClientListener(this);
}
开发者ID:DJLaca,项目名称:sourcemod,代码行数:12,代码来源:smn_hudtext.cpp
示例14: fboId
/**
* Tests for support of the EXT_framebuffer_object
* extension, and generates a framebuffer if supported
*/
FBO::FBO() : fboId(0), reloadOnAltTab(false)
{
if (!IsSupported()) return;
glGenFramebuffersEXT(1,&fboId);
// we need to bind it once, else it isn't valid
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboId);
//GML_STDMUTEX_LOCK(fbo);
fboList.push_back(this);
}
开发者ID:achoum,项目名称:spring,代码行数:16,代码来源:FBO.cpp
示例15: it
ImagesProvider::ImagesProvider(const QString & source)
{
_pos = 0;
QDirIterator it(source, QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext())
{
it.next();
FImage image = { false,it.filePath() };
if ( IsSupported( image.name ))
_images.push_back(image);
}
}
开发者ID:caronnee,项目名称:Castler,代码行数:12,代码来源:ImagesProvider.cpp
示例16: OnSourceModLevelChange
void CRadioStyle::OnSourceModLevelChange(const char *mapName)
{
if (g_bRadioInit)
{
return;
}
g_bRadioInit = true;
// Always register the style. Use IsSupported() to check for validity before use.
g_Menus.AddStyle(this);
const char *msg = g_pGameConf->GetKeyValue("HudRadioMenuMsg");
if (!msg || msg[0] == '\0')
{
return;
}
g_ShowMenuId = g_UserMsgs.GetMessageIndex(msg);
if (!IsSupported())
{
return;
}
const char *val = g_pGameConf->GetKeyValue("RadioMenuTimeout");
if (val != NULL)
{
g_RadioMenuTimeout = atoi(val);
}
else
{
g_RadioMenuTimeout = 0;
}
const char *items = g_pGameConf->GetKeyValue("RadioMenuMaxPageItems");
if (items != NULL)
{
int value = atoi(items);
// Only override the mostly-safe default if it's a sane value
if (value > MAX_PAGINATION_OPTIONS && value <= MAX_MENUSLOT_KEYS)
{
s_RadioMaxPageItems = value;
}
}
g_Menus.SetDefaultStyle(this);
g_UserMsgs.HookUserMessage(g_ShowMenuId, this, false);
}
开发者ID:Chdata,项目名称:sourcemod,代码行数:51,代码来源:MenuStyle_Radio.cpp
示例17: pboId
PBO::PBO() : pboId(0)
{
bound = false;
mapped = false;
data = NULL;
size = 0;
if (IsSupported()) {
glGenBuffers(1, &pboId);
PBOused = true;
} else {
PBOused = false;
}
}
开发者ID:niavok,项目名称:spring,代码行数:14,代码来源:PBO.cpp
示例18: NewL
CAlfPerfAppAvkonTestCase* CAlfPerfAppAvkonTestCase::NewL( TInt aCaseId, TInt aSequenceIndex )
{
if ( !IsSupported( aCaseId ) )
{
User::Leave( KErrNotSupported );
}
CAlfPerfAppAvkonTestCase* self =
new (ELeave) CAlfPerfAppAvkonTestCase( aCaseId, aSequenceIndex );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
return self;
}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:14,代码来源:alfperfappavkontestcase.cpp
示例19: StartupModule
virtual void StartupModule() override
{
if (IsSupported())
{
IMediaModule* MediaModule = FModuleManager::LoadModulePtr<IMediaModule>("Media");
if (nullptr != MediaModule)
{
SupportedFileTypes.Add(TEXT("3gpp"), LOCTEXT("Format3gpp", "3GPP Multimedia File"));
SupportedFileTypes.Add(TEXT("aac"), LOCTEXT("FormatAac", "MPEG-2 Advanced Audio Coding File"));
SupportedFileTypes.Add(TEXT("mp4"), LOCTEXT("FormatMp4", "MPEG-4 Movie"));
MediaModule->RegisterPlayerFactory(*this);
}
}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:14,代码来源:AndroidMediaModule.cpp
示例20: Initialize
Export int Initialize() {
if (!EnableOverrides) {
if (IsSupported()) {
InstallTrampolines();
VRegInitialize();
EnableOverrides = true;
OutputDebugStringA("Initialize()=1\n");
return Success;
}
OutputDebugStringA("Initialize()=0\n");
return Failure;
} else {
return Failure;
}
}
开发者ID:kg,项目名称:Fury2,代码行数:15,代码来源:Global.cpp
注:本文中的IsSupported函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论