[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: userdata expected, got userdata
- From: varol kaptan <varol.kaptan@...>
- Date: Wed, 8 Feb 2006 21:18:21 +0000
I've fixed the error message and some other things (Lua 5.1 fixes by
Anders F. Björklund, for example) and was ready to release a new
version. However, you have a very good point about the unsigned types.
I think it will be better to add them to memarray. I will release
luaglut 0.5 in a day or two with a better memarray.
Unfortunately, I have no experience with OpenGL selection and
feedback. Will this solve you selection problem?
Varol Kaptan
On 2/8/06, Issac Trotts <issac.trotts@gmail.com> wrote:
> OK, that's good to know. Btw, it seems like memarray isn't quite general
> enough to be used safely with OpenGL. Here's the line from memarray.c where
> it lists the types.
>
> const char * m_type_names[] = {
> "byte", "short", "int", "long", "float", "double" };
>
> There isn't an entry for unsigned int or GLuint, which is what's required
> by glSelectBuffer, so I think I'm going to stick with my own wrapping
> function for now. Would you be willing to include it in luaglut?
>
> Issac
>
> On 2/8/06, varol kaptan <varol.kaptan@gmail.com> wrote:
> > The last line should have been glSelectBuffer(BUFSIZE, selectBuf:ptr())
> >
> > I'll see what I can do to make the error message make sense.
> >
> > Varol Kaptan
> >
> > On 2/8/06, Issac Trotts < issac.trotts@gmail.com> wrote:
> > > I'm running into some trouble with a lua interpreter linked statically
> with
> > > luaglut-0.4. When I try to run a straightforward translation of the
> OpenGL
> > > Redbook demo select.c, it gives an error in this code
> > >
> > > BUFSIZE=512
> > > local selectBuf = memarray('int', BUFSIZE)
> > > glSelectBuffer (BUFSIZE, selectBuf);
> > >
> > > $ ./lua select.lua
> > > ./lua: select.lua :148: bad argument #2 to `glSelectBuffer' (userdata
> > > expected, got userdata)
> > > stack traceback:
> > > [C]: in function `glSelectBuffer'
> > > select.lua:148: in function `selectObjects'
> > > select.lua:183: in function `display'
> > > [C]: in function `glutMainLoop'
> > > select.lua:201: in main chunk
> > > [C]: ?
> > >
> > > A Google search for "userdata expected, got userdata" came up empty, so
> I'm
> > > hoping someone here knows what's going on.
> > >
> > > Issac