示例#1
0
void PovRayGen::writeSurfaceMacro()
{
   m_stream << "#macro Surface(id, col)\n";
   m_stream << "object {\n";
   m_stream << "   id\n";
   writeTexture(m_settings.value("surfaceTexture").toString());
   m_stream << "}\n";
   m_stream << "#end\n\n";

   m_stream << "#macro ClippedSurface(id, col)\n";
   m_stream << "object {\n";
   m_stream << "   id\n";
   writeTexture(m_settings.value("surfaceTexture").toString());
   m_stream << "   clipped_by { Clipping_Plane }\n";
   m_stream << "}\n";
   m_stream << "#end\n\n";
}
示例#2
0
void PovRayGen::writeBondMacro()
{
   m_stream << "#macro Bond(beginAtom, endAtom, col, rad)\n";
   m_stream << "cylinder {\n";
   m_stream << "   beginAtom, endAtom, rad\n";
   writeTexture(m_settings.value("bondTexture").toString());
   m_stream << "}\n";
   m_stream << "#end\n\n";
}
示例#3
0
void PovRayGen::writeAtomMacro()
{
   m_stream << "#macro Atom(pos, col, rad)\n";
   m_stream << "sphere {\n";
   m_stream << "   pos, rad \n";
   writeTexture(m_settings.value("atomTexture").toString());
   m_stream << "}\n";
   m_stream << "#end\n\n";
}
示例#4
0
 void Render::writeFramebufferTextures() 
 {
     for (map<string,GLuint>::iterator i = gl_framebuffer_texs.begin();i!=gl_framebuffer_texs.end();i++)
     {
         string s(i->first);
         s+=".png";
         writeTexture(i->second, s.c_str());
     }
 }
示例#5
0
文件: Renderer.cpp 项目: caomw/MPRGP
void DefaultRenderer::writeColorTexture(GLuint tid,std::string path)
{
    writeTexture(tid,GL_RED,std::string(path).append("Red.ppm"));
    writeTexture(tid,GL_BLUE,std::string(path).append("Blue.ppm"));
    writeTexture(tid,GL_GREEN,std::string(path).append("Green.ppm"));
}
示例#6
0
文件: pfm.cpp 项目: mpern/ezg2
 void saveTexture(const char* filename, const GL::Texture2D& tex)
 {
   std::ofstream file(filename, std::ios::out | std::ios::binary);
   writeTexture(file, tex);
 }