Nehe Tut7 Texture Problems
BlitzMax Forums/OpenGL Module/Nehe Tut7 Texture Problems
| ||
I can't seem to figure out why my texture have no read in any of the NeHe Texture tutorials I see the Green and Blue, but there isn't any red in the texture as if it wasn't being put the thru pixmap... |
| ||
I get a blue crate on the tut |
| ||
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. |
| ||
Dude I know all this.. Im trying to figure out why the textures aren't loading right in the Nehe Tutorail 7 how else can I use OpenGL in blitz without using the context command |
| ||
Replace by this :For y=TexHeight-1 To 0 Step -1 For x=0 To TexWidth-1 Checkimage[y,x,0]=PointeurImg[pp+2] Checkimage[y,x,1]=PointeurImg[pp+1] Checkimage[y,x,2]=PointeurImg[pp+0] pp=pp+3 Next Next Now, why this changed for the 1.10 ? Image is loaded in BGR order. |
| ||
@ Extron, IF the Image (Pixmap) has an Alpha part (i.e is 32 bit) would I need ... Checkimage [y,x,3] = PtrImg[pp+3] pp:+4 Yours H&K |