Exemplo n.º 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";
}
Exemplo 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";
}
Exemplo 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";
}
Exemplo 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());
     }
 }
Exemplo n.º 5
0
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"));
}
Exemplo n.º 6
0
Arquivo: pfm.cpp Projeto: mpern/ezg2
 void saveTexture(const char* filename, const GL::Texture2D& tex)
 {
   std::ofstream file(filename, std::ios::out | std::ios::binary);
   writeTexture(file, tex);
 }