bytes long and short

This is a discussion on bytes long and short within the Game Programming forums, part of the General Programming Boards category; Hi; i am fooling around with a filling style of a polygon in opengl. and have created a mask(namemask) that ...

  1. #1
    Registered User SAMSAM's Avatar
    Join Date
    Nov 2001
    Posts
    218

    bytes long and short

    Hi;

    i am fooling around with a filling style of a polygon in opengl.
    and have created a mask(namemask) that will fill the polygon
    with the name "sia" .can someone explain to me as why
    in stippling pattern(for lines), we use a DWORD(0xEB32)

    and in mask we use example(0xFF) WORD unsigned short .
    is there a reason?

    am i right about the definitions on these two(DWORD & WORD)?

    Code:
     GLushort lineStipple = 0xEB32;
      glLineStipple(3, lineStipple);
    
     
     
      GLubyte namemask[] = {
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0xF1, 0x9F, 0xE0,
        0x0, 0x91, 0x90, 0x20,
        0x0, 0x11, 0x88, 0x20,
        0x0, 0x11, 0x88, 0x20,
        0x0, 0x11, 0x88, 0x40,
        0x0, 0x21, 0x8F, 0xC0,
        0x0, 0x41, 0x87, 0xC0,
        0x0, 0x81, 0x84, 0x80,
        0x02, 0x01, 0x84, 0x80,
        0x02, 0x01, 0x84, 0x80,
        0x01, 0x0, 0x82, 0x80,
        
        0x0, 0x81, 0x83, 0x0,
        0x0, 0x41, 0x83, 0x0,
        0x0, 0x39, 0x83, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0,
        0x0, 0x0, 0x0, 0x0
        
      };
    Last edited by SAMSAM; 03-08-2003 at 08:54 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Accessing Structures Inside Structures
    By Mellowz in forum C Programming
    Replies: 1
    Last Post: 01-13-2008, 02:55 AM
  2. Replies: 16
    Last Post: 11-23-2007, 12:48 PM
  3. malloc problem in SUN in 64-bit compilation
    By ylzhang in forum C Programming
    Replies: 6
    Last Post: 05-31-2003, 11:48 AM
  4. need help
    By emperor in forum C Programming
    Replies: 1
    Last Post: 03-04-2002, 11:26 AM
  5. can someone check this out and let me know ?
    By javaz in forum C Programming
    Replies: 5
    Last Post: 01-21-2002, 01:13 PM

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