[squeak-dev] simple example of glTextureBind in Squeak?
Lawson English
lenglish5 at cox.net
Tue Dec 20 16:29:03 UTC 2011
Think I found it. TextureManager>>uploadTexture: calls
TextureManager>>uploadTexture:dirtyRect: which does the OpenGL calls to
register the texture with OpenGL.
Hooray.
L.
On 12/20/11 8:57 AM, Lawson English wrote:
> I'm trying to figure out how to load and use an image as a gl texture.
> I've bounced my head against this for several hours over the past 2
> days. I've looked at the texture manager code but not getting it.
> Since it depends on TForm, which is a Croquet/Cobalt object, it
> wouldn't be possible to use it directly even if I did understand it
> (yes, I looked at TForm as well, but still don't quite get what is
> going on)
>
> Is there a simple example of how to load a texture with squeak and
> use #glBindTexture:with: so that it can be used in the NeHe tutorial 6?
>
> I have a vague idea that I could allocate ExternalMemory and BitBlt
> into that and then hand that off to the #glBindTexture:with: call,
> but I cant find out how TextureManager does it and I thought perhaps I
> should make sure I'm doing it the best way if I'm writing a tutorial
> how-to for the public-at-large.
>
> Thanks in advance for any tips/advice/code.
>
> Lawson
>
>
>
>
More information about the Squeak-dev
mailing list
|