Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


DX3D Sur-Faces VS Tex-Tures, oh my! ;)

This topic is 5960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi People! I''m trying here to copy a texture(DX3D) in a lot of Textures(For animation..). Ok. I have here first: - CreateTextureFromFile (logical isn''t?) then... CreateTexture and I made a void texture. Ok then a bird( ) said to me I should take the CopyRects-command. ... ok ... I took it... And then... In the copyrects command you can''t(till I can see) use Textures to copy, you should give him surfaces... ????????? I mean... What????? Should I convert all my textures in surfaces and then copy and then convert it again in textures????? Is there an other command? Or what should I do. I mean...I have here the commandlists before me and here it says, that there is a surfacefromfile command. But not a convert texture to surface or surface to texture command... Please help!!! (i can remember on surfaces in DD This should be something different, not?) Thanks to all! Greets: C.Ruiz (I had today an english-test: horrible like you can see... )

Share this post

Link to post
Share on other sites
Hey! Thanks for this post!
Ok now I have converted it and then "copyreccted" it!
But... Now I should convert it in texture again.
And... that's the same problem like before...
means... I did'nt found any commands to convert...
What's the command to convert it again from surface to texture now?
Tnx to all and to Jack!

Greets: C.Ruiz

[edited by - cruiz on March 19, 2002 4:41:31 AM]

Share this post

Link to post
Share on other sites
Please help!
Do you know witch command I should take to
convert it now from surface to texture?
This would be the last step!
Tnx to all: C.Ruiz

Share this post

Link to post
Share on other sites
you don't convert surfaces to texture. The texture instead contains surfaces.

Call GetSurfaceLevel(whatever) to get access to one of them, and then just release the surface when you're done with it. If you did something to the surface you've already updated the texture.

[edited by - sorrow on March 19, 2002 8:34:50 AM]

Share this post

Link to post
Share on other sites
oh.. and dude... lay off on the 6 question marks in sequence :o Makes it sound like you''ve gone thru 5 pots of coffee.

Share this post

Link to post
Share on other sites
It doesn''t work but I don''t understand it either!
CreateTextureFromFile Tex1
CreateTexture Tex2(void) <-(could be probably wrong defintion)

And then??????
Tex1->GetSurface Level( 0, Surface1)

Copyrect( surface1 to surface2

And then????!!!!????

Get surface Level(0, Surface2)
Can anyone explain this? Plz!
Tnx for posts but I''m still frustrated....


P.S.: Coffee is my best friend!
P.P.S.: I try to make my text "living".
The question marks should take the reader to a long journey of you know... What a ***?????? What am I writing here??????

Share this post

Link to post
Share on other sites
I think what he is saying is, release your Surface1 pointer after you did you copy rect. Then go about your biz as usual.
Your texture buffers should be ready to party now.

Oh....and &%!@~!!!!!

Share this post

Link to post
Share on other sites
Hmm this is how I do it (note: from memory and no real commands

CreateTexture("somefile", blabla);





Hope this helps, oh and by the way D3D won''t convert between formats so make sure your dest texture is in the correct format...

Regards Shadows

Share this post

Link to post
Share on other sites
Hi again!
Ok I did it. I believe.
Ok... I know I''m new in DX3D.
But it doesn''t work properly. Yeah....
I would have problems explaining it. I copy it
and then he paints only a part of it. In the rest surface of the brush(sorry for this english) it paints some crazy lines. Like an error. How... tv or I don''t know when it gives problems.
I hope you can Imagine.
Ok I think following:
I loaded the texture well. Because I can see one part ok. (i mean correct bits etc...)
There are 3 numbers.
I mean first there is the size of the vertices.
For example 7.0f and 1.0f. I I change this it changes the size of the entire texture-"field". This should not be the problem.
Then there is the size of CreateTexture.... should be the size of pixels not? (shoudl be! How I think...)
And then there is the size of the copied RECT. I mean his should be ok because I can change it and it works ok... (yes... without the rest...)

What does this crazy lines on the texture-"Field"????????
Sorry people! Raelly!!! Probably It''s a newbie problem.
Probably It''s a big shame this problem.
Hope not but... I know...

Yes I''m tired.... and my coffee-can is void!!!!!!!!!
I need coffee!!!!!!!!

Greets to all out there: C.Ruiz

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!