本文整理汇总了C++中VideoPtr::Message方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoPtr::Message方法的具体用法?C++ VideoPtr::Message怎么用?C++ VideoPtr::Message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VideoPtr
的用法示例。
在下文中一共展示了VideoPtr::Message方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
JNIEXPORT jstring JNICALL Java_net_asantee_gs2d_GS2DJNI_destroy(JNIEnv* env, jobject thiz)
{
application->Destroy();
video->Message(GS_L("Application resources destroyed"), GSMT_INFO);
g_globalVolume = audio->GetGlobalVolume();
return env->NewStringUTF(GS_L(""));
}
示例2: defined
ETHShaderManager::ETHShaderManager(VideoPtr video, const str_type::string& shaderPath, const bool richLighting) :
m_lastAM(Video::AM_PIXEL),
m_fakeEyeManager(new ETHFakeEyePositionManager),
m_richLighting(richLighting)
{
m_video = video;
Shader::SHADER_PROFILE sp = Shader::SP_MODEL_2;
#ifdef OPENGL
sp = Shader::SP_MODEL_1;
#endif
m_defaultVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::DefaultVS()).c_str(), Shader::SF_VERTEX, sp);
m_particle = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Particle_VS()).c_str(), Shader::SF_VERTEX, sp);
m_defaultStaticAmbientVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Ambient_VS_Hor()).c_str(), Shader::SF_VERTEX, sp);
m_verticalStaticAmbientVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Ambient_VS_Ver()).c_str(), Shader::SF_VERTEX, sp);
m_shadowVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Shadow_VS_Ver()).c_str(), Shader::SF_VERTEX, sp);
#if defined(GLES2) || defined(OPENGL)
m_projShadow = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("shadow.png")));
#else
m_projShadow = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("shadow.dds")));
#endif
m_opaqueSprite = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("default_nm.png")));
if (m_richLighting)
{
// Not yet implemented on GLES2
#if !defined(GLES2)
{ETHLightingProfilePtr profile(new ETHVertexLightDiffuse(m_video, shaderPath));
if (profile->IsSupportedByHardware())
{
m_lightingProfiles[VERTEX_LIGHTING_DIFFUSE] = profile;
}}
#endif
{ETHLightingProfilePtr profile(new ETHPixelLightDiffuseSpecular(m_video, shaderPath, m_fakeEyeManager));
if (profile->IsSupportedByHardware())
{
m_lightingProfiles[PIXEL_LIGHTING_DIFFUSE_SPECULAR] = profile;
}}
}
if (m_lightingProfiles.empty())
{
video->Message(GS_L("ETHShaderManager::ETHShaderManager: no lighting profile"), GSMT_WARNING);
}
else
{
m_currentProfile = FindHighestLightingProfile();
}
}
示例3: AssembleCommands
str_type::string AssembleCommands()
{
str_type::stringstream ss;
try
{
ss
<< boost::any_cast<str_type::string>(audio->GetAudioContext())
<< boost::any_cast<str_type::string>(video->GetGraphicContext());
return ss.str();
}
catch (const boost::bad_any_cast& e)
{
video->Message(GS_L("Invalid type for command assembling"), GSMT_ERROR);
return GS_L("");
}
}
示例4: profile
ETHShaderManager::ETHShaderManager(VideoPtr video, const str_type::string& shaderPath) :
m_lastAM(GSAM_PIXEL), m_fakeEyeManager(new ETHFakeEyePositionManager)
{
m_video = video;
m_defaultVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::DefaultVS()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
m_particle = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Particle_VS()).c_str(), GSSF_VERTEX, GSSP_MODEL_2, "particle");
m_defaultStaticAmbientVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Ambient_VS_Hor()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
m_verticalStaticAmbientVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Ambient_VS_Ver()).c_str(), GSSF_VERTEX, GSSP_MODEL_2, "vertical");
m_shadowVS = m_video->LoadShaderFromFile(ETHGlobal::GetDataResourceFullPath(shaderPath, ETHShaders::Shadow_VS_Ver()).c_str(), GSSF_VERTEX, GSSP_MODEL_2);
// TODO/TO-DO: use a wider macro here
#ifndef ANDROID
m_projShadow = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("shadow.dds")));
#else
m_projShadow = m_video->CreateSprite(ETHGlobal::GetDataResourceFullPath(shaderPath, GS_L("shadow.png")));
#endif
{
ETHLightingProfilePtr profile(new ETHVertexLightDiffuse(m_video, shaderPath));
if (profile->IsSupportedByHardware())
{
m_lightingProfiles[VERTEX_LIGHTING_DIFFUSE] = profile;
}
}
{
ETHLightingProfilePtr profile(new ETHPixelLightDiffuseSpecular(m_video, shaderPath, m_fakeEyeManager));
if (profile->IsSupportedByHardware())
{
m_lightingProfiles[PIXEL_LIGHTING_DIFFUSE_SPECULAR] = profile;
}
}
if (m_lightingProfiles.empty())
{
video->Message(GS_L("ETHShaderManager::ETHShaderManager: no lighting profile"), GSMT_WARNING);
}
else
{
m_currentProfile = FindHighestLightingProfile();
}
}