Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Textures, again. Am i being dense?

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2005
    Location
    London
    Posts
    2

    Textures, again. Am i being dense?

    Hello there!

    Ive started using OpenGL with VisualStudio .NET 2003, and have been trying for days to get textures to work. Ive looked at the Red Book and the NeHe tutorials, but still no joy. Is there a way of using textures without having to go through windows programming and would it be possible to have a step by step? anything to prevent me from going crazy!

    thank you,

    Miklo

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

    Re: Textures, again. Am i being dense?

    Easy, use glut, it is cross platform and the simplest way to create a small gl app.

    Example code for texture :
    http://www.opengl.org/resources/code...book/checker.c

    Glut download :
    http://www.opengl.org/resources/libraries/glut.html

    About nehe, note that for most lesson there is glut code available, listed at the bottom of the page.
    Ie, for lesson 1 :
    http://nehe.gamedev.net/data/lessons...t/lesson01.zip

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2005
    Location
    London
    Posts
    2

    Re: Textures, again. Am i being dense?

    cheers for that, but that is creating the texture in the program, i would like to import a texture.

    i understand that it involves other function calls, but do they have to be done using windows libraries?

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

    Re: Textures, again. Am i being dense?

    A ok, so it is not an opengl problem

    Either you use a image loading library, or you write yours. Uncompressed TGAs are quite simple, RAW format is even simpler, you just read bytes.

    Quite complete lib, no need to reinvent the wheel : DevIL , corona , or the libjpeg, libpng, etc

    Prefer to do it yourself ? wotsit

Posting Permissions

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