go-gl-legacy / gl

Go bindings for OpenGL
BSD 3-Clause "New" or "Revised" License
342 stars 52 forks source link

Compiler can't find any functions in attriblocation.go #164

Closed akonneker closed 10 years ago

akonneker commented 10 years ago

It is certainly possible that this is a user error, but here is the problem:

The compiler recognizes the AttribLocation type, but I get invalid identifier errors if I try to use any of the functions defined in the attriblocation.go file.

I get a whole lot of this: undefined: gl.Attrib4f

Any thoughts?

tildeleb commented 10 years ago

Not enough information. What platform? Which compiler? What versions? Also paste the output of "go version" and maybe "go env".

FWIW on the Mac with stock Go 1.3 and 6g I use "AttribPointer" all the time but not the others.

polyfloyd commented 10 years ago

Attrib4f() is a member function of AttribLocation.

attr := gl.AttribLocation(42)
attr.Attrib4f(0, 0, 0, 0)

Are you calling it directly as a function?

gl.Attrib4f(0, 0, 0, 0)

Some code snippets would be helpful.

pwaller commented 10 years ago

I'm closing this issue until it is clear that there is a problem on this side. Feel free to ping the issue if it is found otherwise and I or someone else can reopen.

I suspect @PolyFloyd is correct, the Attribs functions are not defined at the top gl scope, but on the AttribLocation type.

In the meantime our mailing list would be a good please to find help :smiley:.

akonneker commented 10 years ago

The problem is that I am in fact, a n00b.

@PolyFloyd is 100% correct

Sorry for cluttering up the issue system. I'll take my errors to the mailing list first next time.

pwaller commented 10 years ago

No problem, don't worry about it @akonneker :)