Results 1 to 3 of 3

Thread: TEXTURE

  1. #1
    Guest

    TEXTURE

    where is the misitake ?
    Uses tex,wingraph,crt,gl,glu,glut;
    const poly1=1;
    var poly:array[1..100]of GLuint;
    img:texture;
    Procedure Init;
    Begin
    SetOpenGlMode(DirectOn);

    TexLoad('mop.tex',img);
    getmem(TBuf,mx*my*3);
    tBuf:=@img;

    GLClearColor(0,0,0,0);
    GLClear (GL_Color_Buffer_bit OR gl_dEPTH_buffer_bit);
    glOrtho(0.0,1.0,0.0,1.0,-1.0,1.0);

    end;
    Procedure Draw;
    Begin
    {poly[1]:=1;}
    GLNewList(poly1,GL_Compile);
    GLBegin(GL_POLYGON);
    GLColor4f(1.0,1.0,1.0,1.0);
    GLVertex3f(0.25,0.25,0.0);
    GLVertex3f(0.75,0.25,0.0);
    GLVertex3f(0.75,0.75,0.0);
    GLVertex3f(0.25,0.75,0.0);
    GLEnd();
    GLEndList;
    GLFlush();
    end;
    Begin
    InitGraph(d8bit,m640x480,'TEXTURE TEST 1');
    init;
    draw;
    GLCallList(Poly1);
    updategraph(updatenow);
    if REadkey=#27 then
    Begin
    halt;
    closegraph;
    end;
    end.

  2. #2
    Guest

    Re: TEXTURE

    here you can find a screenshot of the result : http://www.testimg.20m.com

  3. #3
    Guest

    Re: TEXTURE

    by the way img it's an [0..256,0..256,0..2]array
    is it correct ?
    any help would be very appreciated !

Similar Threads

  1. Replies: 1
    Last Post: 12-26-2014, 04:57 PM
  2. Replies: 1
    Last Post: 03-10-2014, 12:51 PM
  3. Replies: 2
    Last Post: 09-27-2004, 05:25 PM

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