glBindTexture??

glBindTexture??

Post by Scot » Thu, 16 Sep 1999 04:00:00



How do I use this function?  I'm trying to keep 6 512x512 RGBA textures
resident on a Viper 550 (or770) under WinNT.  The book I have doesn't even
describe glBindTexture, so I assume it is a newer function.

How do I select whichever texture it is that I've "bound" once I've called
it?  For instance, if I want to call glTexSubImage2D to update a portion of
one of these textures, how do I let it know which one I'm working with?

Thanks a bunch in advance for any replies!

 
 
 

glBindTexture??

Post by Marcin Romaszewic » Thu, 16 Sep 1999 04:00:00



> How do I use this function?  I'm trying to keep 6 512x512 RGBA textures
> resident on a Viper 550 (or770) under WinNT.  The book I have doesn't even
> describe glBindTexture, so I assume it is a newer function.

> How do I select whichever texture it is that I've "bound" once I've called
> it?  For instance, if I want to call glTexSubImage2D to update a portion of
> one of these textures, how do I let it know which one I'm working with?

> Thanks a bunch in advance for any replies!

You need to call glBindTexture with a "name" before calling
glTexSubImage2D or all the other texture setup calls. After you have
bound a texture name, all subsequent texture calls are associated with
that name. So, to
choose the target of a glTexSubImage2D, you would have to have steps
such as these:

I. Texture setup

glBindTexture(GL_TEXTURE_2D, n);
glTexImage2D(...);
glTexParameterf(...);
and so on.

II. Texture subload time
//Make the texture you know as "n" the active one.
glBindTexture(GL_TEXTURE_2D, n);
glTexSubImage2d(...); //all changes happen to texture "n"

 
 
 

glBindTexture??

Post by Ferretti Fabi » Fri, 17 Sep 1999 04:00:00


for more information see the article
http://www.gamasutra.com/features/19990723/opengl_texture_objects_01.htm
at gamasutra

Fabio

http://ferretti.homepage.com


> How do I use this function?  I'm trying to keep 6 512x512 RGBA textures
> resident on a Viper 550 (or770) under WinNT.  The book I have doesn't even
> describe glBindTexture, so I assume it is a newer function.

> How do I select whichever texture it is that I've "bound" once I've called
> it?  For instance, if I want to call glTexSubImage2D to update a portion of
> one of these textures, how do I let it know which one I'm working with?

> Thanks a bunch in advance for any replies!

 
 
 

glBindTexture??

Post by Roger Wetze » Sat, 18 Sep 1999 04:00:00


Quote:> How do I use this function?

Have a look at the Batcube source on http://www.fatalfx.com/opengl/

--

 
 
 

glBindTexture??

Post by Alen Ladava » Sun, 19 Sep 1999 04:00:00



>How do I use this function?  I'm trying to keep 6 512x512 RGBA textures
>resident on a Viper 550 (or770) under WinNT.  The book I have doesn't even
>describe glBindTexture, so I assume it is a newer function.

>How do I select whichever texture it is that I've "bound" once I've called
>it?  For instance, if I want to call glTexSubImage2D to update a portion of
>one of these textures, how do I let it know which one I'm working with?

just do glBindTexture() and everything you do (like glTexImage2D) etc, is
done to that texture.
but make sure you take a look glGenTextures() and glDeleteTextures().
have you tried going to http://trant.sgi.com/opengl/ and take a look at man
pages?

alen

 
 
 

1. Using glBindTexture in display lists, memory issues?

Hello,

My program loads in around 1000 textures into memory, then loads 3000 model
files, creating display lists for each one holding all the texture binding
and vertex information, then frees the model file from memory, so the only
things being stored are the textures and display lists. All the textures and
models are used.

This is required for an editing program, which just edits the position of
objects, but not the objects themselves, and all the objects need to be able
to be viewed together onscreen. This is why I chose to place the models in
display lists, as they would be fast and dont need to be modified, but is
this a bad idea for the amount of models used?

This all works fine, uses around 300mb of memory, and the loading times
arent too bad until the viewport is created, which takes around 1-2mins. Is
there any way to optimise this, I am guessing having so many textures loaded
using glTexImage causes the slowdown in starting opengl. But if I dont have
the textures loaded before, and load them on demand, then I cant create the
display lists as I currently do, so performance is unbearable.

It appears that using glBindTexture within display lists uses up a large
amount of memory? As if I dont bind any textures when creating the display
lists (though the textures are still loaded using glTexImage), it uses 40mb
less ram.

Any suggestions on improving performance, as the main causes for concern are
the opengl startup time and the memory consumption.

Cheers, LilSpike

P.S - Thanks fungus for the help with the alpha blending, that works
properly now :)

2. Stereoscopic Images of Small Objects by Flatbed Scanner

3. glBindTexture, glGenTextures =>unresolved external

4. DIB

5. glBindTexture() question

6. Eurographics Workshop on Multimedia

7. glBindTextures

8. FS: Back Issues of TOG and CG quarterly

9. glBindTexture

10. glbindtexture inside display list problem

11. conceptual description of glBindTexture needed

12. glBindTexture commonly supported ?

13. glBindTexture