I'm making a 3d engine on top of SFML so I have to basically remake SFML/Graphic in 3D.
This takes for the most part a lot of copy pasting of original SFML code and making some little changes to it.
I've made a RenderTexture3 (3 for 3D
![Tongue :P](https://www.sfml-dev.org/forums/Smileys/default/tongue.gif)
) class and everything compiles just right but I get some linker error on the Texture implementations that are in sf::priv namespace:
error LNK2019: unresolved external symbol "public: __thiscall
sf::priv::RenderTextureImplFBO::RenderTextureImplFBO(void)" (??
0RenderTextureImplFBO@priv@sf@@QAE@XZ) referenced in function "public: bool __thiscall
RenderTexture3::create(unsigned int,unsigned int,bool)" (?create@RenderTexture3@@QAE_NII_N@Z)
error LNK2019: unresolved external symbol "public: static bool __cdecl
sf::priv::RenderTextureImplFBO::isAvailable(void)" (?isAvailable@RenderTextureImplFBO@priv@sf@@SA_NXZ)
referenced in function "public: bool __thiscall RenderTexture3::create(unsigned int,unsigned int,bool)" (?
create@RenderTexture3@@QAE_NII_N@Z)
error LNK2019: unresolved external symbol "public: __thiscall
sf::priv::RenderTextureImplDefault::RenderTextureImplDefault(void)" (??
0RenderTextureImplDefault@priv@sf@@QAE@XZ) referenced in function "public: bool __thiscall
RenderTexture3::create(unsigned int,unsigned int,bool)" (?create@RenderTexture3@@QAE_NII_N@Z)
And the responsible code part (basically the same as in sf::RenderTexture)
// Create the implementation
delete impl_;
if (sf::priv::RenderTextureImplFBO::isAvailable())
{
// Use frame-buffer object (FBO)
impl_ = new sf::priv::RenderTextureImplFBO();
}
else
{
// Use default implementation
impl_ = new sf::priv::RenderTextureImplDefault();
}
// Initialize the render texture
if (!impl_->create(width, height, tex_.m_texture, depthBuffer))
return false;
I've asked Laurent quite long ago about a similar problem with glcheck.
He told me to make a new class for that and I did.
This time I don't want to make a new class, mostly because I will have to recreate a whole group of classes and update them myself later, which goes against my goal of basing my engine on SFML and only updating the relevant parts.
I hope someone here can help me
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)