Nehe Tut7 Texture Problems

BlitzMax Forums/BlitzMax OpenGL Programming/Nehe Tut7 Texture Problems

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 don't know if this is what you want to hear, but BlitzMax has some really neat builtin texturing helper functions, so that you can simply do this:

' Variables
Local thePixmap:TPixmap
Local theTexture:Int

' First set up openGL
bglCreateContext(800, 600)
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE)
glEnable(GL_TEXTURE_2D)

' Load the texture
thePixmap = LoadPixmap("incbin::picture.jpg")
theTexture = bglTexFromPixmap(thePixmap)


BlitzGL contains a few other nice tools, such as bglCreateContext - Just check the help on BlitzGL. Hope this helps.