Sign in to follow this  

Draw Primitive Issue

This topic is 2549 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

Hey guys!
Shouldn't I be able to see a triangle on the screen?

This piece of code is a test project, so I have no framework.
(classes/ custom library )

It compiles fine, but I don't see a triangle on the screen.

I posted it @ Codepad:
http://codepad.org/fqmvIP6S

Thanks in advance!

Share this post


Link to post
Share on other sites
Getting the first triangle on the screen is often the hardest part :P

It could be back face culling... although i don't see where you set up your projection matrix?

What i would seriously recomend is grabbing some code such as the code at this place:

http://www.drunkenhyena.com/cgi-bin/dx9.pl

that has a working example of rendering a tutorial to the screen in directx, then i would start working from there.

Seriously getting the first triangle on screen can really be a pain :P

Share this post


Link to post
Share on other sites
Hey everyone! Thank you very much for the replies.
Curiously, all of you were right! lol
It was the backface culling, the lightning and the projection matrix
Also, I made a very stupid mistake, that was really compromising the whole exercise.
I was calling EndScene(); AFTER Present( NULL, NULL, NULL, NULL);
I suddenly noticed that the DX was not clearing the screen (tried changing the color) and I was really confused, as I thought it was something with the init stuff.
Now I see the triangle!
Thank you all again!!!

Share this post


Link to post
Share on other sites

This topic is 2549 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this