XNA Game Development Forums
2012/05/21 19:10:41 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: tutorial 4 problem  (Read 2499 times)
precious roy
Newbie
*
Offline Offline

Posts: 36


View Profile
« on: 2007/04/29 08:04:06 »

i got it working a bit i dont get any errors but i just dont see any thing

has eny one had that problem befor Huh
« Last Edit: 2007/05/14 12:24:37 by precious roy » Logged
Shamun
Newbie
*
Offline Offline

Posts: 12


View Profile
« Reply #1 on: 2007/06/14 01:55:10 »

I have this problem too, please tell us what to do...
Logged
Jasper Flick
Guest
« Reply #2 on: 2007/06/14 06:31:40 »

If I'm correct it has to do with the draw direction of the triangle. Clockwise vertices is the front side, counter-clockwise vertices is the back side. I guess by default Direct3D only shows the front side (which is the best performance option).

The first triangle in tutorial 4 is drawn with the back side towards you, so you won't see it. To fix this, change the vertex order. The easiest solution is to switch the last two of the three vertices in your demo class:

replace this
Code:
        verts[0] = new CustomVertex.PositionColored(new Vector3(0, 1, 1), Color.Red.ToArgb());
        verts[1] = new CustomVertex.PositionColored(new Vector3(-1, -1, 1), Color.Green.ToArgb());
        verts[2] = new CustomVertex.PositionColored(new Vector3(1, -1, 1), Color.Blue.ToArgb());

with this
Code:
        verts[0] = new CustomVertex.PositionColored(new Vector3(0, 1, 1), Color.Red.ToArgb());
        verts[1] = new CustomVertex.PositionColored(new Vector3(1, -1, 1), Color.Blue.ToArgb());
        verts[2] = new CustomVertex.PositionColored(new Vector3(-1, -1, 1), Color.Green.ToArgb());

This fixed it for me.
Logged
mikeschuld
Administrator
Sr. Member
*****
Offline Offline

Posts: 389


View Profile WWW
« Reply #3 on: 2007/08/03 12:24:26 »

edited in the tutorial source, thanks for the catches Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
3d Engine-- Tutorial 2 problem. Hazy Mind 3D Engine ZebraHDH 4 2203 Last post 2006/12/03 14:20:43
by tuxdalinux
Got a problem with an .x file Hazy Mind XNA Engine bobbie_dache 8 2784 Last post 2007/01/16 12:26:30
by bobbie_dache
Screen Flickering problem... Hazy Mind XNA Engine simpson.jon 4 1701 Last post 2007/02/25 17:09:05
by simpson.jon
Strange Problem ( Advice/Assistance Needed Please :-) ) General Discussion DaphydTheBard 4 1778 Last post 2007/03/17 10:23:52
by DaphydTheBard
Animations! But one problem... Hazy Mind XNA Engine EclipsE 2 1415 Last post 2007/04/12 02:42:27
by EclipsE
Minimize problem - app crash Hazy Mind XNA Engine nicknz 4 2242 Last post 2007/08/02 04:32:10
by Suzume
usercontrols over gamewindow and keyboard problem General Discussion XNASorcerer 2 1464 Last post 2007/05/09 00:52:09
by Chr0n1x
Interface problem. Help!! General Discussion XNASorcerer 5 2111 Last post 2007/05/09 09:46:36
by CarlosFreitas
ObjectManagers problem Hazy Mind XNA Engine Jonotron 1 1340 Last post 2007/08/03 12:29:19
by mikeschuld
Spaceship orientation problem Hazy Mind XNA Engine murga 3 1619 Last post 2007/07/18 07:00:15
by Nemo Krad
Camera problem Hazy Mind XNA Engine Montynis 2 1685 Last post 2007/08/02 09:54:14
by Montynis
Tutorial 13 :: Custom Content Types, Using the Content Pipeline Tutorial Discussion mikeschuld 5 2727 Last post 2007/08/03 09:07:00
by mikeschuld
Problem with the pick Hazy Mind 3D Engine Zandman26 0 1422 Last post 2007/08/06 15:04:06
by Zandman26
Animation Problem.. Hazy Mind XNA Engine DoomMarine 10 3540 Last post 2008/04/25 19:32:58
by DoomMarine
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.33 seconds with 18 queries.