The normals are wrong on some of the polygons, especially the top one. I see you posted this problem in www.gamedev.net . I answered you in there as well.
192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
Posts
3,051
Re: Why does my cube look like this??
Originally Posted by Halsafar
Well I will review it in gamedev shortly but the problem is probably not what you think it was.
It was all in the order I was defining my VERTEX structure
D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 | D3DFVF_DIFFUSE
Cause's massive errors within texturing and lighting.
D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1
This works just fine.
That's very wierd that it works. The order of the OR operator parameters shouldn't make a difference...
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
It should explain that order is important in some case's.
When TextureCoords are involved they should always be last
Colors such a diffuse and specular should come after any normal.
The normal should be after position
Position should always be first
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
Infact, if anyone wants, here is an exe which will show the joy:
Esc - Quit
F1 - Switch from fullscreen to windowed
1,2,3 - Raise Attentuation 1,2,3
4,5,6 - Lower Attentuation 1,2,3
Arrow keys - Move light up, down, left, right
Comma - Move light Z-
Period - Move Light Z+
This is a multithreaded application, the gameloop is in one thread and the msg pump is in another.
It has reset functionality so you can alt+tab from fullscreen without a problem.
Post any remarks if you want
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
The only reason you can see it is cause of the lighting
But you can notice it trail off on the top properly in the back.
The light is position in front of the cube and above the cube, about 2 units away.
As for the rock, I just wanted something which was made of well varied varations of a few colors that remains noticeable under any light. To see how the lighting effects can look.
Run the exe I posted. There is no way it is harmful, I love this site, I do not want to get banned.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
Check out that extensive article.
While I believe I am bound to the EULA agreement, so I cannot distro the correct DLL to you.
I believe I am compiling with the APRIL update.
But I did copy the program and the dll to another computer, if the dll is placed into the same directory as the exe it will work.
THIS IS WHY I SAY NEVER USE D3DX!!!!!!!!!!!!!
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
Good question. They are the same people that are killing off VB and slowly trying to make VB.NET look like C#. Not to mention making all the latest programming languages require the .NET framework. Bastards
VB sucks if you ask me, forget about it.
If you do not like the big distro problem, use c++, it never has a distro problem....well till now... But your VB apps should encounter the same prob.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
Someone actually asked it. Finally.
Yet you still blindly follow...
.NET is not a bad idea. Especially when open-source minds come up with something as utterly delightful as mono. But, anyway.
VB on the other hand, IS a bad idea. But that's not the point either.
Anything that depends on arbitrary changes to get working is not production-ready, or ready in any sense at all. Get a refund and read up on something that won't be disowned in a couple of years: http://www.opengl.org/
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
(Just a heads-up)