Results 1 to 3 of 3

Thread: Some Texture problems

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    2

    Some Texture problems

    Hello!!

    First at all, im not english so sorry for my wrongs.

    I read nehe tutorials and now im trying to get my own programs. But i get a problem. All nehe examples use images that have 128*128, 256*256 pixels. If i try to change images the programs dont show image, all appear black.

    In my program i need to get textures from images for diferent pixels....16*16, 24*24, 640*480, 16*32......

    Please, can someone say me how get texture from this images, and get my rogram draw the imagen on my screen??

    Thank you very much, and sorry for my mistakes, my english dont really good ^^;

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Some Texture problems

    Your english is not so bad, I understood your question

    About GL textures : you need to use 'power of two' sizes in x and y.
    Ie you can have a 16*64 texture, but not a 640*480. For such cases either scale your image so that it fits in a 512*512 texture, or fill the lower left corner of a 1024*512 texture, and use adequate texture coordinates.
    (this limitation can be removed with some GL extensions, but I will keep it simple for now)

    About nehe code, I think it should work for all power of two resolutions. Are you sure you can't make it work with a 16*64 image ?

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2004
    Posts
    2

    Re: Some Texture problems

    Hello!!

    Thank you very much, you answer very fast.

    Really i dont try using 16*64....i need another dimensions and dont try it, but thanks.

    Another question that i have now.....hoy can a get a texture from a part of image??

    For example, i get image 256*256 for multiple sub-images 16*16.....how can i get a texture from a subimage??

    From first question i thing i will redimension it to 512*512, and redimension to 640*480 in-time.

    Thank you

Similar Threads

  1. Problems Texture Mapping with Float Texture
    By CelticBlues in forum OpenGL: GLSL
    Replies: 21
    Last Post: 02-08-2009, 04:13 AM
  2. More texture problems: here we go....again!
    By gui24a in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-25-2008, 12:30 PM
  3. Texture Problems ...
    By Saintex in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-22-2002, 07:38 AM
  4. Texture Problems
    By spectrum in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 01-09-2002, 02:58 AM
  5. AVI texture problems
    By dmsy in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-12-2000, 01:09 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