void GLSetup::restore() { // Restoring glViewport(mViewport[0], mViewport[1], mViewport[2], mViewport[3]); setCapability(GL_BLEND, mBlend); glDepthMask(mDepthMask); glBlendFunc(mBlendSrc, mBlendDst); glUseProgram(mShaderProgram); glBindVertexArray(mVertexArrayObject); setCapability(GL_TEXTURE_2D, mTexture2D); glActiveTexture(mActiveTexture); setCapability(GL_CULL_FACE, mCulling); }
void GLSetup::restore() { // Restoring glViewport(mViewport[0], mViewport[1], mViewport[2], mViewport[3]); setCapability(GL_BLEND, mBlend); glDepthMask(mDepthMask); glBlendFunc(mBlendSrc, mBlendDst); glUseProgram(mShaderProgram); glBindVertexArray(mVertexArrayObject); setCapability(GL_CULL_FACE, mCulling); glColorMask(mColorWritemask[0], mColorWritemask[1], mColorWritemask[2], mColorWritemask[3]); setCapability(GL_STENCIL_TEST, mStencilTest); }
WhiteBalance::WhiteBalance(QtCamDevice *dev, QObject *parent) : Capability(parent), m_wb(new QtCamWhiteBalance(dev, this)) { setCapability(m_wb); QObject::connect(m_wb, SIGNAL(valueChanged()), this, SIGNAL(valueChanged())); }
void LLViewerRegion::setSeedCapability(const std::string& url) { if (getCapability("Seed") == url) { llwarns << "Ignoring duplicate seed capability" << llendl; return; } m_eventPoll.reset(); m_capabilities.clear(); setCapability("Seed", url); LLSD capabilityNames = LLSD::emptyArray(); capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); capabilityNames.append("FetchInventory"); capabilityNames.append("WebFetchInventoryDescendents"); capabilityNames.append("FetchLib"); capabilityNames.append("FetchLibDescendents"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); capabilityNames.append("NewFileAgentInventory"); capabilityNames.append("ParcelPropertiesUpdate"); capabilityNames.append("ParcelVoiceInfoRequest"); capabilityNames.append("ProvisionVoiceAccountRequest"); capabilityNames.append("RemoteParcelRequest"); capabilityNames.append("RequestTextureDownload"); capabilityNames.append("SearchStatRequest"); capabilityNames.append("SearchStatTracking"); capabilityNames.append("SendPostcard"); capabilityNames.append("SendUserReport"); capabilityNames.append("SendUserReportWithScreenshot"); capabilityNames.append("ServerReleaseNotes"); capabilityNames.append("StartGroupProposal"); capabilityNames.append("UntrustedSimulatorMessage"); capabilityNames.append("UpdateAgentLanguage"); capabilityNames.append("UpdateGestureAgentInventory"); capabilityNames.append("UpdateNotecardAgentInventory"); capabilityNames.append("UpdateScriptAgent"); capabilityNames.append("UpdateGestureTaskInventory"); capabilityNames.append("UpdateNotecardTaskInventory"); capabilityNames.append("UpdateScriptTask"); capabilityNames.append("UploadBakedTexture"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); // Please add new capabilities alphabetically to reduce // merge conflicts. llinfos << "posting to seed " << url << llendl; m_httpResponderPtr = BaseCapabilitiesComplete::build(this) ; LLHTTPClient::post( url, capabilityNames, m_httpResponderPtr ); }
Aperture::Aperture(QtCamDevice *dev, QObject *parent) : Capability(parent), m_aperture(new QtCamAperture(dev, this)) { setCapability(m_aperture); QObject::connect(m_aperture, SIGNAL(valueChanged()), this, SIGNAL(valueChanged())); QObject::connect(m_aperture, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged())); QObject::connect(m_aperture, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged())); }
Iso::Iso(QtCamDevice *dev, QObject *parent) : Capability(parent), m_iso(new QtCamIso(dev, this)) { setCapability(m_iso); QObject::connect(m_iso, SIGNAL(valueChanged()), this, SIGNAL(valueChanged())); QObject::connect(m_iso, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged())); QObject::connect(m_iso, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged())); }
void LLViewerRegion::setSeedCapability(const std::string& url) { if (getCapability("Seed") == url) { // llwarns << "Ignoring duplicate seed capability" << llendl; return; } delete mImpl->mEventPoll; mImpl->mEventPoll = NULL; mImpl->mCapabilities.clear(); setCapability("Seed", url); LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames(capabilityNames); llinfos << "posting to seed " << url << llendl; S32 id = ++mImpl->mHttpResponderID; LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(getHandle(), id), LLSD(), CAP_REQUEST_TIMEOUT); }
void GFXD3D9CardProfiler::setupCardCapabilities() { // Get the D3D device caps D3DCAPS9 caps; mD3DDevice->GetDeviceCaps(&caps); setCapability( "autoMipMapLevel", ( caps.Caps2 & D3DCAPS2_CANAUTOGENMIPMAP ? 1 : 0 ) ); setCapability( "maxTextureWidth", caps.MaxTextureWidth ); setCapability( "maxTextureHeight", caps.MaxTextureHeight ); setCapability( "maxTextureSize", getMin( (U32)caps.MaxTextureWidth, (U32)caps.MaxTextureHeight) ); bool canDoLERPDetailBlend = ( caps.TextureOpCaps & D3DTEXOPCAPS_LERP ) && ( caps.MaxTextureBlendStages > 1 ); bool canDoFourStageDetailBlend = ( caps.TextureOpCaps & D3DTEXOPCAPS_SUBTRACT ) && ( caps.PrimitiveMiscCaps & D3DPMISCCAPS_TSSARGTEMP ) && ( caps.MaxTextureBlendStages > 3 ); setCapability( "lerpDetailBlend", canDoLERPDetailBlend ); setCapability( "fourStageDetailBlend", canDoFourStageDetailBlend ); }
void GFXGLCardProfiler::setupCardCapabilities() { GLint maxTexSize; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTexSize); const char* versionString = reinterpret_cast<const char*>(glGetString(GL_VERSION)); F32 glVersion = dAtof(versionString); // OpenGL doesn't have separate maximum width/height. setCapability("maxTextureWidth", maxTexSize); setCapability("maxTextureHeight", maxTexSize); setCapability("maxTextureSize", maxTexSize); // If extensions haven't been inited, we're in trouble here. bool suppVBO = (gglHasExtension(GL_ARB_vertex_buffer_object) || glVersion >= 1.499f); setCapability("GL::suppVertexBufferObject", suppVBO); // check if render to texture supported is available bool suppRTT = gglHasExtension(GL_EXT_framebuffer_object); setCapability("GL::suppRenderTexture", suppRTT); bool suppBlit = gglHasExtension(GL_EXT_framebuffer_blit); setCapability("GL::suppRTBlit", suppBlit); bool suppFloatTex = gglHasExtension(GL_ATI_texture_float); setCapability("GL::suppFloatTexture", suppFloatTex); // Check for anisotropic filtering support. bool suppAnisotropic = gglHasExtension( GL_EXT_texture_filter_anisotropic ); setCapability( "GL::suppAnisotropic", suppAnisotropic ); // Check to see if mipmap lod bias is supported bool suppMipLodBias = gglHasExtension(GL_EXT_texture_lod_bias); setCapability("GL::suppMipLodBias", suppMipLodBias); // check to see if we have the fragment shader extension or the gl version is high enough for glsl to be core // also check to see if the language version is high enough F32 glslVersion = dAtof(reinterpret_cast<const char*>(glGetString( GL_SHADING_LANGUAGE_VERSION))); bool suppSPU = (gglHasExtension(GL_ARB_fragment_shader) || glVersion >= 1.999f) && glslVersion >= 1.0999; setCapability("GL::suppFragmentShader", suppSPU); bool suppAppleFence = gglHasExtension(GL_APPLE_fence); setCapability("GL::APPLE::suppFence", suppAppleFence); // When enabled, call glGenerateMipmapEXT() to generate mipmaps instead of relying on GL_GENERATE_MIPMAP setCapability("GL::Workaround::needsExplicitGenerateMipmap", false); // When enabled, binds and unbinds a texture target before doing the depth buffer copy. Failure to do // so will cause a hard freeze on Mac OS 10.4 with a Radeon X1600 setCapability("GL::Workaround::X1600DepthBufferCopy", false); // When enabled, does not copy the last column and row of the depth buffer in a depth buffer copy. Failure // to do so will cause a kernel panic on Mac OS 10.5(.1) with a Radeon HD 2600 (fixed in 10.5.2) setCapability("GL::Workaround::HD2600DepthBufferCopy", false); // Certain Intel drivers have a divide by 0 crash if mipmaps are specified with // glTexSubImage2D. setCapability("GL::Workaround::noManualMips", false); }
void LLViewerRegion::setSeedCapability(const std::string& url) { if (getCapability("Seed") == url) { // llwarns << "Ignoring duplicate seed capability" << llendl; return; } delete mEventPoll; mEventPoll = NULL; mCapabilities.clear(); setCapability("Seed", url); LLSD capabilityNames = LLSD::emptyArray(); capabilityNames.append("AttachmentResources"); capabilityNames.append("AvatarPickerSearch"); capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); capabilityNames.append("ObjectMedia"); capabilityNames.append("ObjectMediaNavigate"); if (gSavedSettings.getBOOL("UseHTTPInventory")) { capabilityNames.append("FetchLib2"); capabilityNames.append("FetchLibDescendents2"); capabilityNames.append("FetchInventory2"); capabilityNames.append("FetchInventoryDescendents2"); } capabilityNames.append("GetDisplayNames"); capabilityNames.append("GetTexture"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); capabilityNames.append("LandResources"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); capabilityNames.append("NewFileAgentInventory"); capabilityNames.append("ParcelPropertiesUpdate"); capabilityNames.append("ParcelMediaURLFilterList"); capabilityNames.append("ParcelNavigateMedia"); capabilityNames.append("ParcelVoiceInfoRequest"); capabilityNames.append("ProductInfoRequest"); capabilityNames.append("ProvisionVoiceAccountRequest"); capabilityNames.append("RemoteParcelRequest"); capabilityNames.append("RequestTextureDownload"); capabilityNames.append("SearchStatRequest"); capabilityNames.append("SearchStatTracking"); capabilityNames.append("SendPostcard"); capabilityNames.append("SendUserReport"); capabilityNames.append("SendUserReportWithScreenshot"); capabilityNames.append("ServerReleaseNotes"); capabilityNames.append("SetDisplayName"); capabilityNames.append("SimConsoleAsync"); capabilityNames.append("StartGroupProposal"); capabilityNames.append("TextureStats"); capabilityNames.append("UntrustedSimulatorMessage"); capabilityNames.append("UpdateAgentInformation"); capabilityNames.append("UpdateAgentLanguage"); capabilityNames.append("UpdateGestureAgentInventory"); capabilityNames.append("UpdateNotecardAgentInventory"); capabilityNames.append("UpdateScriptAgent"); capabilityNames.append("UpdateGestureTaskInventory"); capabilityNames.append("UpdateNotecardTaskInventory"); capabilityNames.append("UpdateScriptTask"); capabilityNames.append("UploadBakedTexture"); capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); // Please add new capabilities alphabetically to reduce // merge conflicts. llinfos << "posting to seed " << url << llendl; mHttpResponderPtr = BaseCapabilitiesComplete::build(this) ; LLHTTPClient::post(url, capabilityNames, mHttpResponderPtr); }
void GFXGLCardProfiler::setupCardCapabilities() { GLint maxTexSize; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTexSize); // OpenGL doesn't have separate maximum width/height. setCapability("maxTextureWidth", maxTexSize); setCapability("maxTextureHeight", maxTexSize); setCapability("maxTextureSize", maxTexSize); // Check for anisotropic filtering support. setCapability("GL_EXT_texture_filter_anisotropic", gglHasExtension(EXT_texture_filter_anisotropic)); // Check for buffer storage #ifdef TORQUE_NSIGHT_WORKAROUND setCapability("GL_ARB_buffer_storage", false); #else setCapability("GL_ARB_buffer_storage", gglHasExtension(ARB_buffer_storage)); #endif // Check for shader model 5.0 setCapability("GL_ARB_gpu_shader5", gglHasExtension(ARB_gpu_shader5)); // Check for texture storage setCapability("GL_ARB_texture_storage", gglHasExtension(ARB_texture_storage)); // Check for sampler objects setCapability("GL_ARB_sampler_objects", gglHasExtension(ARB_sampler_objects)); // Check for copy image support setCapability("GL_ARB_copy_image", gglHasExtension(ARB_copy_image)); // Check for vertex attrib binding setCapability("GL_ARB_vertex_attrib_binding", gglHasExtension(ARB_vertex_attrib_binding)); }
GpibThermocontrollerDevice::GpibThermocontrollerDevice(QByteArray &shortName, Experiment *exp): GpibDevice(shortName, exp), AbstractThermocontrollerDevice() { setCapability("thermocontroller"); //entering device options group to read values qDebug()<<deviceSettings->group(); deviceSettings->beginGroup(shortName); qDebug()<<deviceSettings->group(); //reading channels string QString channels=deviceSettings->value("channels").toString(); //reading controls string QString controls=deviceSettings->value("controls").toString(); //split comma-separated values in string to stringlist QStringList channelList=channels.split(",",QString::SkipEmptyParts); QStringList controlList=controls.split(",",QString::SkipEmptyParts); //set controlloopnum to the controlList.size() if (controlList.size()>0) { qDebug()<<"Setting loop num of"<<shortname<<"to"<<controlList.size(); setControlLoopNum(controlList.size()); } else { qWarning()<<"Control loop num read from config for"<<shortname<<"is"<<controlList.size(); } //setting loop names as they should appear in gpib commands for (int i=0;i<controlList.size();++i) { loopName[i]=controlList.at(i).trimmed(); } //initializing gpib commands from config engageControlsCommand=deviceSettings->value("control/engage").toString(); disengageControlsCommand=deviceSettings->value("control/disengage").toString(); statusControlsCommand=deviceSettings->value("control/status").toString(); statusControlsEngagedResponse=deviceSettings->value("control/status-on").toString(); setTypeControlCommand=deviceSettings->value("control-set/type").toString(); getTypeControlCommand=deviceSettings->value("control/type").toString(); controlTypes=deviceSettings->value("control/types").toString(); controlTypeList=controlTypes.split(","); offControlCommand=deviceSettings->value("control/type-off").toString(); pidControlCommand=deviceSettings->value("control/type-pid").toString(); getControlTargetCommand=deviceSettings->value("control/target").toString(); setControlTargetCommand=deviceSettings->value("control-set/target").toString(); getPControlCommand=deviceSettings->value("control/P").toString(); getIControlCommand=deviceSettings->value("control/I").toString(); getDControlCommand=deviceSettings->value("control/D").toString(); setPControlCommand=deviceSettings->value("control-set/P").toString(); setIControlCommand=deviceSettings->value("control-set/I").toString(); setDControlCommand=deviceSettings->value("control-set/D").toString(); getControlChannelCommand=deviceSettings->value("control/channel").toString(); setControlChannelCommand=deviceSettings->value("control-set/channel").toString(); getControlPowerCommand=deviceSettings->value("control/power").toString(); getControlPowerRangeCommand=deviceSettings->value("control/power-range").toString(); // QStringList expControls=experimentSettings->value("controls").toString().split(",",QString::SkipEmptyParts); deviceSettings->endGroup(); }
void Capability::setPropTypes(std::vector<std::string>& pt) { setCapability("prop-types", pt); }
void Capability::setCostTypes(std::vector<std::string>& ct) { setCapability("cost-types", ct); }
void Capability::setCostModes(std::vector<std::string>& cm) { setCapability("cost-modes", cm); }