convert Texture to DIRECT3DSURFACE8

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

convert Texture to DIRECT3DSURFACE8

Post by Phunk »

Hello, I am trying to implement cubemapping in the engine, But to let irrlicht render into the faces, or to load an image into a face, I need to create a conversion between a DIRECT3DSURFACE8 and a ITexture(or an IImage) but I'm getting nowhere. Is there anyone who knows how? I think that when I have the face as Texture and vice versa, the rest would be fairly straightforward. I will post the code here when I am done(should be in less than 2 weeks for alpha :wink: release )
Luke923
Posts: 59
Joined: Wed Nov 05, 2003 5:26 am

Post by Luke923 »

I don't believe that there is a direct way to convert from ITexture to DIRECT3DSURFACE8, whether it be by datacasting or otherwise. Your best bet is to write a child class of ITexture that will convert elements of DIRECT3DSURFACE8 to ITexture. Either that, or you will have to go inside the engine yourself and tinker away.

Whatever you decide, though, I wish you luck.
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

hmm thats a bummer! I hoped that there would be an easy way, that I just did not know about. well thanks anyway!
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

*SOLVED*
Post Reply