Latest OxygenBasic.zip at GitHub (Click on the Wizard)
0 Members and 1 Guest are viewing this topic.
'------------- 'TEXTURED QUAD '============= ' sub ProcTex1(string*texture, sys size) '==================================== ' texture=nuls 4*size*size xe=size-1 : ye=xe w=*texture for y=0 to ye for x=0 to xe p=(x+y*size)*4+w mov ecx,p mov eax, 0xff666644 ( mov edx,y and edx,0xf cmp edx,0 jnz exit mov eax,0xffffffff ) ( mov edx,x and edx,0x6 jnz exit mov eax,0xbbbbbbbb ) mov [ecx],eax next next ' end sub ' string tex : sys size size=128 ProcTex1 tex, size MakeTexture *tex, size, size, texn[3] ' glEnable GL_TEXTURE_2D glBindTexture GL_TEXTURE_2D,texn[3] glpushmatrix glscalef 2,2,2 glbegin GL_QUADS ' glnormal3f 0,0,1 glTexCoord2f 0,0 : glvertex3f -1., -1., 0 glTexCoord2f 0,1 : glvertex3f -1., 1., 0 glTexCoord2f 1,1 : glvertex3f 1., 1., 0 glTexCoord2f 1,0 : glvertex3f 1., -1., 0 ' glend glpopmatrix glDisable GL_TEXTURE_2D ' glEndList