Advertisement

Backgrounds in D3D....

Started by June 15, 2001 08:22 AM
4 comments, last by Lor 23 years, 7 months ago
Hey everybody! I am just starting out with direct 3D, and have made the obligatory "hello world" application of the 3D scene, a spinning cube...but now I want to put a starfield background behind it. I have the bitamp made etc...etc.... and I know how to do this using GDI, but putting bitmap backgrounds in Direct3D is a mystery, any help would be appreciated. Thanks for your time, kudos for helping out the little people. Lor.
This shouldn''t be too hard: Load the starfield bitmap to a texture, and then draw it with 4 transformed bitmaps across the screen.



- Goblineye Entertainment
The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction
Advertisement
Sorry for this newbie question, but what are transformed bitmaps and how would I draw them across the screen?
Just draw it like you do one side of the cube, making it large enough to take up the whole screen, and applying your bitmap texture to it. If you need, you can tell us what version of D3D you''re using and I''ll see if I can give you some code to help.



"We are the music makers, and we are the dreamers of the dreams."
- Willy Wonka
Oh, I get it now, so just draw a 2d square in the distance, really quite large, and apply the starfield texture to it. Thanks!

BTW: If anyone can answer this, I''d be well pleased; how does one go about drawing a sphere? I am using DirectX 8. Is there some sort of algorithm to generate all those coordinates in the right order? Thanks guys, and sorry once again for all the newbie questions.

Lor.
About transformed verices: A transformed vertex is a vertex that its coordinates are world coordinates, opposed to untrasnformed vertices where the coordinates are local.
So, it''s easier to use transformed vertices for drawing 2D stuff (Since you can set their position very easily).



- Goblineye Entertainment
The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction

This topic is closed to new replies.

Advertisement