Results 1 to 8 of 8

Thread: full screen intro image

  1. #1

    full screen intro image

    ok, i want to create an image in the game intro that occupate the whole window.
    What dimension should i do it, and how can i draw it?
    I want it to be shrinked when changing resolution (ie 800x600, 1024x76.
    Should i do a square image or a 4/3 image? Can video cards use non-squared images?

    Thanks
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  2. #2

    full screen intro image

    A textured quad in orthographic projection is all you need. There is a GL_ARB_texture_non_power_of_two extantion, but only the ultra new cards support it, so better just stick to power of two textures. Using a 4/3 image would look nicest as the image would get equally stretched in both directions.

  3. #3

    full screen intro image

    i have an idea of providing a functionallity in my textureloading library to load non_power_of_two textures by resizing the image automatically on load if GL_ARB_texture_non_power_of_two is not present
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  4. #4

    full screen intro image

    Here is how I do it (and how we do it at work on our console games).

    Create the image at the screen resolution that you want. Then resize the image to 256x256 or 512x512. Draw a single quad that fills the screen with this texture on it. Be sure to set bilinear filtering to enabled.

    Another way to do it (which some other console developers use), is to create the image at the desired screen resolution. Now cut the image into 256x256 or 512x512 sections. Use these textures on 256x256 or 512x512 quads drawn on the screen.

    Using either of these methods means that all your textures are power of two, resulting in maximum compatibility. That is, these methods work on every 3D card out there.

    I hope that makes sense.

  5. #5

    full screen intro image

    Quote Originally Posted by Sly
    Create the image at the screen resolution that you want. Then resize the image to 256x256 or 512x512. Draw a single quad that fills the screen with this texture on it. Be sure to set bilinear filtering to enabled.
    Thanks! i think i'll do this way.
    Btw, how and where do i set bilinear filtering ?
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  6. #6

    full screen intro image

    i do it this way:

    [pascal]
    glGenTextures(1, tmp);
    glBindTexture(GL_TEXTURE_2D, tmp);
    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
    if mode = bilinear then
    begin
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    if mipmap then
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_linear)
    else
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    end
    else
    begin
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_nearest);
    if mipmap then
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_nearest_MIPMAP_NEAREST)
    else
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_nearest);
    end;
    if mipmap then
    gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, pData)
    else
    lTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Width, Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pData);
    [/pascal]

    this is ofcourse a shortened down version without all the disturbing comments and commented code..
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  7. #7

    full screen intro image

    JSoftware youre bilinear is actually trilinear.
    Bilinear without mipmaps
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    Bilinear with mipmaps
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
    Trilinear
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);

  8. #8

    full screen intro image

    no not if mipmap is false and mode is set to bilinear
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

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
  •