converting to GL texture

BlitzMax Forums/BlitzMax Beginners Area/converting to GL texture

Bremer(Posted 2005) [#1]
bglTexFromPixmap, is there a faster way of making a GLtexture from a pixmap. I have been experimenting with manipulating the data of a static pixmap and then replacing the texture using it, but it seems like its really slow, so I was wondering if there are other ways of doing it.

Also, can mipmapping be turned off. If only using 2D, is it necessary with mipmapping as I have tried calling bglTexFromPixmap with mipmapping set as false, but then my texture gets all white and nothing else, but its much faster than with it set as true.


ImaginaryHuman(Posted 2005) [#2]
I believe that bglTexFromPixmap actually makes a call to ConvertPixmap(), which converts the pixel format whether you want it to or not. That may be what slows it down - it's a CPU routine.

You can upload your own textures with OpenGL commands but you won't be able to use that in an integrated way with the standard Max2D calls.


Bremer(Posted 2005) [#3]
I am working on something which is ment to not use Max2D if possible, so that would be alright. I will take a look around and see if I can figure out how to upload the texture directly without the conversion first. Anyone with a code example would be great.