aboutsummaryrefslogtreecommitdiff
blob: 8517ebe4928e9dc08a9c4e5e8804ac01de8da6af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Index: layer0/ShaderMgr.c
===================================================================
--- layer0/ShaderMgr.c	(revision 3963)
+++ layer0/ShaderMgr.c	(working copy)
@@ -416,7 +416,7 @@
 char * CShaderMgr_ReadShaderFromDisk(PyMOLGlobals * G, const char * fileName) {
   FILE* f;
   long size;
-  char* buffer = NULL, *p, *pymol_path, *shader_path, *fullFile;
+  char* buffer = NULL, *p, *pymol_data, *shader_path, *fullFile;
   size_t res;
 
   PRINTFB(G, FB_ShaderMgr, FB_Debugging)
@@ -429,16 +429,16 @@
     return NULL;
   }
   
-  pymol_path = getenv("PYMOL_PATH");
-  if (!pymol_path){
+  pymol_path = getenv("PYMOL_DATA");
+  if (!pymol_data){
     PRINTFB(G, FB_ShaderMgr, FB_Warnings)
-      " PyMOLShader_NewFromFile-Warning: PYMOL_PATH not set, cannot read shader config files from disk\n" ENDFB(G);
+      " PyMOLShader_NewFromFile-Warning: PYMOL_DATA not set, cannot read shader config files from disk\n" ENDFB(G);
     return NULL;
   }
   /* make this a setting */
-  shader_path = "/data/shaders/";
-  fullFile = malloc( sizeof(char) * (strlen(pymol_path)+strlen(shader_path)+strlen(fileName)+1));
-  fullFile = strcpy(fullFile, pymol_path);
+  shader_path = "/shaders/";
+  fullFile = malloc( sizeof(char) * (strlen(pymol_data)+strlen(shader_path)+strlen(fileName)+1));
+  fullFile = strcpy(fullFile, pymol_data);
   fullFile = strcat(fullFile, shader_path);
   fullFile = strcat(fullFile, fileName);
 
@@ -447,7 +447,7 @@
 
   if (!f) {
     PRINTFB(G, FB_ShaderMgr, FB_Errors)
-      " PyMOLShader_NewFromFile-Error: Unable to open file '%s' PYMOL_PATH='%s'\n", fullFile, pymol_path ENDFB(G);
+      " PyMOLShader_NewFromFile-Error: Unable to open file '%s' PYMOL_DATA='%s'\n", fullFile, pymol_data ENDFB(G);
     return NULL;
   } else {
     PRINTFB(G, FB_ShaderMgr, FB_Blather)
Index: layer1/Setting.c
===================================================================
--- layer1/Setting.c	(revision 3963)
+++ layer1/Setting.c	(working copy)
@@ -3991,7 +3991,7 @@
     set_b(I, cSetting_line_use_shader, 1);
     set_b(I, cSetting_sphere_use_shader, 1);
     set_b(I, cSetting_use_shaders, 0);  /* disable by default until optimized shaders present; doesn't effect vol */
-    set_s(I, cSetting_shader_path, "data/shaders");
+    set_s(I, cSetting_shader_path, "shaders");
     set_i(I, cSetting_volume_bit_depth, 8);
     set_color(I, cSetting_volume_color, "-1");
     set_f(I, cSetting_volume_layers, 256);