Link Error: COpenGLTexture dynamic_cast

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
diegomazala
Posts: 14
Joined: Fri May 18, 2007 12:09 am
Contact:

Link Error: COpenGLTexture dynamic_cast

Post by diegomazala »

Hi guys
I am trying to use the RenderToTexture example to send the rendered texture through a SDI output boar. I already have the code to send Opengl textures done. It's working fine with Opengl applications. Now, I want integrate these codes. I need to set up my code with the Opengl id texture where the image is rendered.
I found the method

Code: Select all

GLuint COpenGLTexture::getOpenGLTextureName() const
So, using the RenderToTexture example I did:

Code: Select all

const irr::video::COpenGLTexture* lpTexture = dynamic_cast<const irr::video::COpenGLTexture*>(rt);
	if(lpTexture)
		std::cout << lpTexture->getOpenGLTextureName() << std::endl;
The problem is:

Code: Select all

1>main.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall irr::video::COpenGLTexture::getOpenGLTextureName(void)const " (?getOpenGLTextureName@COpenGLTexture@video@irr@@QBEIXZ) referenced in function _main
1>..\..\bin\Win32-VisualStudio\13.RenderToTexture.exe : fatal error LNK1120: 1 unresolved externals
I don't know what is happening.
Any help is welcome
Thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Internal methods are not exposed to the outside. You shouldn't even be able to include COpenGL.h
diegomazala
Posts: 14
Joined: Fri May 18, 2007 12:09 am
Contact:

Post by diegomazala »

How is the right way to do that? Imean, how could I get the Opengl id of a texture?

Thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I don't think that you're supposed to get that handle. At least not outside the OpenGL driver implementation.
I guess you have to tell us what you actually want to achieve. What does and SDI output boar(d?) do and why can't you just render the texture?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

@diegomazala
You can look in irrCg sources for it ;)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
diegomazala
Posts: 14
Joined: Fri May 18, 2007 12:09 am
Contact:

Post by diegomazala »

Hi Nadro
Thank you.
I saw your code and worked for me.
I don't know very well why it worked, but worked.

Thanks
Post Reply