当前位置: 首页>>代码示例>>C++>>正文


C++ texture::init方法代码示例

本文整理汇总了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     ";
//.........这里部分代码省略.........
开发者ID:ConspiracyHu,项目名称:2012SourcePack,代码行数:101,代码来源:aDDict.cpp


注:本文中的texture::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。