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: OpenGL Occlusion Query[Help!]

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2012
    Location
    China
    Posts
    5

    OpenGL Occlusion Query[Help!]

    i have been trying to conduct a occlusion query with

    function 'glBeginQuery(GL_SAMPLES_PASSED,queryid);'. however,

    there is a error that says 'glBeginQuery : undeclared

    identifier ' and 'GL_SAMPLES_PASSED: undeclared identifier';

    i have included 'gl\gl.h','gl\glu.h' & 'gl\glaux.h'.

    Could any buddy do me a favor to solve this problem? thanks!



  2. #2
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    303

    Re: OpenGL Occlusion Query[Help!]

    Try using an extension loader like GLEW to load newer OpenGL functions at runtime. It also provides more up to date headers where GL_SAMPLES_PASSED is declared.

    In case that doesn't help, please also tell us what OS and what OpenGL version you have.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2012
    Location
    China
    Posts
    5

    Re: OpenGL Occlusion Query[Help!]

    i have installed the latest GLEW correctly, whose version is glew-1.7.0-win32. However, it still doesn't work that comes new errors:
    "error LNK2001: unresolved external symbol __imp____glewBeginQuery" and
    "error LNK2001: unresolved external symbol __imp____glewEndQuery"

    also, i have inlcuded glew.h before gl.h, glu.h & glaux.h like following:
    #include <GL/glew.h>
    #include <GL/gl.h>
    #include <GL/glu.h>
    #include <GL/glaux.h>

    Without using glBeginQuery() or glEndQuery(), debugging is passed and the application program runs without errors.

    my operation system is: WINDOWS 7_32bit
    GL_VERSION is: 4.1.0
    GLU_VERSION is: 1.2.2.0 Microsoft Corporation

    if any solution exists, please help me! thx

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2012
    Location
    China
    Posts
    5

    Re: OpenGL Occlusion Query[Help!]

    the platform is Visual Studio 6.0;
    i have read the document 'glew.h' and find the relevant information that maybe help when you think about this problem:
    #define glBeginQuery GLEW_GET_FUN(__glewBeginQuery)

Posting Permissions

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