=?windows-1252?Q?glUseProgramObjectARB=92_was_not_declared?= =?windows-1252?Q?_in_this_scope?=

  • Follow


Hi
what do i need to include?
Thanks
Michael

r: �glGetObjectParameterivARB� was not declared in this scope
error: �glGetInfoLogARB� was not declared in this scope
ror: �glGetUniformLocationARB� was not declared in this scope
etc.
0
Reply Michael106 (11) 7/4/2011 10:27:11 AM

On Jul 4, 8:27=A0pm, Michael <Mich...@notspam.com> wrote:
> Hi
> what do i need to include?
> Thanks
> Michael
>
> r: =91glGetObjectParameterivARB=92 was not declared in this scope
> error: =91glGetInfoLogARB=92 was not declared in this scope
> ror: =91glGetUniformLocationARB=92 was not declared in this scope
> etc.

Hi Michael,

It would be easier to help you if you mention programming language,
IDE and library you are using.

Regards,
Alex Kim
0
Reply alexdbkim (128) 7/4/2011 9:11:14 PM


On Jul 4, 12:27=A0pm, Michael <Mich...@notspam.com> wrote:
> Hi
> what do i need to include?
> Thanks
> Michael
>
> r: =91glGetObjectParameterivARB=92 was not declared in this scope
> error: =91glGetInfoLogARB=92 was not declared in this scope
> ror: =91glGetUniformLocationARB=92 was not declared in this scope
> etc.

This is an OpenGL extension so it's probably not
in the base library.

Start here: http://www.opengl.org/resources/features/OGLextensions/
0
Reply openglMYSOCKS (123) 7/5/2011 7:26:47 AM

On Mon, 04 Jul 2011 12:27:11 +0200, Michael wrote:

> r: ‘glGetObjectParameterivARB’ was not declared in this scope
> error: ‘glGetInfoLogARB’ was not declared in this scope
> ror: ‘glGetUniformLocationARB’ was not declared in this scope
> etc.

> what do i need to include?

Extension functions aren't guaranteed to be declared in a header file or
exported from the library.

The video driver may implement extensions which don't have a corresponding
library function. This is typically the case on Windows, where
OpenGL32.dll only exports the core API; extensions must be queried
dynamically.

Conversely, the library may export functions for extensions which aren't
actually implemented by the driver. This is typically the case on Linux,
where libGL.so exports practically every extension which was known when
the library was built (and <GL/glext.h> provides declarations), but the
hardware and driver depend upon which X server you connect to at run-time,
and any given X server will only implement a subset of those extensions.

The correct way to use an extension is to provide your own declaration,
and to obtain a pointer to the function using glXGetProcAddress(),
wglGetProcAddress(), etc.

You also need to check whether the implementation actually supports the
extension, by examining the string returned from glGetString(GL_EXTENSIONS).
This needs to be done after a context is created and bound, as the set of
available extensions can vary depending upon context (e.g. on a multi-head
system, the set of extensions may depend upon which screen the window is
on).

If this sounds like too much work, you might want to look at GLEW (the
OpenGL Extension Wrangler library), which tries to simplify this as much
as possible.

0
Reply nobody (4804) 7/5/2011 8:02:12 AM

Thanks, yes

    #include "GL/glew.h"

but still the same. I only want to compile a app...do i need
additional
steps with glew?
Thanks

0
Reply ahso47 (55) 7/5/2011 5:16:20 PM

PS: Nvidia opengl 4.1 (gtx460) on Ubuntu Linux.
0
Reply ahso47 (55) 7/5/2011 5:18:36 PM

On Tue, 5 Jul 2011 10:16:20 -0700 (PDT)
ahso <ahso47@yahoo.com> wrote:

> Thanks, yes
> 
>     #include "GL/glew.h"
> 
> but still the same. I only want to compile a app...do i need
> additional
> steps with glew?

You must call glewInit() after context initialization. Being curious:
Did you try glUseProgramObject without the ARB suffix?


Wolfgang

0
Reply Wolfgang.Draxinger (58) 7/6/2011 12:19:06 PM

6 Replies
47 Views

(page loaded in 0.128 seconds)


Reply: