Results 1 to 4 of 4

Thread: ? Z buffer misunderstanding ?

  1. #1
    Member Newbie
    Join Date
    Mar 2005
    Posts
    40

    ? Z buffer misunderstanding ?

    I'm confused. I have a texture that is 64x64 and one that is 512x512. When I draw both of them at the same z coordinate, they are the SAME size!?? Is that normal? Shouldn't my 512x512 be alot bigger than the 64x64?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: ? Z buffer misunderstanding ?

    no, just more detailed.
    Texture size has nothing to do with how much space it will take up on the screen since the texture coordinate system goes from 0 to 1.

  3. #3
    Member Newbie
    Join Date
    Mar 2005
    Posts
    40

    Re: ? Z buffer misunderstanding ?

    Let's say I have a enemy character that is supposed to be 2 times larger than my main character in a game, How would I proportionately show them according to their positions on the z axis?

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: ? Z buffer misunderstanding ?

    The size of an object is defined by the position of it's vertices (the glVertex* calls) and the transformations (modelview and projection matrix) at the time it is drawn.

    To make an object twice as big as another one, either use vertex positions twice as large, or apply a scaling transformation to one of the objects (glScalef(2, 2, 2) for the larger one, for example).
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

Similar Threads

  1. Alpha Misunderstanding?
    By disks86 in forum Vulkan
    Replies: 2
    Last Post: 01-28-2017, 01:19 PM
  2. A little misunderstanding on the wiki
    By imported_qnoper in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-29-2016, 10:47 AM
  3. I must be massively misunderstanding it!
    By Obli in forum OpenGL: GLSL
    Replies: 3
    Last Post: 06-19-2006, 01:01 PM
  4. misunderstanding transform
    By dovkruger in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-27-2004, 03:17 PM
  5. Misunderstanding last NV paper on VBO
    By Obli in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-25-2003, 12:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean