Commit ba6d8b6b authored by Morten Kjeldgaard's avatar Morten Kjeldgaard

First import of debian/ for qutemol

parent 0248f23a
qutemol (0.4.1~cvs20081111-0ubuntu1~ppa1) intrepid; urgency=low
* New upstream version as of today. Dropped patches 26_trackmode.cpp
and 27_trackutils.cpp, since these have been addressed upstream.
-- Morten Kjeldgaard <mok0@ubuntu.com> Tue, 11 Nov 2008 19:21:14 +0100
qutemol (0.4.1~cvs20080130-0ubuntu1~ppa5) intrepid; urgency=low
* Compile on intrepid. A few changes needed to meet stricter
compiler requirements:
- patch 28_mol.cpp to include string.h
- patch 29_mol.h to include <string>
- patch 30_matrix33.h to include stdlib.h
-- Morten Kjeldgaard <mok0@ubuntu.com> Mon, 10 Nov 2008 14:49:33 +0100
qutemol (0.4.1~cvs20080130-0ubuntu1~ppa4) hardy; urgency=low
* Fixed missing Build-Depends
-- Morten Kjeldgaard <mok@bioxray.au.dk> Wed, 30 Jan 2008 23:01:00 +0100
qutemol (0.4.1~cvs20080130-0ubuntu1~ppa1) hardy; urgency=low
* Initial packaging (LP: #nnnnnn)
* Authored manpage
* Many patches to make code compile cleanly
* Port to wxWidgets 2.8
-- Morten Kjeldgaard <mok@bioxray.au.dk> Sat, 26 Jan 2008 21:18:19 +0100
Source: qutemol
Priority: optional
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
XSBC-Original-Maintainer: Morten Kjeldgaard <mok@bioxray.au.dk>
Homepage: http://qutemol.sourceforge.net/
Build-Depends: debhelper (>= 5), cdbs, dpatch, libwxgtk2.8-dev, libglew1.5-dev,
libgif-dev, libpng12-dev
Standards-Version: 3.8.0
Section: science
Package: qutemol
Section: science
Architecture: any
Depends: ${shlibs:Depends}
Description: interactive visualization of macromolecules
QuteMol is an interactive, high quality molecular visualization
system. developed by Marco Tarini and Paolo Cignoni of the Visual
Computing Lab at ISTI-CNR. QuteMol exploits the current GPU capabilites
through OpenGL shaders to offer an array of innovative visual
effects. QuteMol visualization techniques are aimed at improving clarity
and an easier understanding of the 3D shape and structure of large
molecules or complex proteins. QuteMol offers:
.
* real time ambient occlusion
* depth aware silhouette enhancement
* ball-and-stick, space-filling and liquorice visualization modes
* high resolution antialiased snapshots for creating publication
quality renderings
* automatic generation of animated gifs of rotating molecules for
web page animations
* interactive rendering of macromolecules (>100k atoms)
* standard PDB file input
X-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
X-Debianized-By: Morten Kjeldgaard <mok@bioxray.au.dk>
X-Debianized-Date: Sat, 26 Jan 2008 21:35:00 +0100.
X-Source-Downloaded-From: http://qutemol.cvs.sourceforge.net/qutemol/
X-Upstream-Author: Marco Tarini and Paolo Cignoni of the Visual
Computing Lab at ISTI-CNR
Files: src/*, Makefile
Copyright: (C) 2007 Marco Tarini and Paolo Cignoni
License: GPL-2
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Files: debian/*
Copyright: (C) 2008, Morten Kjeldgaard <mok@bioxray.au.dk>
License: GPL-2
X-Comment: On Debian systems, the complete text of the GNU
General Public License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
#!/bin/sh
dh_testdir || exit
remember=`pwd`
cd /tmp
rm -rf /tmp/qutemol/
echo "Hit <CR> at CVS Password prompt"
cvs -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol login
cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol
cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol/src
cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol/src/image
cvs -z3 -d:pserver:anonymous@qutemol.cvs.sourceforge.net:/cvsroot/qutemol co -l -P qutemol/src/presets
cd qutemol
cvs -d:pserver:anonymous@vcg.cvs.sourceforge.net:/cvsroot/vcg login
cvs -z3 -d:pserver:anonymous@vcg.cvs.sourceforge.net:/cvsroot/vcg co -P vcg
cd ..
find qutemol -type d -name CVS |xargs rm -rf
rm -rfv /tmp/qutemol/vcg/apps
rm -rfv /tmp/qutemol/vcg/docs
ddd=`date +'%Y%m%d'`
tar -czvf qutemol_0.4.1~cvs${ddd}.orig.tar.gz qutemol/
cd $remember
cp /tmp/qutemol_0.4.1~cvs${ddd}.orig.tar.gz ..
01_makefile.dpatch
02_qutemol.cfg.dpatch
03_ao.cpp.dpatch
04_ao.h.dpatch
05_aogpu.cpp.dpatch
06_atomcolor.cpp.dpatch
07_cgutil.cpp.dpatch
08_common.cpp.dpatch
09_cubemapsamp.h.dpatch
10_hardsettings.cpp.dpatch
11_hardsettings.h.dpatch
12_mol.cpp.dpatch
13_mol.h.dpatch
14_mycanvas.cpp.dpatch
15_mycanvas.h.dpatch
16_mytab.cpp.dpatch
17_shadowmap.cpp.dpatch
18_shadowmap.h.dpatch
19_gifsave.cpp.dpatch
20_main.cpp.dpatch
21_pngsave.cpp.dpatch
22_progress.cpp.dpatch
23_progress.h.dpatch
24_savesnapdialog.cpp.dpatch
25_matrix44.h.dpatch
#26_trackmode.cpp.dpatch
#27_trackutils.h.dpatch
28_mol.cpp.dpatch
29_mol.h.dpatch
30_matrix33.h.dpatch
#! /bin/sh /usr/share/dpatch/dpatch-run
## makefile.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
INCDIRS = -Ivcg -Isrc -I.
-OPTFLAGS = -Os -Wall -g
+OPTFLAGS = -O2 -Wall -g
-CXXFLAGS = $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags`
-LIBS = $(CXXFLAGS) `wx-config --libs core,base --gl-libs` -lGLEW -lGLU -lGL
+CXXFLAGS = -DPKGDATADIR='"/usr/share/qutemol/"' $(INCDIRS) $(OPTFLAGS) `wx-config --cppflags`
+LIBS = $(CXXFLAGS) `wx-config --libs core,base --gl-libs` -lGLEW -lGLU -lGL -lgif
OBJS = \
src/AO.o \
@@ -19,12 +19,33 @@ OBJS = \
src/main.o \
src/wx_trackball.o \
vcg/wrap/gui/trackball.o \
- vcg/wrap/gui/trackmode.o
+ vcg/wrap/gui/trackmode.o \
+ src/progress.o src/MyCanvas.o src/saveSnapDialog.o src/gifSave.o src/pngSave.o
all: qutemol
clean:
- find . -name "*.o" | xargs rm
+ rm -f $(OBJS) qutemol
qutemol: $(OBJS)
$(CXX) -o qutemol $(CFLAGS) $(OBJS) $(LIBS)
+
+src/AO.o: src/AO.cpp
+src/AOgpu.o: src/AOgpu.cpp
+src/AtomColor.o: src/AtomColor.cpp
+src/CgUtil.o: src/CgUtil.cpp
+src/Common.o: src/Common.cpp
+src/HardSettings.o: src/HardSettings.cpp
+src/Mol.o: src/Mol.cpp
+src/MyTab.o: src/MyTab.cpp
+src/Sampling.o: src/Sampling.cpp
+src/ShadowMap.o: src/ShadowMap.cpp
+src/main.o: src/main.cpp
+src/wx_trackball.o: src/wx_trackball.cpp
+vcg/wrap/gui/trackball.o: vcg/wrap/gui/trackball.cpp
+vcg/wrap/gui/trackmode.o: vcg/wrap/gui/trackmode.cpp
+src/progress.o: src/progress.cpp
+src/MyCanvas.o: src/MyCanvas.cpp
+src/saveSnapDialog.o: src/saveSnapDialog.cpp
+src/gifSave.o: src/gifSave.cpp
+src/pngSave.o: src/pngSave.cpp
diff --git a/qutemol.cfg b/qutemol.cfg
new file mode 100644
index 0000000..10abe74
#! /bin/sh /usr/share/dpatch/dpatch-run
## qutemol.cfg.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- /dev/null
+++ b/qutemol.cfg
@@ -0,0 +1,99 @@
+TSIZE = 1024
+ \\ favoured texture size for molecule
+ \\ (default: 1024 )
+
+MAX_TSIZE = 2048
+ \\ maximal texture size (used when molecule too large for TSIZE)
+ \\ (default: 2048 )
+
+N_VIEW_DIR = 128
+ \\ number of view directions ussed in AO computation
+ \\ (default: 128 )
+
+SHADOWMAP_SIZE = 1024
+ \\ texture size for shadowmap
+ \\ (default: 1024 )
+
+AOSM_SIZE = 256
+ \\ texture size for shadowmmaps for AO computation
+ \\ (default: 256 )
+
+MOVING_QUALITY = 100
+ \\ Quality of image on screen when molecole moves (between 50..200)
+ \\ (default: 100 )
+
+STILL_QUALITY = 200
+ \\ Quality of image on screen when molecole is still (between 50..200)
+ \\ (default: 200 )
+
+doubleSM = 1
+ \\ if 1, use double ShadomMap optimization (two way lights)
+ \\ (default: 1 )
+
+NVIDIA_PATCH = 0
+ \\ use 1 - *AND* disable doubleSM - to patch a bug reported on some Nvidia cards (warning: lowers visual quality!)
+ \\ (default: 0 )
+
+SNAP_SIZE = 1024
+ \\ snapshots resolution (per side)
+ \\ (default: 1024 )
+
+SNAP_ANTIALIAS = 1
+ \\ if 1, antialias exported snapshots
+ \\ (default: 1 )
+
+PNG_TRANSPARENT = 0
+ \\ if 1, save PNG images with tranparent background
+ \\ (default: 0 )
+
+GIF_SNAP_SIZE = 256
+ \\ resolution of exported GIF animations
+ \\ (default: 256 )
+
+ \\ PARAMETERS FOR GIF ANIMATION
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
+
+GIF_INITIAL_PAUSE = 0
+ \\ initial pause in msec before each animation loop
+ \\ (default: 0 )
+
+GIF_ANIMATION_MODE = 0
+ \\ if 0: full rotation. If 1: inspection mode (rotation around current viewpoint). If 2: six-views show.
+ \\ (default: 0 )
+
+GIF_ROT_N_FRAMES = 60
+ \\ number of frames of exported GIF animations (for full rotation)
+ \\ (default: 60 )
+
+GIF_GIF_ROT_MSEC = 3000
+ \\ total duration in msec of GIF animations loop (for full rotation)
+ \\ (default: 3000 )
+
+GIF_GIF_ROT_SIDEVIEW_ANGLE = 10
+ \\ angle (in -45 +45). If 0, perfect side rotation; if >0, look from above; if <0, look from below (for full rotation)
+ \\ (default: 10 )
+
+GIF_INSP_N_FRAMES = 60
+ \\ number of frames of exported GIF animations (for inspections)
+ \\ (default: 60 )
+
+GIF_INSP_MSEC = 3000
+ \\ total duration in msec of GIF animations loop (for inspections)
+ \\ (default: 3000 )
+
+GIF_INSP_ANGLE = 10
+ \\ in (10..45). Animation is an inspection around current view point (for inspections)
+ \\ (default: 10 )
+
+GIF_6SIDES_N_FRAMES = 10
+ \\ number of frames of exported GIF animations (for six-views show)
+ \\ (default: 10 )
+
+GIF_6SIDES_MSEC = 400
+ \\ duration in msec of each face shift (for six-views show)
+ \\ (default: 400 )
+
+GIF_6SIDES_PAUSE = 1000
+ \\ pause in msec after each face shift (for six-views show)
+ \\ (default: 1000 )
+
diff --git a/src/AO.cpp b/src/AO.cpp
index 26b0f0b..6f6f579 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## ao.cpp.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/AO.cpp
+++ b/src/AO.cpp
@@ -109,7 +109,7 @@ AO::AO( Point3f _dir, Mol &m) {
buf.resize(target*target,infty);
- for (int i=0; i<m.atom.size()-1; i++) {
+ for (int i=0; i < (int)m.atom.size()-1; i++) {
QAtom &a=m.atom[i];
CheckAtom(a);
RenderSphere( a.trp[0], a.trp[1], a.trp[2], a.trr );
diff --git a/src/AO.h b/src/AO.h
index 2df500b..d5512a4 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## ao.h.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/AO.h
+++ b/src/AO.h
@@ -12,7 +12,7 @@ class AO{
inline int index(int x, int y){
int res=x+bufx*y;
if (res<0) res=0;
- if (res>=buf.size()) res=buf.size()-1;
+ if (res >= (int)buf.size()) res=buf.size()-1;
return res;
//return x+bufx*y;
}
diff --git a/src/AOgpu.cpp b/src/AOgpu.cpp
index f569555..8b63a1d 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## aogpu.cpp.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/AOgpu.cpp
+++ b/src/AOgpu.cpp
@@ -51,7 +51,7 @@ void AOgpu::OpenGLSnap()
snapy = vp[3];
//Create(tx,ty);
- if (snap.size()!=snapx*snapy+1) snap.resize(snapx*snapy+1);
+ if ((int)snap.size()!=snapx*snapy+1) snap.resize(snapx*snapy+1);
GLenum mtype = 0;
@@ -117,11 +117,11 @@ AOgpu::AOgpu( Point3f _dir, Mol &m) {
OpenGLSnap();
// interpret spanshot
- int k=0,h=0;
+ //int k=0,h=0;
//int* snapi=(int*)(&snap[0]);
int max=snapy*snapx;
- int maxt=sum.size();
+ //int maxt=sum.size();
/*static*/
// vector<int> found(sum.size(), false );
@@ -140,7 +140,7 @@ AOgpu::AOgpu( Point3f _dir, Mol &m) {
- if (sum[ snap[i]&0x00ffffff ]>>24 !=div) {
+ if (sum[ snap[i]&0x00ffffff ]>>24 != (int)div) {
sum[ snap[i]&0x00ffffff ] =
(sum[ snap[i]&0x00ffffff ]+(snap[i]>>24))&0x00ffffff | (div<<24);
//printf("[%d]",snap[i]>>24);
@@ -196,7 +196,7 @@ void AOgpu::Reset(Mol &m){
//ReloadTexture(fakeTexture, false);
div=0;
- if (sum.size()!=hardSettings.TSIZE*hardSettings.TSIZE) {
+ if ((int)sum.size()!=hardSettings.TSIZE*hardSettings.TSIZE) {
sum.resize(hardSettings.TSIZE*hardSettings.TSIZE,0);
} else {
sum.clear();
@@ -218,7 +218,7 @@ inline unsigned int BitCount(unsigned int x){
}
void AOgpu::GetFinalTexture(vector<Byte> &text,Mol &m){
- int k=0,i=0;
+ //int k=0,i=0;
//m.SmoothTexture( sum, hardSettings.TSIZE );
int maxt=sum.size();
diff --git a/src/AtomColor.cpp b/src/AtomColor.cpp
index 44c6ff8..6c3d9fa 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## atomcolor.cpp.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/AtomColor.cpp
+++ b/src/AtomColor.cpp
@@ -165,7 +165,7 @@ E2C["MT"]= /*[235, 0, 38]*/ 0xFF1493 /* 0xEB0026 */ ;
}
}
-static bool addAtomType(char* namei, int unused, float radius, float radiusC, int r, int g, int b){
+static bool addAtomType(const char* namei, int unused, float radius, float radiusC, int r, int g, int b){
InitTables();
// upperCase(name);
diff --git a/src/CgUtil.cpp b/src/CgUtil.cpp
index 2f880bc..ffd8a4c 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## cgutil.cpp.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/CgUtil.cpp
+++ b/src/CgUtil.cpp
@@ -33,7 +33,7 @@ bool CgUtil::do_use_doubleshadow(){
return ((P_double_shadows) && (can_use_doubleshadow()));
}
-static char* FORMAT="void CgUtil::Set(int K){\nif (K==0){\n P_light_base = %f ;\n P_lighting = %f ;\n P_phong = %f ;\n P_phong_size = %f ;\n P_col_atoms_sat = %f ;\n P_col_atoms_bri = %f ;\n P_texture = %f ;\n P_border_inside = %f ;\n P_border_outside = %f ;\n P_depth_full = %f ;\n P_sem_effect = %d ;\n P_halo_size = %f ;\n P_halo_col = %f ;\n P_halo_str = %f ;\n P_halo_aware = %f ;\n P_fog = %f ;\n P_capping = %d ;\n P_shadowstrenght = %f ;\n P_bg_color_R = %f ;\n P_bg_color_G = %f ;\n P_bg_color_B = %f ;\n auto_normalize = %d ;\n P_double_shadows = %d ;\n P_border_fixed = %d ;\n}\n}";
+static char* FORMAT=(char *)"void CgUtil::Set(int K){\nif (K==0){\n P_light_base = %f ;\n P_lighting = %f ;\n P_phong = %f ;\n P_phong_size = %f ;\n P_col_atoms_sat = %f ;\n P_col_atoms_bri = %f ;\n P_texture = %f ;\n P_border_inside = %f ;\n P_border_outside = %f ;\n P_depth_full = %f ;\n P_sem_effect = %d ;\n P_halo_size = %f ;\n P_halo_col = %f ;\n P_halo_str = %f ;\n P_halo_aware = %f ;\n P_fog = %f ;\n P_capping = %d ;\n P_shadowstrenght = %f ;\n P_bg_color_R = %f ;\n P_bg_color_G = %f ;\n P_bg_color_B = %f ;\n auto_normalize = %d ;\n P_double_shadows = %d ;\n P_border_fixed = %d ;\n}\n}";
bool CgUtil::Load(const char* filename){
FILE *f=fopen(filename, "rt");
@@ -700,7 +700,7 @@ CMP t.z, lighting.z, -t.z, t.z; \n\
if ((!do_use_doubleshadow())&&(P_light_base>0)) {
sprintf(fp,"%s\n\
CMP t.z, lighting.z, 1, t.z; # if light<0, then in shadow \n\
-" ,fp,1.0-P_shadowstrenght);
+" ,fp); //,1.0-P_shadowstrenght); // error here
}
if (P_shadowstrenght<1) {
@@ -789,7 +789,7 @@ LRP t, tmp.x, 1, t; \n\
} else {
if (P_col_atoms_bri<1.0)
{
- sprintf(fp,"%s%s",fp,"MUL res, res, %5.3f;\n", P_col_atoms_bri );
+ sprintf(fp,"%s%s",fp,"MUL res, res, %5.3f;\n"); //, P_col_atoms_bri ); // error here
}
}
@@ -1499,7 +1499,7 @@ MUL t, t, t.z; \n\
MAD t, t, 0.5, 0.5; \n\
MAD t, t, {%5.2f,%5.2f,0,0}, {%5.2f, %5.2f, 0,0}; \n\
MAD t, {%5.2f,%5.2f,0,0}, disp, t; \n\n",
- fp, CSIZE-gap*2.0, CSIZE-gap*2.0, gap, gap, CSIZE, CSIZE );
+ fp, CSIZE-gap*2.0, CSIZE-gap*2.0, gap, gap, (double)CSIZE, (double)CSIZE );
else sprintf(fp, "%s\n\n\
## TEXTURING OCTAMAP STYLE \n\
diff --git a/src/Common.cpp b/src/Common.cpp
index 8475861..1d1d604 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## common.cpp.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/Common.cpp
+++ b/src/Common.cpp
@@ -136,8 +136,8 @@ void drawFrame(); // def later...
Byte* GetSnapshot(int sx, int sy, bool alpha){
- static uint textureSnap = 666;
- static uint frameSnap;
+ //static uint textureSnap = 666;
+ //static uint frameSnap;
// set offline rendering
mainCanvas.RedirectToMemory();
@@ -448,7 +448,7 @@ void Mol::DrawHalos(){
);
glBegin(GL_QUADS);
- for (int i=0; i<atom.size(); i++) atom[i].DrawHalo();
+ for (int i=0; i < (int)atom.size(); i++) atom[i].DrawHalo();
glEnd();
/*
@@ -496,7 +496,7 @@ void Mol::DrawShadowmap(bool invert){
shadowSettings.BindShaders();
glBegin(GL_QUADS);
- for (int i=0; i<atom.size(); i++) atom[i].DrawShadowmap();
+ for (int i=0; i < (int)atom.size(); i++) atom[i].DrawShadowmap();
glEnd();
if (sticks) {
@@ -507,7 +507,7 @@ void Mol::DrawShadowmap(bool invert){
glBegin(GL_QUADS);
- for (int i=0; i<bond.size(); i++) bond[i].DrawShadowmap();
+ for (int i=0; i < (int)bond.size(); i++) bond[i].DrawShadowmap();
glEnd();
}
glPopMatrix();
@@ -559,7 +559,7 @@ void Mol::Draw(){
if (draw_balls) {
if (draw_wireframe_balls) {
glDisable(GL_FRAGMENT_PROGRAM_ARB);
- for (int i=0; i<atom.size(); i++) {
+ for (int i=0; i < (int)atom.size(); i++) {
glColor3f(0,0,1);
glBegin(GL_LINE_LOOP);
atom[i].Draw();
@@ -571,7 +571,7 @@ void Mol::Draw(){
//if (DL_atoms==666) glGenD
glBegin(GL_QUADS);
- for (int i=0; i<atom.size(); i++) atom[i].Draw();
+ for (int i=0; i < (int)atom.size(); i++) atom[i].Draw();
glEnd();
glDisable(GL_VERTEX_PROGRAM_ARB);
@@ -604,7 +604,7 @@ void Mol::Draw(){
glColor3f(1,1,1);
if (draw_wireframe_sticks) {
glDisable(GL_FRAGMENT_PROGRAM_ARB);
- for (int i=0; i<bond.size(); i++) {
+ for (int i=0; i < (int)bond.size(); i++) {
glColor3f(0,0.6,0.3);
glBegin(GL_LINE_LOOP);
bond[i].Draw();
@@ -613,7 +613,7 @@ void Mol::Draw(){
}
else {
glBegin(GL_QUADS);
- for (int i=0; i<bond.size(); i++) bond[i].Draw();
+ for (int i=0; i < (int)bond.size(); i++) bond[i].Draw();
glEnd();
}
cgSettings.BindShaders();
@@ -703,12 +703,12 @@ bool Mol::DoingAO(){
if (!ready) return false;
if (cgSettings.P_texture==0) return false;
if (DirV.size()==0) return true;
- return AOdoneLvl<DirV.size();
+ return AOdoneLvl< (int)DirV.size();
}
bool Mol::DecentAO(){
float k=1;
- if (AOdoneLvl>=DirV.size()) return true;
+ if (AOdoneLvl >= (int)DirV.size()) return true;
if (atom.size()<10) return (AOdoneLvl>6*k);
if (atom.size()<100) return (AOdoneLvl>4*k);
if (atom.size()<1000) return (AOdoneLvl>2*k);
@@ -751,15 +751,15 @@ void Mol::PrepareAOstart(){
}
// for testing purposes
-bool Mol::PrepareAOSingleView(){
+void Mol::PrepareAOSingleView(){
static int i=0;
PrepareAOstart();
AOgpu2::Bind();
AOgpu2 ao(DirV[i], *this, 4 );
- i++; if (i>DirV.size()) i=0;
+ i++; if (i > (int)DirV.size()) i=0;
AOgpu2::UnBind();
AOdoneLvl=DirV.size();
-}
+}
bool Mol::PrepareAOstep(int nsteps){
@@ -772,7 +772,7 @@ bool Mol::PrepareAOstep(int nsteps){
AOdoneLvl++;
- return (AOdoneLvl>=DirV.size()) ;
+ return (AOdoneLvl >= (int)DirV.size()) ;
}
void Mol::PrepareAOallAtOnce(){
@@ -786,12 +786,12 @@ void Mol::PrepareAOallAtOnce(){
//refresh();
FILE *f = fopen("res.txt", "w");
- long int w=TakeTime(f,"sampled");
+ long int w=TakeTime(f, (char *)"sampled");
- fprintf(f," %d views done in %d msec (%.2f views x sec), with %d atoms & %d sticks.\n",
- DirV.size(), w,
- DirV.size()*1000.0/w, this->atom.size(),
- this->sticks?(this->bond.size()):0 );
+ fprintf(f," %d views done in %ld msec (%.2f views x sec), with %d atoms & %d sticks.\n",
+ (int)DirV.size(), w,
+ (int)DirV.size()*1000.0/w, (int)this->atom.size(),
+ (int)(this->sticks?(this->bond.size()):0) );
fclose(f);
AOready=true;
@@ -822,7 +822,7 @@ Point3f getDirFromTrackball(vcg::Trackball &tb){
tb.GetView();
tb.Apply(false);
- float pos[4]={0.0f,0.0f,-1.0f,0.0f};
+ //float pos[4]={0.0f,0.0f,-1.0f,0.0f};
float d[16];
glGetFloatv(GL_MODELVIEW_MATRIX,d);
glPopMatrix();
diff --git a/src/CubeMapSamp.h b/src/CubeMapSamp.h
index 5c19d8e..1290b9d 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## cubemapsamp.h.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/CubeMapSamp.h
+++ b/src/CubeMapSamp.h
@@ -14,7 +14,7 @@ public:
static void Transform(Point3f ax, Point3f ay, Point3f az){
- for (int i=0; i<dir.size(); i++) {
+ for (int i=0; i < (int)dir.size(); i++) {
dirrot[i][0]=dir[i]*ax;
dirrot[i][1]=dir[i]*ay;
dirrot[i][2]=dir[i]*az;
@@ -61,7 +61,7 @@ public:
for (int x=0; x<size*3; x++)
{
int k=(x+tx+(y+ty)*s)*3;
- int i= map[Index( x , y )];
+ //int i= map[Index( x , y )];
/*Byte col=0, colr=255;
if (div[i]>0) { col=(Byte)(sum[i]/div[i]*255); colr=128; }
t[k++]= colr;
diff --git a/src/HardSettings.cpp b/src/HardSettings.cpp
index ab38145..662fd56 100644
#! /bin/sh /usr/share/dpatch/dpatch-run
## hardsettings.cpp.dpatch by Morten Kjeldgaard <mok@bioxray.au.dk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: modification to source code
@DPATCH@
--- a/src/HardSettings.cpp
+++ b/src/HardSettings.cpp
@@ -50,8 +50,7 @@ void HardSettings::SetDefaults(){
};
-
-static char* names[NNAMES]={
+static const char* names[NNAMES]={
"TSIZE",
"MAX_TSIZE",
"N_VIEW_DIR",
@@ -122,7 +121,7 @@ HardSettings::HardSettings(){
}
-static char* comments[NNAMES]={
+static const char* comments[NNAMES]={
"favoured texture size for molecule",
"maximal texture size (used when molecule too large for TSIZE)",
"number of view directions ussed in AO computation",
@@ -158,8 +157,13 @@ static char* comments[NNAMES]={
-bool HardSettings::Load(char *fn){
- FILE *f=fopen(fn,"rt");
+bool HardSettings::Load(const char *fn){
+ char buf[512];
+ strcpy(buf, PKGDATADIR);
+ if (buf[strlen(buf)-1] != '/') {
+ strcat(buf,"/");
+ }
+ FILE *f=fopen(strcat(buf,fn),"rt");
bool present[NNAMES];
for (int i=0; i<NNAMES; i++) present[i]=false;
@@ -169,7 +173,7 @@ bool HardSettings::Load(char *fn){
if (!f) return false;
char token[255];