Results 1 to 8 of 8

Thread: glDrawPixels ??

  1. #1

    glDrawPixels ??

    Anyone knows how to print an bitmap with glDrawPixels, have the pixeldata in an pointer, saved as RGB and the size width*height*3.

    Please give me an example
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  2. #2

    glDrawPixels ??

    Hi Andreas,
    Coiuld you please explain exactly what you are trying to achieve with glDrawPixels?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #3

    glDrawPixels ??

    What i had in mind was drawing a 2d bitmap to the rendering context, without having to bindtexture etc.


    /Andreas
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  4. #4

    glDrawPixels ??

    glDrawPixels(width, height, GL_RGB, GL_UNSIGNED_BYTE, *array)

    The last one is the pointer to array, previous - the data type in the array
    The position is defined by the glRasterPos() function
    http://www.kaldata.net

  5. #5

    Re: glDrawPixels ??

    its so hard for me to learn OpenGL headers ... Its not so easy as DelphiX
    code your Idea

  6. #6

    Re: glDrawPixels ??

    glDrawPixels should be much much slower in drawing than normal texture.

  7. #7

    Re: glDrawPixels ??

    Wow, digging up 9 year old threads are we? However, you cant compare OpenGL to DelphiX its like comparing apples to oranges. OpenGL and D3D (wich DelphiX uses internally) is quite similar in practice.

    OpenGL (atleast before version 3.1 with intermediate mode) is generally considered more beginner friendly through.
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  8. #8

    Re: glDrawPixels ??

    OpenGL is not OOP Structured unlike DelpHiX but this is exciting
    code your Idea

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •