It's my mistake.some reason i must maintain my own project build.
I use the RenderSystems\GLSupport\src\win32 for build the GLSupport static lib.and use it for win RenderSystems\GLES2.
because the api:
Code: Select all
// RenderSystems\GLSupport\src\EGL\WIN32\OgreWin32EGLSupport.cpp
// this is special for GLES2,can not work at GL and GL3+
GLNativeSupport* getGLSupport(int profile)
{
return new Win32EGLSupport(profile);
}
// RenderSystems\GLSupport\src\win32\OgreWin32GLSupport.cpp
// this is special for GL and GL3+.can not work at GLES2.
GLNativeSupport* getGLSupport(int profile)
{
return new Win32GLSupport(profile);
}
so the error version it's "4.4.0 - Build 21.20.16.4541".it's come from the error Win32GLSupport context.
the seccond error at:
Code: Select all
void GLES2RenderSystem::initialiseContext(RenderWindow* primary)
......
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
// EAGL2Support redirects to glesw for get_proc. Overwriting it there would create an infinite loop.
if (glGetError == NULL && gleswInit())
#elif OGRE_PLATFORM == OGRE_PLATFORM_WIN32
if (glGetError == NULL && gleswInit())
#else
if (gleswInit2(get_proc))
#endif
{
OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR,
"Could not initialize glesw",
"GLES2RenderSystem::initialiseContext");
}
At windows the gleswInit2(get_proc) not work.it's might PowerVR\GraphicsSDK\SDK_3.3 sdk reason.
I think at windows use PowerVR,LoadLibraryA("libGLESv2.dll"); is need.
The third:
Components\RTShaderSystem\src\OgreShaderGLSLESProgramWriter.cpp(150)
Code: Select all
void GLSLESProgramWriter::discoverFunctionDependencies(const FunctionInvocation &invoc, FunctionVector &depVector)
{
// Uses recursion to find any functions that the supplied function invocation depends on
FunctionMap::const_iterator itCache = mFunctionCacheMap.begin();
String body;
// Find the function in the cache and retrieve the body
for (; itCache != mFunctionCacheMap.end(); ++itCache)
{
if(!(invoc == (*itCache).first))
continue;
body = (*itCache).second;
break;
}
if(!body.empty())
{
// Trim whitespace
StringUtil::trim(body);
StringVector tokens = StringUtil::split(body, "(");
for (StringVector::const_iterator it = tokens.begin(); it != tokens.end(); ++it)
{
StringVector moreTokens = StringUtil::split(*it, " \n");
if (!moreTokens.empty())
{
FunctionMap::const_iterator itFuncCache = mFunctionCacheMap.begin();
for (; itFuncCache != mFunctionCacheMap.end(); ++itFuncCache)
{
const FunctionInvocation& fi = itFuncCache->first;
if(fi.getFunctionName() == moreTokens.back())
{
// Add the function declaration
depVector.push_back(FunctionInvocation((*itFuncCache).first));
discoverFunctionDependencies(itFuncCache->first, depVector);
}
}
}
}
}
else
{
LogManager::getSingleton().logMessage("ERROR: Cached function not found " + invoc.getFunctionName());
}
}
Code: Select all
FunctionInvocation fi = itFuncCache->first;// original version.
const FunctionInvocation& fi = itFuncCache->first;// my version.
here will case copy at my MSVC performance analysis.