GLB Texture Handles

Previous topic - Next topic

bigsofty

How do I retrieve the OpenGL texture handle for a texture that has already been read using the LOADSPRITE function?

This is for using stored GLB textures with raw GL commands.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

What are you trying to archive?

Try:
Code (glbasic) Select

X_SETTEXTURE id%, -1
intern_id% = glGetInterger(GL_TEXTURE_BINDING_2D)




bigsofty

I am having to write a little openGL lib to convert some OpenGL code, written in C that I need.

I need the texture handle to that I can use GLB textures within some inline code.

Using some of the images already read and stored by GLBs LOADSPRITE function, then later reusing the images handles with inline C, using "glBindTexture" for example.

If you get my meaning?

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

That might work excellently. If you mess with the texture size from INLINE code, GLBasic might not be able to display it properly. I store the width/height internally in a variable.

bigsofty

Cool Gernot, I'll give that a go.

I won't be writing anything to the texture just reading it.

Thanks again!  :good:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)