您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ AssertISV函数代码示例

51自学网 2021-06-01 19:47:45
  C++
这篇教程C++ AssertISV函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中AssertISV函数的典型用法代码示例。如果您正苦于以下问题:C++ AssertISV函数的具体用法?C++ AssertISV怎么用?C++ AssertISV使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了AssertISV函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: AssertISV

void GFXPCD3D9WindowTarget::initPresentationParams(){   // Get some video mode related info.   GFXVideoMode vm = mWindow->getVideoMode();   // Do some validation...   if(vm.fullScreen == true && mImplicit == false)   {      AssertISV(false,          "GFXPCD3D9WindowTarget::initPresentationParams - Cannot go fullscreen with secondary window!");   }   HWND hwnd = (HWND)mWindow->getSystemWindow( PlatformWindow::WindowSystem_Windows );   AssertISV(hwnd, "GFXPCD3D9WindowTarget::initPresentationParams() - no HWND");   // At some point, this will become GFXPCD3D9WindowTarget like trunk has,   // so this cast isn't as bad as it looks. ;) BTR   GFXPCD3D9Device* pcdevice = dynamic_cast<GFXPCD3D9Device*>(mDevice);   mPresentationParams = pcdevice->setupPresentParams(vm, hwnd);   if (mImplicit)   {      pcdevice->mMultisampleType = mPresentationParams.MultiSampleType;      pcdevice->mMultisampleLevel = mPresentationParams.MultiSampleQuality;   }}
开发者ID:fr1tz,项目名称:terminal-overload,代码行数:26,


示例2: fillInputBuffer

   static boolean	fillInputBuffer(j_decompress_ptr cinfo)      // Read data into our input buffer.  Client calls this      // when it needs more data from the file.   {      StreamedJPEGReader*	src = (StreamedJPEGReader*) cinfo->client_data;      AssertISV(src, "StreamedJPEGReader::fillInputBuffer - 'this' is missing!");      U32 bytesRead = src->mFile->read((char*)src->mBuffer, 8192);      if (bytesRead <= 0)       {         // Is the file completely empty?         AssertISV(!src->mStartOfFile, "StreamedJPEGReader::fillInputBuffer - Empty source stream!");         // Insert a fake EOI marker.         src->mBuffer[0] = (JOCTET) 0xFF;         src->mBuffer[1] = (JOCTET) JPEG_EOI;         bytesRead = 2;      }      // Expose buffer state to clients.      src->mSource.next_input_byte = src->mBuffer;      src->mSource.bytes_in_buffer = bytesRead;      src->mStartOfFile = false;      return true;   }
开发者ID:gitrider,项目名称:wxsj2,代码行数:27,


示例3: AssertISV

void AtlasOldMesher::optimize(){   AssertISV(false, "This is probably broken right now - BJG");#if 0   // Shove everything through nvTriStrip   SetCacheSize(24);   // first, stripify our geometry...   PrimitiveGroup *pg;   U16 pgCount;   GenerateStrips(mIndices.address(), mIndices.size(), &pg, &pgCount, AtlasOldActivationHeightfield::smDoChecks);   // We're lazy.   AssertISV(pgCount == 1,      "AtlasOldMesher::optimize - Got unexpectedly complex geometry from NVTriStrip! (a)");   AssertISV(pg->type == PT_STRIP,      "AtlasOldMesher::optimize - Got unexpectedly complex geometry from NVTriStrip! (b)");   // Remap indices! BJGTODO - how am I supposed to interpet the results?   /*   PrimitiveGroup *pgRemapped;   RemapIndices(pg, pgCount, mVerts.size(), &pgRemapped); */   // Ok, let's suck this stuff back in.   mIndices.clear();   mIndices.reserve(pg->numIndices);   for(S32 i=0; i<pg->numIndices; i++)      mIndices[i] = pg->indices[i];   // And clean up the memory from the stripper.   delete[] pg;#endif}
开发者ID:gitrider,项目名称:wxsj2,代码行数:35,


示例4: AssertISV

bool ResourceManager::remove( ResourceBase::Header* header ){   const Path &path = header->getPath();#ifdef TORQUE_DEBUG_RES_MANAGER   Con::printf( "ResourceManager::remove : [%s]", path.getFullPath().c_str() );#endif   ResourceHeaderMap::Iterator iter = mResourceHeaderMap.find( path.getFullPath() );   if ( iter != mResourceHeaderMap.end() && iter->value == header )   {      AssertISV( header && (header->getRefCount() == 0), "ResourceManager error: trying to remove resource which is still in use." );      mResourceHeaderMap.erase( iter );   }   else   {      iter = mPrevResourceHeaderMap.find( path.getFullPath() );      if ( iter == mPrevResourceHeaderMap.end() || iter->value != header )      {         Con::errorf( "ResourceManager::remove : Trying to remove non-existent resource [%s]", path.getFullPath().c_str() );         return false;      }      AssertISV( header && (header->getRefCount() == 0), "ResourceManager error: trying to remove resource which is still in use." );      mPrevResourceHeaderMap.erase( iter );   }   FS::RemoveChangeNotification( path, this, &ResourceManager::notifiedFileChanged );   return true;}
开发者ID:fr1tz,项目名称:alux3d,代码行数:31,


示例5: AssertISV

void GFXPCD3D9WindowTarget::initPresentationParams(){   // Get some video mode related info.   GFXVideoMode vm = mWindow->getVideoMode();   // Do some validation...   if(vm.fullScreen == true && mImplicit == false)   {      AssertISV(false,          "GFXPCD3D9WindowTarget::initPresentationParams - Cannot go fullscreen with secondary window!");   }   Win32Window *win = dynamic_cast<Win32Window*>(mWindow);   AssertISV(win, "GFXPCD3D9WindowTarget::initPresentationParams() - got a non Win32Window window passed in! Did DX go crossplatform?");   HWND hwnd = win->getHWND();   // At some point, this will become GFXPCD3D9WindowTarget like trunk has,   // so this cast isn't as bad as it looks. ;) BTR   GFXPCD3D9Device* pcdevice = dynamic_cast<GFXPCD3D9Device*>(mDevice);   mPresentationParams = pcdevice->setupPresentParams(vm, hwnd);   if (mImplicit)   {      pcdevice->mMultisampleType = mPresentationParams.MultiSampleType;      pcdevice->mMultisampleLevel = mPresentationParams.MultiSampleQuality;   }}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:28,


示例6: AssertISV

bool AtlasChunk::readFromStream(AtlasChunk *ac, Stream *s){   // First, read the size and allocate a buffer.      // Let's do a sentinel check.   U32 sent1;   s->read(&sent1);   AssertISV(sent1 == MakeFourCC('A', 'T', 'S', 'P'), "AtlasChunk::readFromStream - (sent1) invalid chunk master sentinel!");   s->read(&ac->mChunkSize);   // And now validate the chunk-type-sentinel.   U32 sent2;   s->read(&sent2);   AssertISV(sent2 == ac->getHeadSentinel(), "AtlasChunk::readFromStream - (sent2) invalid chunk head sentinel!");   // Get the chunk's data.  If it's already in memory, just reuse it.   // Otherwise read it from the stream.   bool isMemStream = false;   U8 *data;   U32 dataSize = ac->mChunkSize;      if( dynamic_cast< MemStream* >( s ) )   {	   MemStream* memStream = ( MemStream* ) s;	   U32 currentPos = memStream->getPosition();	   isMemStream = true;	   data = &( ( U8* ) memStream->getBuffer() )[ currentPos ];	   memStream->setPosition( currentPos + dataSize );   }   else   {	   data = new U8[ dataSize ];	   // Read next chunksize bytes into the buffer for later processing.	   s->read( dataSize, data);   }   // Check end sentinel.   U32 sent3;   s->read(&sent3);   AssertISV(sent3 == ac->getTailSentinel(), "AtlasChunk::readFromStream - (sent3) invalid chunk tail sentinel!");   // And tell the chunk to read from that buffer...   MemStream dataStream( dataSize, data );   ac->read(&dataStream);   // Clean up memory.   if( !isMemStream )	   delete[] data;   // All done!   return true;}
开发者ID:gitrider,项目名称:wxsj2,代码行数:55,


示例7: initSource

   static void initSource(j_decompress_ptr cinfo)   {      StreamedJPEGReader*	src = (StreamedJPEGReader*) cinfo->client_data;      AssertISV(src, "StreamedJPEGReader::initSource - 'this' is missing!");      src->mStartOfFile = true;   }
开发者ID:gitrider,项目名称:wxsj2,代码行数:7,


示例8: AssertFatal

bool GFXD3D11OcclusionQuery::begin(){   if(GFXDevice::getDisableOcclusionQuery())      return true;   if (mQuery == NULL)   {      D3D11_QUERY_DESC queryDesc;      queryDesc.Query = D3D11_QUERY_OCCLUSION;      queryDesc.MiscFlags = 0;      HRESULT hRes = D3D11DEVICE->CreateQuery(&queryDesc, &mQuery);      if(FAILED(hRes))      {         AssertFatal(false, "GFXD3D11OcclusionQuery::begin - Hardware does not support D3D11 Occlusion-Queries, this should be caught before this type is created");      }      AssertISV(hRes != E_OUTOFMEMORY, "GFXD3D11OcclusionQuery::begin - Out of memory");   }   // Add a begin marker to the command buffer queue.   D3D11DEVICECONTEXT->Begin(mQuery);#ifdef TORQUE_GATHER_METRICS   mBeginFrame = GuiTSCtrl::getFrameCount();#endif   return true;}
开发者ID:03050903,项目名称:Torque3D,代码行数:30,


示例9: switch

U32 DDSFile::getSurfacePitch( U32 mipLevel ) const{   if(mFlags.test(CompressedData))   {      U32 sizeMultiple = 0;      switch(mFormat)      {      case GFXFormatDXT1:         sizeMultiple = 8;         break;      case GFXFormatDXT2:      case GFXFormatDXT3:      case GFXFormatDXT4:      case GFXFormatDXT5:         sizeMultiple = 16;         break;      default:         AssertISV(false, "DDSFile::getPitch - invalid compressed texture format, we only support DXT1-5 right now.");         break;      }      // Maybe need to be DWORD aligned?      U32 align = getMax(U32(1), getWidth(mipLevel)/4) * sizeMultiple;      align += 3; align >>=2; align <<=2;      return align;   }
开发者ID:AlkexGas,项目名称:Torque3D,代码行数:28,


示例10: PROFILE_SCOPE

bool GFXGLShader::initShader( const Torque::Path &file,                               bool isVertex,                               const Vector<GFXShaderMacro> &macros ){   PROFILE_SCOPE(GFXGLShader_CompileShader);   GLuint activeShader = glCreateShader(isVertex ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER);   if(isVertex)      mVertexShader = activeShader;   else      mPixelShader = activeShader;   glAttachShader(mProgram, activeShader);         // Ok it's not in the shader gen manager, so ask Torque for it   FileStream stream;   if ( !stream.open( file, Torque::FS::File::Read ) )   {      AssertISV(false, avar("GFXGLShader::initShader - failed to open shader '%s'.", file.getFullPath().c_str()));      if ( smLogErrors )         Con::errorf( "GFXGLShader::initShader - Failed to open shader file '%s'.",             file.getFullPath().c_str() );      return false;   }      if ( !_loadShaderFromStream( activeShader, file, &stream, macros ) )      return false;      GLint compile;   glGetShaderiv(activeShader, GL_COMPILE_STATUS, &compile);   // Dump the info log to the console   U32 logLength = 0;   glGetShaderiv(activeShader, GL_INFO_LOG_LENGTH, (GLint*)&logLength);      GLint compileStatus = GL_TRUE;   if ( logLength )   {      FrameAllocatorMarker fam;      char* log = (char*)fam.alloc(logLength);      glGetShaderInfoLog(activeShader, logLength, NULL, log);      // Always print errors      glGetShaderiv( activeShader, GL_COMPILE_STATUS, &compileStatus );      if ( compileStatus == GL_FALSE )      {         if ( smLogErrors )         {            Con::errorf( "GFXGLShader::initShader - Error compiling shader!" );            Con::errorf( "Program %s: %s", file.getFullPath().c_str(), log );         }      }      else if ( smLogWarnings )         Con::warnf( "Program %s: %s", file.getFullPath().c_str(), log );   }   return compileStatus != GL_FALSE;}
开发者ID:03050903,项目名称:Torque3D,代码行数:60,


示例11: if

void ConsoleConstructor::setup(){   for(ConsoleConstructor *walk = first; walk; walk = walk->next)   {#ifdef TORQUE_DEBUG      walk->validate();#endif      if( walk->sc )         Con::addCommand( walk->className, walk->funcName, walk->sc, walk->usage, walk->mina, walk->maxa, walk->toolOnly, walk->header );      else if( walk->ic )         Con::addCommand( walk->className, walk->funcName, walk->ic, walk->usage, walk->mina, walk->maxa, walk->toolOnly, walk->header );      else if( walk->fc )         Con::addCommand( walk->className, walk->funcName, walk->fc, walk->usage, walk->mina, walk->maxa, walk->toolOnly, walk->header );      else if( walk->vc )         Con::addCommand( walk->className, walk->funcName, walk->vc, walk->usage, walk->mina, walk->maxa, walk->toolOnly, walk->header );      else if( walk->bc )         Con::addCommand( walk->className, walk->funcName, walk->bc, walk->usage, walk->mina, walk->maxa, walk->toolOnly, walk->header );      else if( walk->group )         Con::markCommandGroup( walk->className, walk->funcName, walk->usage );      else if( walk->callback )         Con::noteScriptCallback( walk->className, walk->funcName, walk->usage, walk->header );      else if( walk->ns )      {         Namespace* ns = Namespace::find( StringTable->insert( walk->className ) );         if( ns )            ns->mUsage = walk->usage;      }      else      {         AssertISV( false, "Found a ConsoleConstructor with an indeterminate type!" );      }   }}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:34,


示例12: String

HRESULT _gfxD3DXInclude::Open(THIS_ D3DXINCLUDE_TYPE IncludeType, LPCSTR pFileName,                               LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes,                               LPSTR pFullPath, DWORD cbFullPath){   // First try making the path relative to the parent.   Torque::Path path = Torque::Path::Join( mLastPath.last(), '/', pFileName );   path = Torque::Path::CompressPath( path );   if ( !Torque::FS::ReadFile( path, (void *&)*ppData, *pBytes, true ) )   {      // Ok... now try using the path as is.      path = String( pFileName );      path = Torque::Path::CompressPath( path );      if ( !Torque::FS::ReadFile( path, (void *&)*ppData, *pBytes, true ) )      {         AssertISV(false, avar( "Failed to open include '%s'.", pFileName));         return E_FAIL;      }   }   // If the data was of zero size then we cannot recurse   // into this file and DX won't call Close() below.   //   // So in this case don't push on the path.   if ( *pBytes > 0 )      mLastPath.push_back( path.getRootAndPath() );   return S_OK;}
开发者ID:Adrellias,项目名称:Torque3D-DaveWork,代码行数:30,


示例13: AssertFatal

bool GFXD3D9OcclusionQuery::begin(){   if ( GFXDevice::getDisableOcclusionQuery() )      return true;   if ( mQuery == NULL )   {#ifdef TORQUE_OS_XENON      HRESULT hRes = static_cast<GFXD3D9Device*>( mDevice )->getDevice()->CreateQueryTiled( D3DQUERYTYPE_OCCLUSION, 2, &mQuery );#else      HRESULT hRes = static_cast<GFXD3D9Device*>( mDevice )->getDevice()->CreateQuery( D3DQUERYTYPE_OCCLUSION, &mQuery );#endif      AssertFatal( hRes != D3DERR_NOTAVAILABLE, "GFXD3D9OcclusionQuery::begin - Hardware does not support D3D9 Occlusion-Queries, this should be caught before this type is created" );      AssertISV( hRes != E_OUTOFMEMORY, "GFXD3D9OcclusionQuery::begin - Out of memory" );   }   // Add a begin marker to the command buffer queue.   mQuery->Issue( D3DISSUE_BEGIN );#ifdef TORQUE_GATHER_METRICS   mBeginFrame = GuiTSCtrl::getFrameCount();#endif   return true;}
开发者ID:Andry86,项目名称:Torque3D,代码行数:26,


示例14: mngFatalErrorFn

static mng_bool mngFatalErrorFn(mng_handle mng, mng_int32 code, mng_int8 severity, mng_chunkid chunktype, mng_uint32 chunkseq, mng_int32 extra1, mng_int32 extra2, mng_pchar text){   mng_cleanup(&mng);      AssertISV(false, avar("Error reading MNG file:/n %s", (const char*)text));   return MNG_FALSE;}
开发者ID:nev7n,项目名称:Torque3D,代码行数:7,


示例15: AssertISV

void GFXD3D9CardProfiler::init(){   mD3DDevice = dynamic_cast<GFXD3D9Device *>(GFX)->getDevice();   AssertISV( mD3DDevice, "GFXD3D9CardProfiler::init() - No D3D9 Device found!");   // Grab the caps so we can get our adapter ordinal and look up our name.   D3DCAPS9 caps;   D3D9Assert(mD3DDevice->GetDeviceCaps(&caps), "GFXD3D9CardProfiler::init - failed to get device caps!");#ifdef TORQUE_OS_XENON   mCardDescription = "Xbox360 GPU";   mChipSet = "ATI";   mVersionString = String::ToString(_XDK_VER);   mVideoMemory = 512 * 1024 * 1024;#else   WMIVideoInfo wmiVidInfo;   if( wmiVidInfo.profileAdapters() )   {      const PlatformVideoInfo::PVIAdapter &adapter = wmiVidInfo.getAdapterInformation( caps.AdapterOrdinal );      mCardDescription = adapter.description;      mChipSet = adapter.chipSet;      mVersionString = adapter.driverVersion;      mVideoMemory = adapter.vram;   }#endif   Parent::init();}
开发者ID:campadrenalin,项目名称:terminal-overload,代码行数:29,


示例16: AssertISV

Bool FileRWStream::open(const char* in_filename, bool readOnly){   if(!readOnly && assertIsv)   {      AssertISV(ResourceManager::sm_pManager == NULL ||               ResourceManager::sm_pManager->isValidWriteFileName(in_filename) == true,               avar("Attempted write to file: %s./n"                     "File is not in a writable directory.", in_filename));   }	close();	// Try to open the file for binary writing.	// if the file exists truncate it.   // if the file does not exist, then instruct open	// to create a file with RW attributes   if(!readOnly)      hFile = CreateFile(in_filename, GENERIC_WRITE|GENERIC_READ, 0, NULL,                      OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);   else      hFile = CreateFile( in_filename, GENERIC_READ, FILE_SHARE_READ, NULL,                        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);   if ( hFile == INVALID_HANDLE_VALUE)	{      setStatus();		return FALSE;	}	clrStatus();	isMine = YES;	return TRUE;}
开发者ID:AltimorTASDK,项目名称:TribesRebirth,代码行数:32,


示例17: AssertISV

void AtlasDiscreteMesh::remap(const Vector<U16> &remapTable){   AssertISV(remapTable.size() == mVertexCount, "AtlasDiscreteMesh::remap - remap table not the right size!");   // Take each index, run it through the remap table, and store the result.   for(U32 i=0; i<mIndexCount; i++)      mIndex[i] = remapTable[mIndex[i]];}
开发者ID:gitrider,项目名称:wxsj2,代码行数:8,


示例18: mngProcessHeaderFn

static mng_bool mngProcessHeaderFn(mng_handle mng, mng_uint32 width, mng_uint32 height){   mngstuff *mymng = (mngstuff *)mng_get_userdata(mng);   GFXFormat format;   mng_uint8 colorType = mng_get_colortype(mng);   mng_uint8 alphaDepth = mng_get_alphadepth(mng);   switch(colorType)   {      case MNG_COLORTYPE_GRAY:      case MNG_COLORTYPE_JPEGGRAY:         format = GFXFormatR8G8B8;         mng_set_canvasstyle(mng, MNG_CANVAS_RGB8);         break;      case MNG_COLORTYPE_INDEXED:         if(alphaDepth >= 1)         {            format = GFXFormatR8G8B8A8;            mng_set_canvasstyle(mng, MNG_CANVAS_RGBA8);         }         else         {            format = GFXFormatR8G8B8;            mng_set_canvasstyle(mng, MNG_CANVAS_RGB8);         }      case MNG_COLORTYPE_RGB:      case MNG_COLORTYPE_JPEGCOLOR:         if(alphaDepth >= 1)         {            format = GFXFormatR8G8B8A8;            mng_set_canvasstyle(mng, MNG_CANVAS_RGBA8);         }         else         {            format = GFXFormatR8G8B8;            mng_set_canvasstyle(mng, MNG_CANVAS_RGB8);         }         break;      case MNG_COLORTYPE_RGBA:      case MNG_COLORTYPE_JPEGCOLORA:         format = GFXFormatR8G8B8A8;         mng_set_canvasstyle(mng, MNG_CANVAS_RGBA8);         break;      default:         // This case should never get hit, however it resolves a compiler         // warning         format = GFXFormat_FIRST;         AssertISV( false, "Unknown color format in bitmap MNG Loading" );   }   mymng->image->allocateBitmap(width, height, false, format);   return MNG_TRUE;}
开发者ID:nev7n,项目名称:Torque3D,代码行数:57,


示例19: AssertISV

void SimDataBlockEvent::unpack(NetConnection *cptr, BitStream *bstream){   if(bstream->readFlag())   {      mProcess = true;      id = bstream->readInt(DataBlockObjectIdBitSize) + DataBlockObjectIdFirst;      S32 classId = bstream->readClassId(NetClassTypeDataBlock, cptr->getNetClassGroup());      mIndex = bstream->readInt(DataBlockObjectIdBitSize);      mTotal = bstream->readInt(DataBlockObjectIdBitSize + 1);            SimObject* ptr;      if( Sim::findObject( id, ptr ) )      {         // An object with the given ID already exists.  Make sure it has the right class.                  AbstractClassRep* classRep = AbstractClassRep::findClassRep( cptr->getNetClassGroup(), NetClassTypeDataBlock, classId );         if( classRep && dStrcmp( classRep->getClassName(), ptr->getClassName() ) != 0 )         {            Con::warnf( "A '%s' datablock with id: %d already existed. "                        "Clobbering it with new '%s' datablock from server.",                        ptr->getClassName(), id, classRep->getClassName() );            ptr->deleteObject();            ptr = NULL;         }      }            if( !ptr )         ptr = ( SimObject* ) ConsoleObject::create( cptr->getNetClassGroup(), NetClassTypeDataBlock, classId );               mObj = dynamic_cast< SimDataBlock* >( ptr );      if( mObj != NULL )      {         #ifdef DEBUG_SPEW         Con::printf(" - SimDataBlockEvent: unpacking event of type: %s", mObj->getClassName());         #endif                  mObj->unpackData( bstream );      }      else      {         #ifdef DEBUG_SPEW         Con::printf(" - SimDataBlockEvent: INVALID PACKET!  Could not create class with classID: %d", classId);         #endif                  delete ptr;         cptr->setLastError("Invalid packet in SimDataBlockEvent::unpack()");      }#ifdef TORQUE_DEBUG_NET      U32 checksum = bstream->readInt(32);      AssertISV( (checksum ^ DebugChecksum) == (U32)classId,         avar("unpack did not match pack for event of class %s.",            mObj->getClassName()) );#endif   }}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:57,


示例20: AssertISV

void Platform::setWindowSize(U32 newWidth, U32 newHeight, bool fullScreen ){   AssertISV(gWindow, "Platform::setWindowSize - no window present!");   // Grab the curent video settings and diddle them with the new values.   GFXVideoMode vm = gWindow->getVideoMode();   vm.resolution.set(newWidth, newHeight);   vm.fullScreen = fullScreen;   gWindow->setVideoMode(vm);}
开发者ID:03050903,项目名称:Torque3D,代码行数:10,


示例21: AssertISV

RenderPassManager* SceneManager::getDefaultRenderPass() const{   if( !mDefaultRenderPass )   {      Sim::findObject( "DiffuseRenderPassManager", mDefaultRenderPass );      AssertISV( mDefaultRenderPass, "SceneManager::_setDefaultRenderPass - No DiffuseRenderPassManager defined!  Must be set up in script!" );   }   return mDefaultRenderPass;}
开发者ID:chaple2008,项目名称:DNT-Torque3D,代码行数:10,


示例22: main

intmain(int argc, char* argv[]){   if (argc != 3) {      usage();      return EXIT_FAILURE;   }   VolumeRStream  inputVol;   VolumeRWStream outputVol;   bool test = inputVol.openVolume(argv[2]);   AssertISV(test != false, avar("Could not open input volume: %s", argv[2]));      test = outputVol.openVolume(argv[1]);   AssertISV(test != false, avar("Could not open output volume: %s", argv[1]));   FindMatch fileMatches("*", 1024);   inputVol.findMatches(&fileMatches);   AssertWarn(fileMatches.isFull() == false,              "Exceeded max merge size (1024) files have been left out");   for (int i = 0; i < fileMatches.numMatches(); i++) {      const char* pFileName = fileMatches.matchList[i];            // Open the stream from the input volume      //      bool testOpen = inputVol.open(pFileName);      AssertFatal(testOpen == true, "Something is horribly wrong...");            outputVol.open(pFileName, STRM_COMPRESS_NONE, inputVol.getSize());            copyStreams(outputVol, inputVol);      outputVol.close();      inputVol.close();   }   outputVol.closeVolume();   inputVol.closeVolume();   return EXIT_SUCCESS;}
开发者ID:AltimorTASDK,项目名称:TribesRebirth,代码行数:42,


示例23: isMainDotCsPresent

static bool isMainDotCsPresent(char *dir){    char maincsbuf[MAX_MAC_PATH_LONG];   const char *maincsname = "/main.cs";   const U32 len = dStrlen(dir) + dStrlen(maincsname)+1;   AssertISV(len < MAX_MAC_PATH_LONG, "Sorry, path is too long, I can't run from this folder.");      dSprintf(maincsbuf,MAX_MAC_PATH_LONG,"%s%s", dir, maincsname);      return Platform::isFile(maincsbuf);}
开发者ID:120pulsations,项目名称:Torque2D,代码行数:11,


示例24: AssertFatal

void GFXD3D9QueryFence::resurrect(){   // Recreate the query   if( mQuery == NULL )   {      HRESULT hRes = static_cast<GFXD3D9Device *>( mDevice )->getDevice()->CreateQuery( D3DQUERYTYPE_EVENT, &mQuery );      AssertFatal( hRes != D3DERR_NOTAVAILABLE, "GFXD3D9QueryFence::resurrect - Hardware does not support D3D9 Queries, this should be caught before this fence type is created" );      AssertISV( hRes != E_OUTOFMEMORY, "GFXD3D9QueryFence::resurrect - Out of memory" );   }}
开发者ID:adhistac,项目名称:ee-client-2-0,代码行数:11,


示例25: AssertISV

void ConsoleConstructor::validate(){#ifdef TORQUE_DEBUG   // Don't do the following check if we're not a method/func.   if(this->group)      return;   // In debug, walk the list and make sure this isn't a duplicate.   for(ConsoleConstructor *walk = first; walk; walk = walk->next)   {      // Skip mismatching func/method names.      if(dStricmp(walk->funcName, this->funcName))         continue;      // Don't compare functions with methods or vice versa.      if(bool(this->className) != bool(walk->className))         continue;      // Skip mismatching classnames, if they're present.      if(this->className && walk->className && dStricmp(walk->className, this->className))         continue;      // If we encounter ourselves, stop searching; this prevents duplicate      // firing of the assert, instead only firing for the latter encountered      // entry.      if(this == walk)         break;      // Match!      if(this->className)      {         AssertISV(false, avar("ConsoleConstructor::setup - ConsoleMethod '%s::%s' collides with another of the same name.", this->className, this->funcName));      }      else      {         AssertISV(false, avar("ConsoleConstructor::setup - ConsoleFunction '%s' collides with another of the same name.", this->funcName));      }   }#endif}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:40,


示例26: AssertISV

void GFXD3D11OcclusionQuery::resurrect(){	// Recreate the query 	if( mQuery == NULL ) 	{       D3D11_QUERY_DESC queryDesc;      queryDesc.Query = D3D11_QUERY_OCCLUSION;      queryDesc.MiscFlags = 0;      HRESULT hRes = D3D11DEVICE->CreateQuery(&queryDesc, &mQuery); 	      AssertISV( hRes != E_OUTOFMEMORY, "GFXD3D9QueryFence::resurrect - Out of memory" );    } }
开发者ID:03050903,项目名称:Torque3D,代码行数:14,


示例27: termSource

   static void termSource(j_decompress_ptr cinfo)      // Terminate the source.  Make sure we get deleted.   {      StreamedJPEGReader*	src = (StreamedJPEGReader*) cinfo->client_data;      AssertISV(src, "StreamedJPEGReader::termSource - 'this' is missing!");      // @@ it's kind of bogus to be deleting here      // -- term_source happens at the end of      // reading an image, but we're probably going      // to want to init a source and use it to read      // many images, without reallocating our      // buffer.      //delete src;      //cinfo->src = NULL;   }
开发者ID:gitrider,项目名称:wxsj2,代码行数:15,


示例28: PROFILE_START

void GFXD3D9QueryFence::issue(){   PROFILE_START( GFXD3D9QueryFence_issue );   // Create the query if we need to   if( mQuery == NULL )   {      HRESULT hRes = static_cast<GFXD3D9Device *>( mDevice )->getDevice()->CreateQuery( D3DQUERYTYPE_EVENT, &mQuery );      AssertFatal( hRes != D3DERR_NOTAVAILABLE, "Hardware does not support D3D9 Queries, this should be caught before this fence type is created" );      AssertISV( hRes != E_OUTOFMEMORY, "Out of memory" );   }   // Issue the query   mQuery->Issue( D3DISSUE_END );   PROFILE_END();}
开发者ID:adhistac,项目名称:ee-client-2-0,代码行数:18,


示例29: BLOCK

void SimDataBlockEvent::unpack(NetConnection *cptr, BitStream *bstream){#ifdef AFX_CAP_DATABLOCK_CACHE // AFX CODE BLOCK (db-cache) <<	// stash the stream position prior to unpacking	S32 start_pos = bstream->getCurPos();	((GameConnection *)cptr)->tempDisableStringBuffering(bstream);#endif // AFX CODE BLOCK (db-cache) >>   if(bstream->readFlag())   {      mProcess = true;      id = bstream->readInt(DataBlockObjectIdBitSize) + DataBlockObjectIdFirst;      S32 classId = bstream->readClassId(NetClassTypeDataBlock, cptr->getNetClassGroup());      mIndex = bstream->readInt(DataBlockObjectIdBitSize);      mTotal = bstream->readInt(DataBlockObjectIdBitSize + 1);      SimObject* ptr = (SimObject *) ConsoleObject::create(cptr->getNetClassGroup(), NetClassTypeDataBlock, classId);      if ((mObj = dynamic_cast<SimDataBlock*>(ptr)) != 0)       {         //Con::printf(" - SimDataBlockEvent: unpacking event of type: %s", mObj->getClassName());         mObj->unpackData(bstream);      }      else      {         //Con::printf(" - SimDataBlockEvent: INVALID PACKET!  Could not create class with classID: %d", classId);         delete ptr;         cptr->setLastError("Invalid packet in SimDataBlockEvent::unpack()");      }#ifdef TORQUE_DEBUG_NET      U32 checksum = bstream->readInt(32);      AssertISV( (checksum ^ DebugChecksum) == (U32)classId,         avar("unpack did not match pack for event of class %s.",            mObj->getClassName()) );#endif   }#ifdef AFX_CAP_DATABLOCK_CACHE // AFX CODE BLOCK (db-cache) <<   // rewind to stream position and then process raw bytes for caching   ((GameConnection *)cptr)->repackClientDatablock(bstream, start_pos);   ((GameConnection *)cptr)->restoreStringBuffering(bstream);#endif // AFX CODE BLOCK (db-cache) >>}
开发者ID:adhistac,项目名称:ee-client-2-0,代码行数:42,



注:本文中的AssertISV函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ AssertIsOnBackgroundThread函数代码示例
C++ AssertEx函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。