Results 1 to 3 of 3

Thread: background ?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Årsunda,gästrikland,Sweden
    Posts
    113

    background ?

    is there any simple way to draw a picture(.jpg .tga or something) as background ?

  2. #2
    Senior Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    764

    Re: background ?

    1) Read it using some apropriate function (e.g. libjpeg for jpg files).
    2) Upload it as a texture
    3) Instead of clearing the color buffer, draw a quad with the texture which covers the entire viewport

    This method is insensitive to screen/window resolution since the texture will be sceled to fit the viewport (use GL_LINEAR filtering).

    /Marcus

  3. #3
    Senior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Årsunda,gästrikland,Sweden
    Posts
    113

    Re: background ?

    I´ll try that.
    Thanks

Similar Threads

  1. Replies: 3
    Last Post: 04-24-2014, 12:36 PM
  2. fix background
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-03-2002, 09:26 AM
  3. Background
    By Platinum in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-23-2001, 04:45 AM
  4. BackGround
    By Gelero in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-17-2001, 09:15 AM
  5. Background...
    By CyBBe in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-15-2000, 07:23 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