Results 1 to 4 of 4

Thread: glGetFloatv??

  1. #1
    Guest

    glGetFloatv??

    I'm trying to use glGetFloatv to get the modelview matrix. For some WIERD reason, it doesn't work. Is there some way to get around this? Can I somehow get at the gobal that stores the modelview matrix?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Posts
    108

    Re: glGetFloatv??

    iīve had the same problem, it seems as if it matters WHERE you put the glGetFloat in your code (perhaps in a separate function).. unfortunately, i donīt know where to put the command to make it work safely, i just tried a few locations until i found a working configuration and did not change anything about it (never touch a running system
    maybe i (and you) am producing a GLerror in your code that causes this strange behaviour - i know that i do so, but havenīt located it yet, neither am i sure that it is the reason for this bug

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: glGetFloatv??

    Can you be more specific on WHAT doesn't work about it? Do you get back nothing? Do you get exception errors?

    hoshi55,
    I don't know of any restrictions on where you place the call except for the following.
    1) It has to be done AFTER the window has been created and the pixelformat setup to use OpenGL.
    2) It can't be used between glBegin/glEnd.
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Posts
    108

    Re: glGetFloatv??

    usually if getFloatfv does not work, you get an array of very small negative numbers.

    yes, i know there are NO rstrictions about where to put that command, but if you produce a GLerror in your code somewhere, this sometimes causes unpredictable results. i cleaned up my own code now, removing GLerrors and the glGetFloat call seems to work now no matter where i put it. This might be different across various openGL-implementaions (again) but itīs the case with 3dfx drivers.

Similar Threads

  1. Problem with glGetFloatv
    By swethasharma in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-31-2012, 02:45 AM
  2. glGetFloatv(GL_MODELVIEW_MATRIX, mat)?
    By tgtt in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-22-2004, 11:34 PM
  3. Replies: 0
    Last Post: 02-20-2004, 09:06 PM
  4. problem with glGetFloatv
    By dvm in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-08-2003, 04:52 AM
  5. glGetFloatv??
    By in forum OpenGL: macOS
    Replies: 1
    Last Post: 05-28-2001, 01:10 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