我的理解是,在该法典中,通过在模型中采用一种单体字体来取得这一效果,我认为,从属地法中,相关代码是装上斜体效应的:
In = fopen ("Data\shader.txt", "r"); // Open The Shader File
if (In) // Check To See If The File Opened
{
for (i = 0; i < 32; i++) // Loop Though The 32 Greyscale Values
{
if (feof (In)) // Check For The End Of The File
break;
fgets (Line, 255, In); // Get The Current Line
// Copy Over The Value
shaderData[i][0] = shaderData[i][1] = shaderData[i][2] = atof (Line);
}
fclose (In); // Close The File
}
else
return FALSE;
glGenTextures (1, &shaderTexture[0]); // Get A Free Texture ID
glBindTexture (GL_TEXTURE_1D, shaderTexture[0]); // Bind This Texture. From Now On It Will Be 1D
// For Crying Out Loud Don t Let OpenGL Use Bi/Trilinear Filtering!
glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri (GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// Upload
glTexImage1D (GL_TEXTURE_1D, 0, GL_RGB, 32, 0, GL_RGB , GL_FLOAT, shaderData);
以及以下有利于产生效果
// Cel-Shading Code
glEnable (GL_TEXTURE_1D); // Enable 1D Texturing
glBindTexture (GL_TEXTURE_1D, shaderTexture[0]); // Bind Our Texture
glColor3f (1.0f, 1.0f, 1.0f);
....
是否有办法将这种模型与BMP GL_TEXential_2合并成,并对该文本进行仔细研究?