glTexSubImage2D

BlitzMax Forums/BlitzMax OpenGL Programming/glTexSubImage2D

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm not sure if the handle that is returned from bglTexFromPixmap is the actual internal memory space used to store the data passed to OpenGL. It may be a blitz-generated value such as just an index number.

I would say, instead of using bgltexfrompixmap, just upload the first texture yourself, then you can be sure that you're passing the same tex1 variable as the handle. Then do the subimage2d to update it.

If you are getting garbage pixels it may be that you don't have some of the other parameters defined properly. You need to set up whether there is wrapping taking place, a skip value, how many bytes per pixel, etc. I'm not sure if it's glTexParamter() or what. I'd say you haven't set up enough settings.