Commit b991aadf authored by Ruben Jesus Garcia Hernandez's avatar Ruben Jesus Garcia Hernandez
Browse files

Proper directory separator both in windows and linux

parent fea3947f
...@@ -408,20 +408,20 @@ int readAtomsJsonURLwget (const char *const f, int **numatoms, int *timesteps, f ...@@ -408,20 +408,20 @@ int readAtomsJsonURLwget (const char *const f, int **numatoms, int *timesteps, f
char cmd[2048]; char cmd[2048];
int ret; int ret;
if (token) if (token)
sprintf (cmd, "wget --no-check-certificate --header \"Authorization:Basic %s\" %s/cells?pagination=off -O %s/material_cells.json", token, f, TMPDIR); sprintf (cmd, "wget --no-check-certificate --header \"Authorization:Basic %s\" %s/cells?pagination=off -O %smaterial_cells.json", token, f, TMPDIR);
else else
sprintf (cmd, "wget %s/cells?pagination=off -O %s/material_cells.json", f, TMPDIR); sprintf (cmd, "wget %s/cells?pagination=off -O %smaterial_cells.json", f, TMPDIR);
ret=system(cmd); ret=system(cmd);
if (ret!=0) if (ret!=0)
return (-3); return (-3);
if (token) if (token)
sprintf (cmd, "wget --no-check-certificate --header \"Authorization:Basic %s\" %s/elements?pagination=off -O %s/material_elements.json", token, f, TMPDIR); sprintf (cmd, "wget --no-check-certificate --header \"Authorization:Basic %s\" %s/elements?pagination=off -O %smaterial_elements.json", token, f, TMPDIR);
else else
sprintf (cmd, "wget %s/elements?pagination=off -O %s/material_elements.json", f, TMPDIR); sprintf (cmd, "wget %s/elements?pagination=off -O %smaterial_elements.json", f, TMPDIR);
ret=system(cmd); ret=system(cmd);
if (ret!=0) if (ret!=0)
return(-3); return(-3);
sprintf (cmd, "%s/material", TMPDIR); sprintf (cmd, "%smaterial", TMPDIR);
return readAtomsJson (cmd, numatoms, timesteps, pos, abc, clonedAtoms, token); return readAtomsJson (cmd, numatoms, timesteps, pos, abc, clonedAtoms, token);
} }
#endif #endif
......
...@@ -266,6 +266,7 @@ private: // OpenGL bookkeeping ...@@ -266,6 +266,7 @@ private: // OpenGL bookkeeping
GLuint m_unRenderModelProgramID; GLuint m_unRenderModelProgramID;
GLuint m_unAtomsProgramID; GLuint m_unAtomsProgramID;
GLuint m_unUnitCellProgramID; GLuint m_unUnitCellProgramID;
GLuint m_unBlendingProgramID;
GLint m_nSceneMatrixLocation; GLint m_nSceneMatrixLocation;
GLint m_nBlendingIntLocation; GLint m_nBlendingIntLocation;
...@@ -1089,7 +1090,7 @@ void CMainApplication::RenderFrame() ...@@ -1089,7 +1090,7 @@ void CMainApplication::RenderFrame()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool CMainApplication::CreateAllShaders() bool CMainApplication::CreateAllShaders()
{ {
if (GL_NO_ERROR!=PrepareISOTransShader (&m_unSceneProgramID, &m_nSceneMatrixLocation)) if (GL_NO_ERROR!=PrepareISOTransShader (&m_unSceneProgramID, &m_nSceneMatrixLocation, &m_unBlendingProgramID))
{ {
dprintf( "Error Preparing Transparency shader\n" ); dprintf( "Error Preparing Transparency shader\n" );
return false; return false;
...@@ -2666,6 +2667,7 @@ char * MainErrors [] = { ...@@ -2666,6 +2667,7 @@ char * MainErrors [] = {
}; };
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
TMPDIR=".\\";
//http://stackoverflow.com/questions/4991967/how-does-wsastartup-function-initiates-use-of-the-winsock-dll //http://stackoverflow.com/questions/4991967/how-does-wsastartup-function-initiates-use-of-the-winsock-dll
WSADATA wsaData; WSADATA wsaData;
if(WSAStartup(0x202, &wsaData) != 0) if(WSAStartup(0x202, &wsaData) != 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment