本文整理汇总了C++中texture::init方法的典型用法代码示例。如果您正苦于以下问题:C++ texture::init方法的具体用法?C++ texture::init怎么用?C++ texture::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类texture
的用法示例。
在下文中一共展示了texture::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void init()
{
memset(lastfilename,0,256);
memset(musfilename,0,40);
initGUI();
sprintf(scenelist->name,"Default");
memset(tooltip,0,256);
memset(defaulttooltip,0,256);
sprintf(defaulttooltip,"a.D.D.i.c.t. (c) BoyC 2002");
actualtexture=texturelist;
lasttexture=texturelist;
memset(texturelist,0,sizeof(tTexture));
texturelist->next=NULL;
sprintf(texturelist->name,"Default");
memset(cursorstring,0,256);
for (x=0;x<=7;x++) modellsubmenu[x]=0;
init3dengine();
InitModellerGUI();
BuildFont();
BuildFont2();
BuildFontSmall();
inittextureengine();
generatedtexture.init();
buffertexture.init();
memset(pretextures,0,sizeof(pretextures));
memset(texdata,0,sizeof(texdata));
memset(texsubmenu,0,sizeof(texsubmenu));
texdata[0][3].command[3]=4;
texdata[0][5].command[3]=14;
texdata[0][5].command[4]=100;
texdata[0][6].command[3]=30;
texdata[1][1].command[2]=128;
texdata[2][4].command[3]=128;
texdata[3][2].command[2]=128;
texdata[3][4].command[4]=255;
texdata[3][6].c.param1=255;
texdata[3][6].c.param3=255;
texdata[3][6].c.param5=255;
glGenTextures(1,&mattexture);
glBindTexture(GL_TEXTURE_2D,mattexture);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D,0,4,256,256,0,GL_RGBA,GL_UNSIGNED_BYTE,generatedtexture.layers[0]);
for (x=0;x<4;x++)
{
glGenTextures(1,&(prelayers[x]));
glBindTexture(GL_TEXTURE_2D,prelayers[x]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D,0,4,256,256,0,GL_RGBA,GL_UNSIGNED_BYTE,generatedtexture.layers[x]);
}
for (x=0;x<4;x++)
{
glGenTextures(1,&(texlayers[x]));
glBindTexture(GL_TEXTURE_2D,texlayers[x]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D,0,4,256,256,0,GL_RGBA,GL_UNSIGNED_BYTE,generatedtexture.layers[x]);
}
for (x=0;x<4;x++)
{
glGenTextures(1,&alayers[x]);
glBindTexture(GL_TEXTURE_2D,alayers[x]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D,0,4,256,256,0,GL_RGBA,GL_UNSIGNED_BYTE,generatedtexture.layers[x]);
}
glGenTextures(1,&background);
glBindTexture(GL_TEXTURE_2D, background);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
commandnames[DD_fractal] ="Fractal ";
commandnames[DD_plasma] ="Plasma ";
commandnames[DD_cells] ="Cells ";
commandnames[DD_envmap] ="Envmap ";
commandnames[DD_subplasm] ="Subplasma ";
commandnames[DD_clear] ="Clear ";
commandnames[DD_text] ="Text ";
commandnames[DD_sindist] ="SinDist ";
commandnames[DD_offset] ="Offset ";
commandnames[DD_twirl] ="Twirl ";
commandnames[DD_blur] ="Blur ";
commandnames[DD_map] ="MapDist ";
commandnames[DD_dirblur] ="DirBlur ";
commandnames[DD_xchng] ="Xchange ";
commandnames[DD_copy] ="Copy ";
commandnames[DD_mix] ="Mix ";
commandnames[DD_mul] ="Mul ";
commandnames[DD_add] ="Add ";
commandnames[DD_max] ="Max ";
commandnames[DD_contrast] ="Contrast ";
commandnames[DD_invert] ="Invert ";
commandnames[DD_shade] ="Shade ";
commandnames[DD_bright] ="Brighten ";
commandnames[DD_sincol] ="Color Sine ";
commandnames[DD_scale] ="Scale ";
commandnames[DD_hsv] ="HSV ";
commandnames[DD_colorize] ="Colorize ";
commandnames[DD_mixmap] ="MixMap ";
//.........这里部分代码省略.........