pvr::Result::Enum initView() {
// …
myText = spriteEngine.createText(“some text”); // this is the line causing link error
myText ->setAnchor(pvr::ui::TopLeft, glm::vec2(-1, 0));
myText ->setPixelOffset(30, -20);
}[/scode]
when calling createText function the link errors described above are thrown - I’m not understanding why it wants to create another graphicsContext !?
as additional info I’m linking the project against following libs:
It looks like you may have multiple includes or cyclic references meaning that the symbol createGraphicsContext (in this case a function) gets declared more than once and therefore causes a linker error. Also you do not need to link against either libEGL.lib or libGLESv2.lib (although that should not cause a problem).
If you could post the includes here that may be helpful in diagnosing the root cause. You could also delete the framework libraries and rebuild them. (found here: C:\Imagination\PowerVR_Graphics\PowerVR_SDK\SDK_2016_R1.3\Framework\Bin\WindowsVC2010\)
thanks for suggestions - well, actually I already had the framework libs rebuilt when was working on this app.
Also I removed from the additional dependencies list libEGL.lib and libGLESv2.lib - and it threw 30 LNK2019 erros on gl function calls - but this is expectable, because I use openGL functions directly - not from gl:: namespace or in any other way.
I have got 3 header files with their sources and one main project file from where the application starts working.
[blockquote]shader.h
//…std includes #include <GLES3/gl3.h>
In order to use PVRUIRenderer you must include PVRShell/PVRShell.h, this is because the UI Renderer relies on functionality provided by PVRAPI. I would suggest taking a look at the Intro UI Renderer which can be found here: C:\Imagination\PowerVR_Graphics\PowerVR_SDK\SDK_2016_R1.3\Examples\Beginner\05_IntroUIRenderer