Alternatives to D3DTextr_CreateTextureFromFile()

Started by
14 comments, last by Esap1 24 years, 1 month ago
Im using a Directional Light, And I am using a CD3D .x file, and that shows up, and look fine, but I just dont know why my triangle isnt shaded or textured or anything, just black!
Advertisement
I have tried every way possible to draw this god damned triangle with a friken TEXTURE, CRAP, ITS STILL FRIKEN BLACK!!!!!!!!!!!!!!!!!!!!!!!, does any one know why this would happen, I have that dolphin.x model in there and using that CD3D class, I loaded it and used its own rendering function and it textures it fine, but Im using DrawPrimitive and SetTexture, and It DOESNT WORK,
HHHHHHHEEEEELLLLLLLPPPPPPPP!!!!!!!!!!!!!!!1
Is the program big? If it isn''t you can send it to me (with bitmap files) and I''ll take a look at it. I cannot promise you that I will find the error though.

aj76@hem.passagen.se
I just uploaded it 2 my site, easier, its here:
http://esap1.tripod.com/myprogram.zip

Thanks for the Help.
(and ignore the background music)
Just took a short look at the code. Here''s what I found so far:


In World_class::RunWorld() you set the wrong texture, you must use the one loaded with D3DX. (I assume you forgot that you had commented out this line. Don''t worry it''s a common mistake )

If you disables lighting in App::InitRenderer() with m_pD3DDev->SetRenderState( D3DRENDERSTATE_LIGHTING, FALSE ) your texture is showing up on the triangle. So we know that the texture loading worked as intended

Unfortunately I couldn''t get the lighting to work during the short time I spend with the code. But you should specify the material for the triangle with SetMaterial()
THANK YOU SOOOOOO MUCH, IM SO STUPID, I had a material setup, as u saw that comment //Set up a Material, but I took it out, thanks SOOO much!!!

This topic is closed to new replies.

Advertisement