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 10 of 10

Thread: glimg image dimesions

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    18

    glimg image dimesions

    I can't seem to figure out how to use glimg to find the width and height of an image that has been loaded into an image set. I know it uses the glimg:: Dimensions class, but I cant figure out how this is done.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    I'm not really sure what the problem is. Are you wondering how to get a Dimensions instance from an ImageSet? Because the docs cover that. Are you asking how to use that object? Because that seems self evident; it's a struct that has members which are publicly accessible.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    18
    I am wondering how to get a Dimension instance from an ImageSet, but I am new to programming, so I am having trouble understanding how it is done by reading the docs. I am looking for some example code of how this would be done.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    You need example code... for a single function call? It's no different from calling any other member function of a class. If you can call `GetMipmapCount` or `GetArrayCount`, then you can call `GetDimensions`.

    But if you really insist:

    Code :
    glimg::Dimensions dims = imageSet->GetDimensions();

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    18
    What does the '->' between the imageset and GetDimensions(); represent?
    Last edited by Ygyaxthe3rd; 05-17-2013 at 06:40 PM.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    You have asked about a very basic C++ concept, something you'd learn in any Introduction to C++ book. So... get such a book and read it. You'll probably learn a lot of other important things you'll need to know, and you need that foundation of knowledge before you can effectively use the SDK (or any C++ library).

    Graphics programming is not for someone who's just starting to learn programming. Before you can learn how to code graphics, you need to have a solid understanding of the fundamentals of programming in whatever language you intend to code graphics in.

Posting Permissions

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