gotta love those jaggies....*cough*

This is a discussion on gotta love those jaggies....*cough* within the Game Programming forums, part of the General Programming Boards category; ok, i hate Z-FIGHTING, lmao, now, for some reason....i've noticed something in my redraw code, i was setting up the ...

  1. #1
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903

    gotta love Z-FIGHTING....*cough*

    ok, i hate Z-FIGHTING, lmao, now, for some reason....i've noticed something

    in my redraw code, i was setting up the view like so:

    Code:
    gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,300.0f);
    and that was giving me a hubbada lot of Z-FIGHTING when i got too far from something....

    then, i changed the code to this:

    Code:
    gluPerspective(90.0f,(GLfloat)width/(GLfloat)height,0.1f,300.0f);
    and now it miraculasly.....wow, horrible mis-spelling....got rid of all the Z-FIGHTING!!!

    but, the thing is, now, whenever anything nears the edge of the screen, it looks like it's the Voyager going to warp 9, and it stretches out.......

    so, is there ANY way to get rid of those Z-FIGHTING, and not have to have distorted edges of the screen?
    Last edited by jverkoey; 03-26-2003 at 05:16 PM.

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    >ok, i hate jaggies, lmao, now, for some reason....i've noticed something

    its called aliasing.

    >and now it miraculasly.....wow, horrible mis-spelling....got rid of all the jaggies!!!

    but, the thing is, now, whenever anything nears the edge of the screen, it looks like it's the Voyager going to warp 9, and it stretches out.......
    <

    because all that accomplished was distorting your view.

    >so, is there ANY way to get rid of those jaggies, and not have to have distorted edges of the screen?

    Anti-Aliasing.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    ahhhh, took a second to realize what 'jaggies' were.....

    a little off topic but ....

    >Game developing ROCKS!

    what are 'game developing rocks' used for? ive never seen rocks do such things....

  4. #4
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    Originally posted by Perspective
    what are 'game developing rocks' used for? ive never seen rocks do such things....

    lmao


    anyways, arg, i'm sorry, i said the wrong thing. *smacks head*

    i didn't mean jaggies

    i meant Z-FIGHTING....

    sorry, maybe that'll make a bit more sense.....

  5. #5
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    I had the same problem. I changed my depth buffer from 16 to 32 bits.

    Code:
    	static	PIXELFORMATDESCRIPTOR pfd=				// pfd Tells Windows How We Want Things To Be
    	{
    		sizeof(PIXELFORMATDESCRIPTOR),	// Size Of This Pixel Format Descriptor
    		1,							// Version Number
    		PFD_DRAW_TO_WINDOW |		// Format Must Support Window
    		PFD_SUPPORT_OPENGL |		// Format Must Support OpenGL
    		PFD_DOUBLEBUFFER,			// Must Support Double Buffering
    		PFD_TYPE_RGBA,				// Request An RGBA Format
    		bits,						// Select Our Color Depth
    		0, 0, 0, 0, 0, 0,			// Color Bits Ignored
    		0,							// No Alpha Buffer
    		0,							// Shift Bit Ignored
    		0,							// No Accumulation Buffer
    		0, 0, 0, 0,					// Accumulation Bits Ignored
    		32,							//Depth buffer
    		0,							// No Stencil Buffer
    		0,							// No Auxiliary Buffer
    		PFD_MAIN_PLANE,				// Main Drawing Layer
    		0,							// Reserved
    		0, 0, 0						// Layer Masks Ignored
    	};
    Last edited by Silvercord; 03-26-2003 at 06:28 PM.

  6. #6
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    tried it, didn't work...... i still see the z-fighting

  7. #7
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    that's really strange, it worked for me. how far are the objects causing jaggies.

    EDIT:
    I don't know if you noticed but I've been using your model jverkoey. I won't use it if I do an 'official' release or if i bring my game to the NYL forum, but I have included it with my project a couple of times (I mentioned that it's your model though) when posting it on this board
    Last edited by Silvercord; 03-26-2003 at 06:47 PM.

  8. #8
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    but, the thing is, now, whenever anything nears the edge of the screen, it looks like it's the Voyager going to warp 9, and it stretches out.......
    The reason for that is gluPerspective takes the field of view Y so therefore to have 90 degrees horizontal field of view you need 67.5

  9. #9
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Why'd you bring this thread back? Its over a month old!
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  10. #10
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    doesn't necessarily mean he knew that information already...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unconditional Love
    By jrahhali in forum A Brief History of Cprogramming.com
    Replies: 87
    Last Post: 05-17-2005, 01:18 AM
  2. Love - learned or inherent?
    By axon in forum A Brief History of Cprogramming.com
    Replies: 42
    Last Post: 01-24-2005, 11:09 AM
  3. gotta love my teacher
    By misplaced in forum C++ Programming
    Replies: 7
    Last Post: 10-21-2004, 01:09 AM
  4. gotta love linker errors
    By dantestwin in forum C++ Programming
    Replies: 3
    Last Post: 07-08-2004, 05:53 PM
  5. "if you love someone" :D
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-02-2003, 01:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21