chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Unsigned int conversion and OpenGL


From: Drake Wilson
Subject: Re: [Chicken-users] Unsigned int conversion and OpenGL
Date: Sat, 7 Jun 2008 00:08:11 -0500
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Quoth Daniel Dewey <address@hidden>, on 2008-06-03 03:42:04 -0400:
> I'm learning OpenGL using Chicken and I'm having trouble getting
> textures to work. I have a texture in memory and am getting the
> address with pointer->address, but this returns a regular signed
> int, which gl:BindTexture rejects with "bad argument type - not an
> unsigned integer".

What are you doing trying to pass a pointer to gl:BindTexture?  Maybe
you mean gl:TexImage2D or something.

>From the man page glBindTexture(3x):

       glBindTexture lets you create or use a named texture. Calling
       glBindTexture with target set to GL_TEXTURE_1D, GL_TEXTURE_2D,
       GL_TEXTURE_3D and texture set to the name of the newtexture
       binds the texture name to the target.  When a texture is bound
       to a target, the previous binding for that target is
       automatically broken.

       Texture names are unsigned integers. The value zero is reserved
       to represent the default texture for each texture target.
       Texture names and the corresponding texture contents are local
       to the shared display-list space (see glXCreateContext) of the
       current GL rendering context; two rendering contexts share
       texture names only if they also share display lists.

       You may use glGenTextures to generate a set of new texture names.

> ~Daniel

   ---> Drake Wilson




reply via email to

[Prev in Thread] Current Thread [Next in Thread]