SPtr<GpuParamBlockBuffer> HardwareBufferManager::createGpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage) { SPtr<GpuParamBlockBuffer> paramBlockPtr = bs_core_ptr<GpuParamBlockBuffer>(new (bs_alloc<GpuParamBlockBuffer>()) GpuParamBlockBuffer(size, usage)); paramBlockPtr->_setThisPtr(paramBlockPtr); paramBlockPtr->initialize(); return paramBlockPtr; }
SPtr<Prefab> Prefab::createEmpty() { SPtr<Prefab> newPrefab = bs_core_ptr<Prefab>(new (bs_alloc<Prefab>()) Prefab()); newPrefab->_setThisPtr(newPrefab); return newPrefab; }
SPtr<VertexBuffer> HardwareBufferManager::createVertexBuffer(const VERTEX_BUFFER_DESC& desc) { SPtr<VertexBuffer> vbuf = bs_core_ptr<VertexBuffer>(new (bs_alloc<VertexBuffer>()) VertexBuffer(desc)); vbuf->_setThisPtr(vbuf); vbuf->initialize(); return vbuf; }
SPtr<Material> MaterialManager::createEmpty() const { SPtr<Material> newMat = bs_core_ptr<Material>(new (bs_alloc<Material>()) Material()); newMat->_setThisPtr(newMat); return newMat; }
SPtr<Font> Font::_createEmpty() { SPtr<Font> newFont = bs_core_ptr<Font>(new (bs_alloc<Font>()) Font()); newFont->_setThisPtr(newFont); return newFont; }
SPtr<GpuProgramCore> create(GpuProgramType type) override { SPtr<NullProgramCore> ret = bs_shared_ptr_new<NullProgramCore>(); ret->_setThisPtr(ret); return ret; }
SPtr<Technique> Technique::createEmpty() { Technique* technique = new (bs_alloc<Technique>()) Technique(); SPtr<Technique> techniquePtr = bs_core_ptr<Technique>(technique); techniquePtr->_setThisPtr(techniquePtr); return techniquePtr; }
SPtr<MultiRenderTexture> TextureManager::createMultiRenderTexture(const MULTI_RENDER_TEXTURE_DESC& desc) { SPtr<MultiRenderTexture> newRT = createMultiRenderTextureImpl(desc); newRT->_setThisPtr(newRT); newRT->initialize(); return newRT; }
SPtr<Texture> TextureManager::_createEmpty() { Texture* tex = new (bs_alloc<Texture>()) Texture(); SPtr<Texture> texture = bs_core_ptr<Texture>(tex); texture->_setThisPtr(texture); return texture; }
SPtr<GUISkin> GUISkin::_createPtr() { SPtr<GUISkin> newSkin = bs_core_ptr<GUISkin>(new (bs_alloc<GUISkin>()) GUISkin()); newSkin->_setThisPtr(newSkin); newSkin->initialize(); return newSkin; }
SPtr<Material> MaterialManager::create(const HShader& shader) const { SPtr<Material> newMat = bs_core_ptr<Material>(new (bs_alloc<Material>()) Material(shader)); newMat->_setThisPtr(newMat); newMat->initialize(); return newMat; }
SPtr<Font> Font::_createPtr(const Vector<SPtr<FontBitmap>>& fontData) { SPtr<Font> newFont = bs_core_ptr<Font>(new (bs_alloc<Font>()) Font()); newFont->_setThisPtr(newFont); newFont->initialize(fontData); return newFont; }
SPtr<Light> Light::createEmpty() { Light* handler = new (bs_alloc<Light>()) Light(); SPtr<Light> handlerPtr = bs_core_ptr<Light>(handler); handlerPtr->_setThisPtr(handlerPtr); return handlerPtr; }
SPtr<GpuProgram> GpuProgramManager::createEmpty(const String& language, GpuProgramType type) { GpuProgram* program = new (bs_alloc<GpuProgram>()) GpuProgram("", "", language, GPT_VERTEX_PROGRAM, GPP_VS_1_1, false); SPtr<GpuProgram> ret = bs_core_ptr<GpuProgram>(program); ret->_setThisPtr(ret); return ret; }
SPtr<GpuBuffer> HardwareBufferManager::createGpuBuffer(const GPU_BUFFER_DESC& desc) { SPtr<GpuBuffer> gbuf = bs_core_ptr<GpuBuffer>(new (bs_alloc<GpuBuffer>()) GpuBuffer(desc)); gbuf->_setThisPtr(gbuf); gbuf->initialize(); return gbuf; }
SPtr<GpuProgramCore> create(const String& source, const String& entryPoint, GpuProgramType gptype, GpuProgramProfile profile, bool requiresAdjacencyInformation) override { SPtr<NullProgramCore> ret = bs_shared_ptr_new<NullProgramCore>(); ret->_setThisPtr(ret); return ret; }
SPtr<IndexBuffer> HardwareBufferManager::createIndexBuffer(const INDEX_BUFFER_DESC& desc) { SPtr<IndexBuffer> ibuf = bs_core_ptr<IndexBuffer>(new (bs_alloc<IndexBuffer>()) IndexBuffer(desc)); ibuf->_setThisPtr(ibuf); ibuf->initialize(); return ibuf; }
SPtr<AudioClip> AudioClip::_createPtr(const SPtr<DataStream>& samples, UINT32 streamSize, UINT32 numSamples, const AUDIO_CLIP_DESC& desc) { SPtr<AudioClip> newClip = gAudio().createClip(samples, streamSize, numSamples, desc); newClip->_setThisPtr(newClip); newClip->initialize(); return newClip; }
SPtr<ManagedResource> ManagedResource::createEmpty() { SPtr<ManagedResource> newRes = bs_core_ptr<ManagedResource>(new (bs_alloc<ManagedResource>()) ManagedResource()); newRes->_setThisPtr(newRes); newRes->initialize(); return newRes; }
SPtr<TechniqueCore> TechniqueCore::create(const StringID& renderAPI, const StringID& renderer, const Vector<SPtr<PassCore>>& passes) { TechniqueCore* technique = new (bs_alloc<TechniqueCore>()) TechniqueCore(renderAPI, renderer, passes); SPtr<TechniqueCore> techniquePtr = bs_shared_ptr<TechniqueCore>(technique); techniquePtr->_setThisPtr(techniquePtr); techniquePtr->initialize(); return techniquePtr; }
SPtr<CoreObjectCore> Light::createCore() const { LightCore* handler = new (bs_alloc<LightCore>()) LightCore(mType, mColor, mIntensity, mRange, mCastsShadows, mSpotAngle, mSpotFalloffAngle); SPtr<LightCore> handlerPtr = bs_shared_ptr<LightCore>(handler); handlerPtr->_setThisPtr(handlerPtr); return handlerPtr; }
SPtr<SamplerState> VulkanRenderStateManager::createSamplerStateInternal(const SAMPLER_STATE_DESC& desc, GpuDeviceFlags deviceMask) const { SPtr<VulkanSamplerState> samplerState = bs_shared_ptr<VulkanSamplerState>(new (bs_alloc<VulkanSamplerState>()) VulkanSamplerState(desc, deviceMask)); samplerState->_setThisPtr(samplerState); return samplerState; }
SPtr<GpuParams> HardwareBufferManager::createGpuParamsInternal( const SPtr<GpuPipelineParamInfo>& paramInfo, GpuDeviceFlags deviceMask) { GpuParams* params = new (bs_alloc<GpuParams>()) GpuParams(paramInfo, deviceMask); SPtr<GpuParams> paramsPtr = bs_shared_ptr<GpuParams>(params); paramsPtr->_setThisPtr(paramsPtr); return paramsPtr; }
SPtr<AnimationClip> AnimationClip::createEmpty() { AnimationClip* rawPtr = new (bs_alloc<AnimationClip>()) AnimationClip(); SPtr<AnimationClip> newClip = bs_core_ptr<AnimationClip>(rawPtr); newClip->_setThisPtr(newClip); return newClip; }
SPtr<GpuParams> HardwareBufferManager::createGpuParams(const SPtr<GpuPipelineParamInfo>& paramInfo) { GpuParams* params = new (bs_alloc<GpuParams>()) GpuParams(paramInfo); SPtr<GpuParams> paramsPtr = bs_core_ptr<GpuParams>(params); paramsPtr->_setThisPtr(paramsPtr); paramsPtr->initialize(); return paramsPtr; }
SPtr<AudioClip> AudioClip::createEmpty() { AUDIO_CLIP_DESC desc; SPtr<AudioClip> newClip = gAudio().createClip(nullptr, 0, 0, desc); newClip->_setThisPtr(newClip); return newClip; }
SPtr<ScriptCode> ScriptCode::_createPtr(const WString& data, bool editorScript) { SPtr<ScriptCode> scriptCodePtr = bs_core_ptr<ScriptCode>( new (bs_alloc<ScriptCode>()) ScriptCode(data, editorScript)); scriptCodePtr->_setThisPtr(scriptCodePtr); scriptCodePtr->initialize(); return scriptCodePtr; }
SPtr<GpuProgramCore> GLSLProgramFactory::create(GpuProgramType type) { GLSLGpuProgramCore* prog = new (bs_alloc<GLSLGpuProgramCore>()) GLSLGpuProgramCore("", "", type, GPP_NONE, false); SPtr<GLSLGpuProgramCore> gpuProg = bs_shared_ptr<GLSLGpuProgramCore>(prog); gpuProg->_setThisPtr(gpuProg); return gpuProg; }
SPtr<ShaderInclude> ShaderInclude::_createPtr(const String& includeString) { SPtr<ShaderInclude> shaderIncludePtr = bs_core_ptr<ShaderInclude>( new (bs_alloc<ShaderInclude>()) ShaderInclude(includeString)); shaderIncludePtr->_setThisPtr(shaderIncludePtr); shaderIncludePtr->initialize(); return shaderIncludePtr; }
SPtr<SpriteTexture> SpriteTexture::createEmpty() { SPtr<SpriteTexture> texturePtr = bs_core_ptr<SpriteTexture> (new (bs_alloc<SpriteTexture>()) SpriteTexture(Vector2(0.0f, 0.0f), Vector2(1.0f, 1.0f), HTexture())); texturePtr->_setThisPtr(texturePtr); texturePtr->initialize(); return texturePtr; }