Index: trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vr3d.h
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vr3d.h	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vr3d.h	(revision 2824)
@@ -1,43 +1,9 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#pragma once
-
-#ifdef WIN32
-#pragma pointers_to_members(full_generality, single_inheritance)
-#endif
+#ifndef VR3D_H
+#define VR3D_H
 
 #include <list>
 
-#ifndef IMAC
 #include <GL/glew.h>
-#endif 
-
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-#ifndef IMAC
-#include <GL/gl.h>
-#else
-#include <OpenGLES/ES1/gl.h>
-#include <OpenGLES/ES1/glext.h>
-#endif
-
-#ifdef _WIN32
-//#include <windows.h>
-
-#ifdef VR3DDLLEXPORT
-#	define Vr3DExport __declspec(dllexport)
-#   define EXPIMP_TEMPLATE
-#else
-#	define Vr3DExport __declspec(dllimport)
-#   define EXPIMP_TEMPLATE extern
-#endif 
-
-#else
-#	define Vr3DExport
-#endif 
-
-
-//#include <vr3d/vr3dClassIDs.h>
 
 #ifdef __cplusplus
@@ -45,19 +11,17 @@
 #endif
 
-void Vr3DExport vrInitializeTimeStamp();
+void vrInitializeTimeStamp();
 
-float Vr3DExport vrGetTimeStamp();
+float vrGetTimeStamp();
 
-void Vr3DExport vrUpdateTimeStamp();
+void vrUpdateTimeStamp();
 
+void vrInit();
 
-void Vr3DExport vrInit();
-
-void Vr3DExport vrExit();
+void vrExit();
 
 #ifdef __cplusplus
-
-class vrTransform;
-typedef std::list<vrTransform*> vrPath;
 }
 #endif
+
+#endif
Index: trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrEnums.h
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrEnums.h	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrEnums.h	(revision 2824)
@@ -1,4 +1,5 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#pragma once
+#ifndef VRENUMS_H
+#define VRENUMS_H
 
 #include <vr3d/vr3d.h>
@@ -9,54 +10,39 @@
 
 enum COLORFORMAT {
-    CF_LUMINANCE = GL_LUMINANCE, /*< GL_LIMINANCE */
-
-#ifndef OPENGLES
-    CF_RGB8 = GL_RGB8, /*< GL_RGB8 */
+    CF_LUMINANCE = GL_LUMINANCE,
+    CF_RGB8 = GL_RGB8,
     CF_FLOAT_RGBA32 = GL_FLOAT_RGBA32_NV,
     CF_DEPTH_COMPONENT = GL_DEPTH_COMPONENT,
-#endif
-    CF_RGB = GL_RGB,            /*< GL_UNSIGNED_BYTE */
-    CF_RGBA = GL_RGBA,          /*< GL_FLOAT */
+    CF_RGB = GL_RGB,
+    CF_RGBA = GL_RGBA,
 };
 
 enum DATATYPE {
-    DT_UBYTE = GL_UNSIGNED_BYTE,    /*< GL_UNSIGNED_BYTE */
-    DT_FLOAT = GL_FLOAT,            /*< GL_FLOAT */
-#ifndef OPENGLES
-    DT_UINT = GL_UNSIGNED_INT,  /*< GL_UNSIGNED_INT */
-    DT_INT = GL_INT, /*< GL_INT */
-	DT_DEPTH_COMPONENT = GL_DEPTH_COMPONENT,
-	DT_DEPTH_COMPONENT32F = GL_DEPTH_COMPONENT32F_NV,
-#endif
+    DT_UBYTE = GL_UNSIGNED_BYTE,
+    DT_FLOAT = GL_FLOAT,
+    DT_UINT = GL_UNSIGNED_INT,
+    DT_INT = GL_INT,
+    DT_DEPTH_COMPONENT = GL_DEPTH_COMPONENT,
+    DT_DEPTH_COMPONENT32F = GL_DEPTH_COMPONENT32F_NV,
 };
 
-
 enum TEXFILTER {
-    TF_NEAREST = GL_NEAREST,        /*< GL_NEAREST */
-    TF_LINEAR = GL_LINEAR,          /*< GL_LINEAR */
+    TF_NEAREST = GL_NEAREST,
+    TF_LINEAR = GL_LINEAR,
 };
 
 enum TEXTARGET {
-#ifndef OPENGLES
-    TT_TEXTURE_1D = GL_TEXTURE_1D,  /*< R2_TEXTURE_1D */
-#endif
-    TT_TEXTURE_2D = GL_TEXTURE_2D,  /*< GL_TEXTURE_2D */
-#ifndef OPENGLES
-    TT_TEXTURE_RECTANGLE = GL_TEXTURE_RECTANGLE_NV, /*< GL_TEXTURE_RECTANGLE_NV */
-    TT_TEXTURE_3D = GL_TEXTURE_3D,  /*< GL_TEXTURE_3D */
-#endif
-
+    TT_TEXTURE_1D = GL_TEXTURE_1D,
+    TT_TEXTURE_2D = GL_TEXTURE_2D,
+    TT_TEXTURE_RECTANGLE = GL_TEXTURE_RECTANGLE_NV,
+    TT_TEXTURE_3D = GL_TEXTURE_3D,
 };
 
 enum TEXWRAP {
-#ifndef OPENGLES
-    TW_CLAMP = GL_CLAMP,                    /*< GL_CLAMP */
-#endif
-    TW_CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE,    /*< GL_CLAMP_TO_EDGE */
-    TW_REPEAT = GL_REPEAT,                  /*< GL_REPEAT */
-#ifndef OPENGLES
-    TW_MIRROR = GL_MIRRORED_REPEAT,                  /*< GL_MIRROR */
-#endif
+    TW_CLAMP = GL_CLAMP,
+    TW_CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE,
+    TW_REPEAT = GL_REPEAT,
+    TW_MIRROR = GL_MIRRORED_REPEAT,
 };
 
-
+#endif
Index: trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture.h
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture.h	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture.h	(revision 2824)
@@ -1,245 +1,231 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 /**
- * @file vrvrTexture.h
+ * @file vrTexture.h
  * @brief An abtract class for the texture
  * @author Insoo Woo(vrinside@gmail.com)
  * @author PhD research assistants in PURPL at Purdue University  
  */
-
-#pragma once
-
-#ifdef WIN32
-#pragma pointers_to_members(full_generality, single_inheritance)
-#endif
+#ifndef VRTEXTURE_H
+#define VRTEXTURE_H
 
 #include <vr3d/vr3d.h>
 #include <vr3d/vrEnums.h>
 
-class Vr3DExport vrTexture {
-	friend class vrVRMLLoader;
-
-protected :
-	/**
-	 * @brief texture target
-	 * @brief Default value is 0
-	 */
-	TEXTARGET		_target;
-
-	/**
-	 * @brief vrTexture object id. 
-	 * @brief Default value is 0
-	 */
-	unsigned int		_objectID;
-
-	/**
-	 * @brief texture type
-	 * @brief Default value is GL_FLOAT
-	 */
-	DATATYPE		_type;
-
-	/**
-	 * @brief texture format
-	 * @brief Default value is GL_RGBA
-	 */
-	COLORFORMAT	_colorFormat;
-
-    /**
-	 * @brief texture internal format
-	 * @brief Default value is GL_RGBA
-	 */
-	COLORFORMAT	_internalColorFormat;
-
-
-	/**
-	 * @brief min filter
-	 * @brief Default value is R2_LINEAR
-	 */
-	TEXFILTER		_minFilter;
-
-	/**
-	 * @brief mag filter
-	 * @brief Default value is R2_LINEAR
-	 */
-	TEXFILTER		_magFilter;
-
-	/**
-	 * @brief component count
-	 */
-	int			_compCount;
-
-
-public :
-	vrTexture();
-protected :
-	virtual ~vrTexture();
-
-public :
-	/**
-	 * @brief bind texture id
-	 */
-	void bind(int index) const;
-
-	/**
-	 * @brief unbind texture id
-	 */
-	void unbind() const;
-
-	/**
-	 * @brief update pixel data
-	 * @param data pixel data
-	 */
-	virtual void updatePixels(void* data) = 0;
-
-	/**
-	 * @brief retur texture object id
-	 */
-	unsigned int getGraphicsObjectID() const;
-
-	/**
-	 * @brief return texture target
-	 */
-	TEXTARGET getTextureTarget() const;
-
-	/**
-	 * @brief set min filter
-	 */
-	void setMinFilter(TEXFILTER filter);
-
-
-	/**
-	 * @brief set mag filter
-	 */
-	void setMagFilter(TEXFILTER filter);
-
-	/**
-	 * @brief return min filter
-	 */
-	TEXFILTER getMinFilter() const;
-
-	/**
-	 * @brief return mag filter
-	 */
-	TEXFILTER getMagFilter() const;
-
-	/**
-	 * @brief return color format
-	 */
-	COLORFORMAT getColorFormat() const;
-
-	/**
-	 * @brief return data type
-	 */
-	DATATYPE getDataType() const;
-
-	/**
-	 * @brief component count
-	 */
-	int getCompCount() const;
-
+class Vr3DExport vrTexture
+{
+protected:
+    /**
+     * @brief texture target
+     * @brief Default value is 0
+     */
+    TEXTARGET _target;
+
+    /**
+     * @brief vrTexture object id. 
+     * @brief Default value is 0
+     */
+    unsigned int _objectID;
+
+    /**
+     * @brief texture type
+     * @brief Default value is GL_FLOAT
+     */
+    DATATYPE _type;
+
+    /**
+     * @brief texture format
+     * @brief Default value is GL_RGBA
+     */
+    COLORFORMAT _colorFormat;
+
+    /**
+     * @brief texture internal format
+     * @brief Default value is GL_RGBA
+     */
+    COLORFORMAT _internalColorFormat;
+
+
+    /**
+     * @brief min filter
+     * @brief Default value is R2_LINEAR
+     */
+    TEXFILTER _minFilter;
+
+    /**
+     * @brief mag filter
+     * @brief Default value is R2_LINEAR
+     */
+    TEXFILTER _magFilter;
+
+    /**
+     * @brief component count
+     */
+    int _compCount;
+
+public:
+    vrTexture();
+
+protected:
+    virtual ~vrTexture();
+
+public:
+    /**
+     * @brief bind texture id
+     */
+    void bind(int index) const;
+
+    /**
+     * @brief unbind texture id
+     */
+    void unbind() const;
+
+    /**
+     * @brief update pixel data
+     * @param data pixel data
+     */
+    virtual void updatePixels(void* data) = 0;
+
+    /**
+     * @brief retur texture object id
+     */
+    unsigned int getGraphicsObjectID() const;
+
+    /**
+     * @brief return texture target
+     */
+    TEXTARGET getTextureTarget() const;
+
+    /**
+     * @brief set min filter
+     */
+    void setMinFilter(TEXFILTER filter);
+
+    /**
+     * @brief set mag filter
+     */
+    void setMagFilter(TEXFILTER filter);
+
+    /**
+     * @brief return min filter
+     */
+    TEXFILTER getMinFilter() const;
+
+    /**
+     * @brief return mag filter
+     */
+    TEXFILTER getMagFilter() const;
+
+    /**
+     * @brief return color format
+     */
+    COLORFORMAT getColorFormat() const;
+
+    /**
+     * @brief return data type
+     */
+    DATATYPE getDataType() const;
+
+    /**
+     * @brief component count
+     */
+    int getCompCount() const;
 };
 
-
 inline void vrTexture::bind(int index) const
 {
-	glEnable(_target);
-	glActiveTexture(GL_TEXTURE0 + index);
-	glBindTexture(_target, _objectID);
+    glEnable(_target);
+    glActiveTexture(GL_TEXTURE0 + index);
+    glBindTexture(_target, _objectID);
 }
 
 inline void vrTexture::unbind() const
 {
-	glDisable(_target);
+    glDisable(_target);
 }
 
 inline unsigned int vrTexture::getGraphicsObjectID() const
 {
-	return _objectID;
+    return _objectID;
 }
 
 inline TEXTARGET vrTexture::getTextureTarget() const
 {
-	return _target;
+    return _target;
 }
 
 inline void vrTexture::setMinFilter(TEXFILTER filter)
 {
-	_minFilter = filter;
+    _minFilter = filter;
 }
 
 inline void vrTexture::setMagFilter(TEXFILTER filter)
 {
-	_magFilter = filter;
+    _magFilter = filter;
 }
 
 inline TEXFILTER vrTexture::getMinFilter() const
 {
-	return _minFilter;
+    return _minFilter;
 }
 
 inline TEXFILTER vrTexture::getMagFilter() const
 {
-	return _magFilter;
+    return _magFilter;
 }
 
 inline COLORFORMAT vrTexture::getColorFormat() const
 {
-	return _colorFormat;
+    return _colorFormat;
 }
 
 inline DATATYPE vrTexture::getDataType() const
 {
-	return _type;
+    return _type;
 }
 
 inline int vrTexture::getCompCount() const
 {
-	return _compCount;
+    return _compCount;
 }
 
 inline int GetNumComponent(COLORFORMAT format)
 {
-       switch (format)
-       {
-       case CF_LUMINANCE : return 1;
-       case CF_RGB : return 3;
-       case CF_RGBA : return 4;
-       default :
-               //R2Assert(0);
-		   ;
-       }
-       return 0;
+    switch (format) {
+    case CF_LUMINANCE : return 1;
+    case CF_RGB : return 3;
+    case CF_RGBA : return 4;
+    default :
+        ;
+    }
+    return 0;
 }
 
 inline int SizeOf(DATATYPE format)
 {
-       switch (format)
-       {
-       case DT_UBYTE : return sizeof(unsigned char);
-       case DT_FLOAT : return sizeof(float);
-#ifndef OPENGLES
-       //case DT_UINT : return sizeof(unsigned int);
-       //case DT_INT : return sizeof(unsigned int);
+    switch (format) {
+    case DT_UBYTE : return sizeof(unsigned char);
+    case DT_FLOAT : return sizeof(float);
+    //case DT_UINT : return sizeof(unsigned int);
+    //case DT_INT : return sizeof(unsigned int);
+    default :
+        ;
+    }
+    return 0;
+}
+
+inline bool IsPowerOfTwo(int value)
+{
+    return ((value&(value-1))==0);
+}
+
+inline int GetNextPowerOfTwo(int value)
+{
+    int nextPOT = 1;
+    while (nextPOT < value) {
+        nextPOT <<= 1;
+    }
+
+    return nextPOT;
+}
+
 #endif
-       default :
-               //R2Assert(0);
-		   ;
-       }
-       return 0;
-}
-
-inline bool IsPowerOfTwo(int value)
-{
-       return ((value&(value-1))==0);
-}
-
-inline int GetNextPowerOfTwo(int value)
-{
-       int nextPOT = 1;
-       while (nextPOT < value)
-       {
-               nextPOT <<= 1;
-	   }
-
-       return nextPOT;
-}
-
Index: trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture1D.h
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture1D.h	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture1D.h	(revision 2824)
@@ -1,101 +1,103 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#pragma once
+#ifndef VRTEXTURE1D_H
+#define VRTEXTURE1D_H
 
 #include <vr3d/vrEnums.h>
 #include <vr3d/vrTexture.h>
 
-class Vr3DExport vrTexture1D : public vrTexture {
+class Vr3DExport vrTexture1D : public vrTexture
+{
+    /**
+     * @brief Two-dimensional texture width.
+     * @brief Default value is 0
+     */
+    int _width;
 
-	/**
-	 * @brief Two-dimensional texture width.
-	 * @brief Default value is 0
-	 */
-	int			_width;
-
-	/**
-	 * @brief Wrap mode.
-	 * @brief Default value is R2_CLAMP
-	 */
-	TEXWRAP		_wrapS;
+    /**
+     * @brief Wrap mode.
+     * @brief Default value is R2_CLAMP
+     */
+    TEXWRAP _wrapS;
 
 public :
-	/**
-	 * @brief constructuor
-	 */
-	vrTexture1D(bool depth = false);
+    /**
+     * @brief constructuor
+     */
+    vrTexture1D(bool depth = false);
 
-	/** 
-	 * @brief destructor
-	 */
-	~vrTexture1D();
+    /** 
+     * @brief destructor
+     */
+    ~vrTexture1D();
 
-	/**
-	 * @brief get texture size
-	 * @return texture length
-	 */
-	int getWidth() const;
+    /**
+     * @brief get texture size
+     * @return texture length
+     */
+    int getWidth() const;
 
-	/**
-	 * @brief set wrap mode
-	 */
-	void setWrapS(TEXWRAP wrap);
+    /**
+     * @brief set wrap mode
+     */
+    void setWrapS(TEXWRAP wrap);
 
 
-	/**
-	 * @brief set wrap mode
-	 */
-	TEXWRAP getWrapS() const;
-
-	/**
-	 * @brief set texture data
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(COLORFORMAT format, DATATYPE type, int width, void* data);
+    /**
+     * @brief set wrap mode
+     */
+    TEXWRAP getWrapS() const;
 
     /**
-	 * @brief set texture data
-     * @param internalFormat texture internal data format 
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(TEXTARGET target, COLORFORMAT internalFormat, COLORFORMAT format, DATATYPE type, int width, void* data);
+     * @brief set texture data
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(COLORFORMAT format, DATATYPE type, int width, void* data);
 
     /**
-	 * @brief set texture data (NV)
+     * @brief set texture data
+     * @param internalFormat texture internal data format 
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(TEXTARGET target, COLORFORMAT internalFormat,
+                   COLORFORMAT format, DATATYPE type, int width, void *data);
+
+    /**
+     * @brief set texture data (NV)
      * @param internalFormat internal colorformat
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(COLORFORMAT internalFormat, COLORFORMAT format, DATATYPE type, int width, void* data);
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(COLORFORMAT internalFormat, COLORFORMAT format,
+                   DATATYPE type, int width, void *data);
 
-	/**
-	 * @brief update pixel data
-	 * @param data pixel data
-	 */
-	virtual void updatePixels(void* data);
-
+    /**
+     * @brief update pixel data
+     * @param data pixel data
+     */
+    virtual void updatePixels(void *data);
 };
 
 inline int vrTexture1D::getWidth() const
 {
-	return _width;
+    return _width;
 }
 
 inline void vrTexture1D::setWrapS(TEXWRAP wrap)
 {
-	_wrapS = wrap;
+    _wrapS = wrap;
 }
-
 
 inline TEXWRAP vrTexture1D::getWrapS() const
 {
-	return _wrapS;
+    return _wrapS;
 }
 
+#endif
Index: trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture2D.h
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture2D.h	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture2D.h	(revision 2824)
@@ -1,141 +1,147 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#pragma once
+#ifndef VRTEXTURE2D_H
+#define VRTEXTURE2D_H
 
 #include <vr3d/vrEnums.h>
 #include <vr3d/vrTexture.h>
 
-class Vr3DExport vrTexture2D : public vrTexture {
-
-	/**
-	 * @brief Two-dimensional texture width.
-	 * @brief Default value is 0
-	 */
-	int			_width;
-
-	/**
-	 * @brief Two-dimensional texture height.
-	 * @brief Default value is 0
-	 */
-	int			_height;
-
-	/**
-	 * @brief Wrap mode.
-	 * @brief Default value is R2_CLAMP
-	 */
-	TEXWRAP		_wrapS;
-
-	/**
-	 * @brief Wrap mode.
-	 * @brief Default value is R2_CLAMP
-	 */
-	TEXWRAP		_wrapT;
-
-	bool _depthTexture;
-public :
-	/**
-	 * @brief constructuor
-	 */
-	vrTexture2D(bool depth = false);
-
-	/** 
-	 * @brief destructor
-	 */
-	~vrTexture2D();
-
-	/**
-	 * @brief get texture size
-	 * @return texture length
-	 */
-	int getWidth() const;
-
-	/**
-	 * @brief get texture height
-	 * @return texture height
-	 */
-	int getHeight() const;
-
-	/**
-	 * @brief set wrap mode
-	 */
-	void setWrapS(TEXWRAP wrap);
-
-	/*
-	 * @brief set wrap mode
-	 */
-	void setWrapT(TEXWRAP wrap);
-
-	/**
-	 * @brief set wrap mode
-	 */
-	TEXWRAP getWrapS() const;
-
-	/*
-	 * @brief set wrap mode
-	 */
-	TEXWRAP getWrapT() const;
-
-	/**
-	 * @brief set texture data
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(COLORFORMAT format, DATATYPE type, int width, int height, void* data);
+class Vr3DExport vrTexture2D : public vrTexture
+{
+    /**
+     * @brief Two-dimensional texture width.
+     * @brief Default value is 0
+     */
+    int _width;
 
     /**
-	 * @brief set texture data
-     * @param internalFormat texture internal data format 
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(TEXTARGET target, COLORFORMAT internalFormat, COLORFORMAT format, DATATYPE type, int width, int height, void* data);
+     * @brief Two-dimensional texture height.
+     * @brief Default value is 0
+     */
+    int _height;
 
     /**
-	 * @brief set texture data (NV)
+     * @brief Wrap mode.
+     * @brief Default value is R2_CLAMP
+     */
+    TEXWRAP _wrapS;
+
+    /**
+     * @brief Wrap mode.
+     * @brief Default value is R2_CLAMP
+     */
+    TEXWRAP _wrapT;
+
+    bool _depthTexture;
+public:
+    /**
+     * @brief constructuor
+     */
+    vrTexture2D(bool depth = false);
+
+    /** 
+     * @brief destructor
+     */
+    ~vrTexture2D();
+
+    /**
+     * @brief get texture size
+     * @return texture length
+     */
+    int getWidth() const;
+
+    /**
+     * @brief get texture height
+     * @return texture height
+     */
+    int getHeight() const;
+
+    /**
+     * @brief set wrap mode
+     */
+    void setWrapS(TEXWRAP wrap);
+
+    /*
+     * @brief set wrap mode
+     */
+    void setWrapT(TEXWRAP wrap);
+
+    /**
+     * @brief set wrap mode
+     */
+    TEXWRAP getWrapS() const;
+
+    /*
+     * @brief set wrap mode
+     */
+    TEXWRAP getWrapT() const;
+
+    /**
+     * @brief set texture data
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(COLORFORMAT format, DATATYPE type,
+                   int width, int height, void* data);
+
+    /**
+     * @brief set texture data
+     * @param internalFormat texture internal data format 
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(TEXTARGET target, COLORFORMAT internalFormat,
+                   COLORFORMAT format, DATATYPE type, int width, int height, void *data);
+
+    /**
+     * @brief set texture data (NV)
      * @param internalFormat internal colorformat
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(COLORFORMAT internalFormat, COLORFORMAT format, DATATYPE type, int width, int height, void* data);
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(COLORFORMAT internalFormat, COLORFORMAT format,
+                   DATATYPE type, int width, int height, void *data);
 
-	/**
-	 * @brief update pixel data
-	 * @param data pixel data
-	 */
-	virtual void updatePixels(void* data);
+    /**
+     * @brief update pixel data
+     * @param data pixel data
+     */
+    virtual void updatePixels(void *data);
 };
 
 inline int vrTexture2D::getWidth() const
 {
-	return _width;
+    return _width;
 }
 
 inline int vrTexture2D::getHeight() const
 {
-	return _height;
+    return _height;
 }
 
 inline void vrTexture2D::setWrapS(TEXWRAP wrap)
 {
-	_wrapS = wrap;
+    _wrapS = wrap;
 }
 
 inline void vrTexture2D::setWrapT(TEXWRAP wrap)
 {
-	_wrapT = wrap;
+    _wrapT = wrap;
 }
 
 inline TEXWRAP vrTexture2D::getWrapS() const
 {
-	return _wrapS;
+    return _wrapS;
 }
 
 inline TEXWRAP vrTexture2D::getWrapT() const
 {
-	return _wrapT;
+    return _wrapT;
 }
+
+#endif
Index: trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture3D.h
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture3D.h	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture3D.h	(revision 2824)
@@ -1,160 +1,162 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#pragma once
+#ifndef VRTEXTURE3D_H
+#define VRTEXTURE3D_H
 
 #include <vr3d/vrTexture.h>
 
-#ifndef OPENGLES
-
-class Vr3DExport vrTexture3D : public vrTexture {
-
-
-	/**
-	 * @brief Three-dimensional texture width.
-	 * @brief Default value is 0
-	 */
-	int			_width;
-
-	/**
-	 * @brief Three-dimensional texture height.
-	 * @brief Default value is 0
-	 */
-	int			_height;
-
-	/**
-	 * @brief Three-dimensional texture depth.
-	 * @brief Default value is 0
-	 */
-	int			_depth;
-
-	/**
-	 * @brief Wrap mode.
-	 * @brief Default value is R2_CLAMP
-	 */
-	TEXWRAP		_wrapS;
-
-	/**
-	 * @brief Wrap mode.
-	 * @brief Default value is R2_CLAMP
-	 */
-	TEXWRAP		_wrapT;
-public :
-	/**
-	 * @brief constructuor
-	 */
-	vrTexture3D();
-
-	/** 
-	 * @brief destructor
-	 */
-	~vrTexture3D();
-
-	/**
-	 * @brief get texture size
-	 * @return texture length
-	 */
-	int getWidth() const;
-
-	/**
-	 * @brief get texture height
-	 * @return texture height
-	 */
-	int getHeight() const;
-
-	/**
-	 * @brief get texture height
-	 * @return texture depth
-	 */
-	int getDepth() const;
-
-	/**
-	 * @brief set wrap mode
-	 */
-	void setWrapS(TEXWRAP wrap);
-
-	/*
-	 * @brief set wrap mode
-	 */
-	void setWrapT(TEXWRAP wrap);
-
-	/**
-	 * @brief set wrap mode
-	 */
-	TEXWRAP getWrapS() const;
-
-	/*
-	 * @brief set wrap mode
-	 */
-	TEXWRAP getWrapT() const;
-
-	/**
-	 * @brief set texture data
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(COLORFORMAT format, DATATYPE type, int width, int height, int depth, void* data);
+class Vr3DExport vrTexture3D : public vrTexture
+{
+    /**
+     * @brief Three-dimensional texture width.
+     * @brief Default value is 0
+     */
+    int _width;
 
     /**
-	 * @brief set texture data
-     * @param internalFormat texture internal data format 
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(TEXTARGET target, COLORFORMAT internalFormat, COLORFORMAT format, DATATYPE type, int width, int height, int depth, void* data);
+     * @brief Three-dimensional texture height.
+     * @brief Default value is 0
+     */
+    int _height;
 
     /**
-	 * @brief set texture data (NV)
+     * @brief Three-dimensional texture depth.
+     * @brief Default value is 0
+     */
+    int _depth;
+
+    /**
+     * @brief Wrap mode.
+     * @brief Default value is R2_CLAMP
+     */
+    TEXWRAP _wrapS;
+
+    /**
+     * @brief Wrap mode.
+     * @brief Default value is R2_CLAMP
+     */
+    TEXWRAP _wrapT;
+
+public:
+    /**
+     * @brief constructuor
+     */
+    vrTexture3D();
+
+    /** 
+     * @brief destructor
+     */
+    ~vrTexture3D();
+
+    /**
+     * @brief get texture size
+     * @return texture length
+     */
+    int getWidth() const;
+
+    /**
+     * @brief get texture height
+     * @return texture height
+     */
+    int getHeight() const;
+
+    /**
+     * @brief get texture height
+     * @return texture depth
+     */
+    int getDepth() const;
+
+    /**
+     * @brief set wrap mode
+     */
+    void setWrapS(TEXWRAP wrap);
+
+    /*
+     * @brief set wrap mode
+     */
+    void setWrapT(TEXWRAP wrap);
+
+    /**
+     * @brief set wrap mode
+     */
+    TEXWRAP getWrapS() const;
+
+    /*
+     * @brief set wrap mode
+     */
+    TEXWRAP getWrapT() const;
+
+    /**
+     * @brief set texture data
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(COLORFORMAT format, DATATYPE type,
+                   int width, int height, int depth, void *data);
+
+    /**
+     * @brief set texture data
+     * @param internalFormat texture internal data format 
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(TEXTARGET target, COLORFORMAT internalFormat,
+                   COLORFORMAT format, DATATYPE type,
+                   int width, int height, int depth, void *data);
+
+    /**
+     * @brief set texture data (NV)
      * @param internalFormat internal colorformat
-	 * @param format texture data format 
-	 * @param type texture data type 
-	 * @param width texture width
-	 * @param data texture data
-	 */
-	void setPixels(COLORFORMAT internalFormat, COLORFORMAT format, DATATYPE type, int width, int height, int depth, void* data);
+     * @param format texture data format 
+     * @param type texture data type 
+     * @param width texture width
+     * @param data texture data
+     */
+    void setPixels(COLORFORMAT internalFormat, COLORFORMAT format,
+                   DATATYPE type, int width, int height, int depth, void *data);
 
-	/**
-	 * @brief update pixel data
-	 * @param data pixel data
-	 */
-	virtual void updatePixels(void* data);
+    /**
+     * @brief update pixel data
+     * @param data pixel data
+     */
+    virtual void updatePixels(void *data);
 };
-
 
 inline int vrTexture3D::getWidth() const
 {
-	return _width;
+    return _width;
 }
 
 inline int vrTexture3D::getHeight() const
 {
-	return _height;
+    return _height;
 }
 
 inline int vrTexture3D::getDepth() const
 {
-	return _depth;
+    return _depth;
 }
 
 inline void vrTexture3D::setWrapS(TEXWRAP wrap)
 {
-	_wrapS = wrap;
+    _wrapS = wrap;
 }
 
 inline void vrTexture3D::setWrapT(TEXWRAP wrap)
 {
-	_wrapT = wrap;
+    _wrapT = wrap;
 }
 
 inline TEXWRAP vrTexture3D::getWrapS() const
 {
-	return _wrapS;
+    return _wrapS;
 }
 
 inline TEXWRAP vrTexture3D::getWrapT() const
 {
-	return _wrapT;
+    return _wrapT;
 }
 
Index: trunk/packages/vizservers/nanovis/vr3d/vr3d.cpp
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/vr3d.cpp	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/vr3d.cpp	(revision 2824)
@@ -1,46 +1,12 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <vr3d/vr3d.h>
-#ifndef OPENGLES
-#include <GL/glew.h>
-#endif
+
 #include <stdio.h>
-#ifndef WIN32
 #include <sys/time.h>
 #include <time.h>
 #include <stdint.h>
-#endif
 
+#include <vr3d/vr3d.h>
 
-
-
-#ifdef USE_SOUND
-
-/*
-#pragma pack(1)
-typedef struct {
-uint32_t Chunk_ID;
-uint32_t ChunkSize;
-...
-uint16_t AudioFormat;
-...
-} WAV_header_t;
-#pragma pack()
-*/
-
-
-
-int is_big_endian(void) {
-unsigned char test[4] = { 0x12, 0x34, 0x56, 0x78 };
-
-return *((uint32_t *)test) == 0x12345678;
-}
-
-
-#include <al.h>
-#include <alc.h>
-// TBD..
-#include <alut.h>
-#endif
-
+#include <GL/glew.h>
 
 float _currentTime = 0;
@@ -49,115 +15,23 @@
 void vrInitializeTimeStamp()
 {
-#ifdef WIN32
-	_startTime = ::timeGetTime() * 0.001f;
-#else
-	_startTime = (float) clock() / (float) CLOCKS_PER_SEC;
-#endif
+    _startTime = (float)clock() / (float)CLOCKS_PER_SEC;
 }
 
 float vrGetTimeStamp()
 {
-	//return (_currentTime - _startTime) * 10;
-	return (_currentTime - _startTime);
+    return (_currentTime - _startTime);
 }
 
 void vrUpdateTimeStamp()
 {
-#ifdef WIN32
-	_currentTime = ::timeGetTime() * 0.001f;
-#else
-	_currentTime = (float) clock() / (float) CLOCKS_PER_SEC;
-#endif
+    _currentTime = (float)clock() / (float)CLOCKS_PER_SEC;
 }
 
-int initOpenAL(void);
 void vrInit()
 {
-#ifndef OPENGLES
-	::glewInit();
-#endif
-/*
-	if (! glewIsSupported( "GL_EXT_framebuffer_object GL_NV_depth_buffer_float")) {
-        fprintf( stderr, "Error: This program requires the following capabilities\n");
-        fprintf( stderr, "  OpenGL version 2.0 or later\n");
-        fprintf( stderr, "  Support for the GL_EXT_framebuffer_object extension\n");
-        fprintf( stderr, "  Support for the GL_NV_depth_buffer_float extension\n\n");
-        exit(-1);
-    }
-	*/
-
-	initOpenAL();
-	
+    ::glewInit();
 }
-
-int initOpenAL(void)
-{
-#ifdef USE_SOUND
-	alutInit(0, 0);
-	//glGetError();
-	/*
-	ALCcontext *context;
-	ALCdevice *device;
-	const ALCchar *default_device;
-
-	default_device = alcGetString(NULL,
-	ALC_DEFAULT_DEVICE_SPECIFIER);
-
-	printf("using default device: %s\n", default_device);
-
-	if ((device = alcOpenDevice(default_device)) == NULL) {
-		fprintf(stderr, "failed to open sound device\n");
-		return -1;
-	}
-	context = alcCreateContext(device, NULL);
-	alcMakeCurrentContext(context);
-	alcProcessContext(context);
-
-	atexit(atexit_openal);
-
-	// allocate buffers and sources here using alGenBuffers() and alGenSources() 
-
-	alGetError(); 
-	*/
-
-	// Set Listener attributes
-        // Position ... 
-	int error;
-        ALfloat listenerPos[]={0.0,0.0,0.0}; // At the origin
-        ALfloat listenerVel[]={0.0,0.0,0.0}; // The velocity (no doppler here)
-        ALfloat listenerOri[]={0.0,0.0,-1.0, 0.0,1.0,0.0}; // LookAt then Up
-        alListenerfv(AL_POSITION,listenerPos); 
-        if ((error = alGetError()) != AL_NO_ERROR) 
-        { 
-                //DisplayOpenALError("alListenerfv :", error); 
-                printf("alListenerfv : %d\n", error); 
-                return 0;
-        }
-        // Velocity ... 
-        alListenerfv(AL_VELOCITY,listenerVel); 
-        if ((error = alGetError()) != AL_NO_ERROR) 
-        { 
-                //DisplayOpenALError("alListenerfv :", error); 
-                printf("alListenerfv :%d\n", error); 
-                return 0;
-        }
-        // Orientation ... 
-        alListenerfv(AL_ORIENTATION,listenerOri); 
-        if ((error = alGetError()) != AL_NO_ERROR) 
-        { 
-                //DisplayOpenALError("alListenerfv :", error); 
-                printf("alListenerfv :%d\n", error); 
-                return 0;
-        }
-#endif
-
-	return 0;
-}
-
 
 void vrExit()
 {
-#ifdef USE_SOUND
-	alutExit();
-#endif
 }
Index: trunk/packages/vizservers/nanovis/vr3d/vrTexture.cpp
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/vrTexture.cpp	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/vrTexture.cpp	(revision 2824)
@@ -1,20 +1,19 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+
 #include <vr3d/vrTexture.h>
 
-vrTexture::vrTexture()
-: 
-  _objectID(0), 
-  _type(DT_FLOAT), 
-  _colorFormat(CF_RGBA), 
-  _internalColorFormat(CF_RGBA),
-  _minFilter(TF_LINEAR), 
-  _magFilter(TF_LINEAR),
-  _compCount(4)
+vrTexture::vrTexture() :
+    _objectID(0), 
+    _type(DT_FLOAT), 
+    _colorFormat(CF_RGBA), 
+    _internalColorFormat(CF_RGBA),
+    _minFilter(TF_LINEAR), 
+    _magFilter(TF_LINEAR),
+    _compCount(4)
 {
 }
 
-
 vrTexture::~vrTexture()
 {
-	::glDeleteTextures(1, &_objectID);
+    ::glDeleteTextures(1, &_objectID);
 }
Index: trunk/packages/vizservers/nanovis/vr3d/vrTexture1D.cpp
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/vrTexture1D.cpp	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/vrTexture1D.cpp	(revision 2824)
@@ -15,10 +15,9 @@
 #endif
 
-
-vrTexture1D::vrTexture1D(bool depth)
-: _width(0)
+vrTexture1D::vrTexture1D(bool depth):
+    _width(0)
 {
-	_target = TT_TEXTURE_1D;
-	_wrapS =TW_CLAMP_TO_EDGE;
+    _target = TT_TEXTURE_1D;
+    _wrapS = TW_CLAMP_TO_EDGE;
 }
 
@@ -27,45 +26,44 @@
 }
 
-void vrTexture1D::setPixels(COLORFORMAT colorFormat, DATATYPE type, int width, void* data)
-
+void vrTexture1D::setPixels(COLORFORMAT colorFormat, DATATYPE type,
+                            int width, void *data)
 {
     setPixels(TT_TEXTURE_1D, colorFormat,  colorFormat, type, width, data);
 }
 
-void vrTexture1D::setPixels(TEXTARGET target,  COLORFORMAT internalColorFormat, COLORFORMAT colorFormat, DATATYPE type, int width, void* data)
+void vrTexture1D::setPixels(TEXTARGET target,  COLORFORMAT internalColorFormat,
+                            COLORFORMAT colorFormat, DATATYPE type,
+                            int width, void* data)
 {
-	_target = target;
-	_width = width;
-	_type = type;
-	_internalColorFormat = internalColorFormat;
-	_colorFormat = colorFormat;
-	_compCount = GetNumComponent(_colorFormat);
+    _target = target;
+    _width = width;
+    _type = type;
+    _internalColorFormat = internalColorFormat;
+    _colorFormat = colorFormat;
+    _compCount = GetNumComponent(_colorFormat);
 
-	if (_objectID)
+    if (_objectID)
 	{
-		glDeleteTextures(1, &_objectID);
+            glDeleteTextures(1, &_objectID);
 	}
 
-	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glGenTextures(1, &_objectID);
-	glBindTexture(_target, _objectID);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glGenTextures(1, &_objectID);
+    glBindTexture(_target, _objectID);
 
-	glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
-	glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
-	glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
+    glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
+    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
+    glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
 
-	glTexImage1D(_target, 0, _internalColorFormat, _width, 0, _colorFormat, _type, data);
-
-	
+    glTexImage1D(_target, 0, _internalColorFormat, _width, 0, _colorFormat, _type, data);
 }
 
-void vrTexture1D::updatePixels(void* data)
+void vrTexture1D::updatePixels(void *data)
 {
-	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glBindTexture(_target, _objectID);
-	glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
-	glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
-	glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
-	glTexImage1D(_target, 0, _internalColorFormat, _width, 0, _colorFormat, _type, data);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glBindTexture(_target, _objectID);
+    glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
+    glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
+    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
+    glTexImage1D(_target, 0, _internalColorFormat, _width, 0, _colorFormat, _type, data);
 }
-
Index: trunk/packages/vizservers/nanovis/vr3d/vrTexture2D.cpp
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/vrTexture2D.cpp	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/vrTexture2D.cpp	(revision 2824)
@@ -1,8 +1,9 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <vr3d/vrTexture2D.h>
 
 #include <string.h>
 #include <math.h>
-#include <valarray> 
+#include <valarray>
+
+#include <vr3d/vrTexture2D.h>
 
 #ifdef _WIN32
@@ -15,11 +16,11 @@
 #endif
 
-
-vrTexture2D::vrTexture2D(bool depth)
-: _width(0), _depthTexture(depth)
+vrTexture2D::vrTexture2D(bool depth) :
+    _width(0),
+    _depthTexture(depth)
 {
-	_target = TT_TEXTURE_2D;
-	_wrapT = TW_CLAMP_TO_EDGE;
-	_wrapS =TW_CLAMP_TO_EDGE;
+    _target = TT_TEXTURE_2D;
+    _wrapT = TW_CLAMP_TO_EDGE;
+    _wrapS =TW_CLAMP_TO_EDGE;
 }
 
@@ -28,5 +29,6 @@
 }
 
-void vrTexture2D::setPixels(COLORFORMAT colorFormat, DATATYPE type, int width, int height, void* data)
+void vrTexture2D::setPixels(COLORFORMAT colorFormat, DATATYPE type,
+                            int width, int height, void *data)
 
 {
@@ -34,80 +36,70 @@
 #ifndef OPENGLES
     if ((pow(2.0f, (float)log2(width)) != width) && 
-		(pow(2.0f, (float)log2(height)) != height))
-	{
-		if (type == DT_FLOAT)
-		{
-			target = TT_TEXTURE_RECTANGLE;
-		}
-		else
-		{
-			target = TT_TEXTURE_2D;
-		}
-	}
-	else
-	{
-		target = TT_TEXTURE_2D;
-	}
+        (pow(2.0f, (float)log2(height)) != height)) {
+        if (type == DT_FLOAT) {
+            target = TT_TEXTURE_RECTANGLE;
+        } else {
+            target = TT_TEXTURE_2D;
+        }
+    } else {
+        target = TT_TEXTURE_2D;
+    }
 #else
-	target = TT_TEXTURE_2D;
+    target = TT_TEXTURE_2D;
 #endif
 
-    setPixels(target, colorFormat,  colorFormat, type, width, height, data);
+    setPixels(target, colorFormat, colorFormat, type, width, height, data);
 }
 
-void vrTexture2D::setPixels(TEXTARGET target,  COLORFORMAT internalColorFormat, COLORFORMAT colorFormat, DATATYPE type, int width, int height, void* data)
+void vrTexture2D::setPixels(TEXTARGET target,
+                            COLORFORMAT internalColorFormat,
+                            COLORFORMAT colorFormat,
+                            DATATYPE type, int width, int height, void* data)
 {
     _target = target;
-	_width = width;
-	_height = height;
-	_type = type;
+    _width = width;
+    _height = height;
+    _type = type;
     _internalColorFormat = internalColorFormat;
-	_colorFormat = colorFormat;
-	_compCount = GetNumComponent(_colorFormat);
+    _colorFormat = colorFormat;
+    _compCount = GetNumComponent(_colorFormat);
 
-	if (_objectID)
-	{
-		glDeleteTextures(1, &_objectID);
-	}
+    if (_objectID) {
+        glDeleteTextures(1, &_objectID);
+    }
 
-	//glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glGenTextures(1, &_objectID);
-	glBindTexture(_target, _objectID);
-	glTexImage2D(_target, 0, _internalColorFormat, _width, _height, 0, _colorFormat, _type, data);
+    //glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glGenTextures(1, &_objectID);
+    glBindTexture(_target, _objectID);
+    glTexImage2D(_target, 0, _internalColorFormat, _width, _height, 0, _colorFormat, _type, data);
     glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
-	glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
+    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
 	
-	// TBD...
-#ifndef OPENGLES
-	if (_depthTexture)
-	{
-		//glTexParameteri(_target, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY);
-		glTexParameteri(_target, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
-		
-		glTexParameteri(_target, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
-		glTexParameteri(_target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); 
+    // TBD...
+    if (_depthTexture) {
+        //glTexParameteri(_target, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY);
+        glTexParameteri(_target, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
 
-		//glDrawBuffer(GL_NONE);
-		//glReadBuffer(GL_NONE);
-	}
-#endif
+        glTexParameteri(_target, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
+        glTexParameteri(_target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); 
 
+        //glDrawBuffer(GL_NONE);
+        //glReadBuffer(GL_NONE);
+    }
 	
-	//TBD..
-	glTexParameterf(_target, GL_TEXTURE_WRAP_S, _wrapS);
-	glTexParameterf(_target, GL_TEXTURE_WRAP_T, _wrapT);
-
-	
+    //TBD..
+    glTexParameterf(_target, GL_TEXTURE_WRAP_S, _wrapS);
+    glTexParameterf(_target, GL_TEXTURE_WRAP_T, _wrapT);
 }
 
-void vrTexture2D::updatePixels(void* data)
+void vrTexture2D::updatePixels(void *data)
 {
-	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glBindTexture(_target, _objectID);
-	glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
-	glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapT);
-	glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
-	glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
-	glTexImage2D(_target, 0, _internalColorFormat, _width, _height, 0, _colorFormat, _type, data);
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glBindTexture(_target, _objectID);
+    glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
+    glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapT);
+    glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
+    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
+    glTexImage2D(_target, 0, _internalColorFormat, _width, _height, 0, _colorFormat, _type, data);
 }
 
Index: trunk/packages/vizservers/nanovis/vr3d/vrTexture3D.cpp
===================================================================
--- trunk/packages/vizservers/nanovis/vr3d/vrTexture3D.cpp	(revision 2823)
+++ trunk/packages/vizservers/nanovis/vr3d/vrTexture3D.cpp	(revision 2824)
@@ -1,10 +1,10 @@
 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <vr3d/vrTexture3D.h>
 
 #include <string.h>
 #include <math.h>
-#include <valarray> 
+#include <valarray>
 
-#ifndef OPENGLES
+#include <vr3d/vrTexture3D.h>
+
 #ifdef _WIN32
 inline unsigned int log2(unsigned int x) 
@@ -16,77 +16,63 @@
 #endif
 
-
-vrTexture3D::vrTexture3D()
-: _width(0), _height(0), _depth(0)
+vrTexture3D::vrTexture3D() :
+    _width(0),
+    _height(0),
+    _depth(0)
 {
-	_target = TT_TEXTURE_3D;
-	_wrapT = TW_CLAMP_TO_EDGE;
-	_wrapS =TW_CLAMP_TO_EDGE;
+    _target = TT_TEXTURE_3D;
+    _wrapT = TW_CLAMP_TO_EDGE;
+    _wrapS = TW_CLAMP_TO_EDGE;
 }
 
 vrTexture3D::~vrTexture3D()
 {
-	
 }
 
-void vrTexture3D::setPixels(COLORFORMAT colorFormat, DATATYPE type, int width, int height, int depth, void* data)
+void vrTexture3D::setPixels(COLORFORMAT colorFormat, DATATYPE type,
+                            int width, int height, int depth, void *data)
 {
-    setPixels(TT_TEXTURE_3D, colorFormat,  colorFormat, type, width, height, depth, data);
+    setPixels(TT_TEXTURE_3D, colorFormat, colorFormat, type, width, height, depth, data);
 }
 
-void vrTexture3D::setPixels(TEXTARGET target,  COLORFORMAT internalColorFormat, COLORFORMAT colorFormat, DATATYPE type, int width, int height, int depth, void* data)
+void vrTexture3D::setPixels(TEXTARGET target,
+                            COLORFORMAT internalColorFormat,
+                            COLORFORMAT colorFormat,
+                            DATATYPE type,
+                            int width, int height, int depth, void *data)
 {
     _target = target;
-	_width = width;
-	_height = height;
-	_depth = depth;
-	_type = type;
+    _width = width;
+    _height = height;
+    _depth = depth;
+    _type = type;
     _internalColorFormat = internalColorFormat;
-	_colorFormat = colorFormat;
-	_compCount = GetNumComponent(_colorFormat);
+    _colorFormat = colorFormat;
+    _compCount = GetNumComponent(_colorFormat);
 
-	if (_objectID)
-	{
-		glDeleteTextures(1, &_objectID);
-	}
+    if (_objectID) {
+        glDeleteTextures(1, &_objectID);
+    }
 
-	//glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glGenTextures(1, &_objectID);
-	glBindTexture(_target, _objectID);
-	glTexImage3D(_target, 0, _internalColorFormat, _width, _height, _depth, 0, _colorFormat, _type, data) ;
+    //glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glGenTextures(1, &_objectID);
+    glBindTexture(_target, _objectID);
+    glTexImage3D(_target, 0, _internalColorFormat, _width, _height, _depth, 0, _colorFormat, _type, data) ;
     glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
-	glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
+    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
 	
-	//TBD..
-	glTexParameterf(_target, GL_TEXTURE_WRAP_S, _wrapS);
+    //TBD..
+    glTexParameterf(_target, GL_TEXTURE_WRAP_S, _wrapS);
     glTexParameterf(_target, GL_TEXTURE_WRAP_T, _wrapT);
-
-	
 }
 
 void vrTexture3D::updatePixels(void* data)
 {
-	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-	glBindTexture(_target, _objectID);
-	glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
-	glTexParameteri(_target, GL_TEXTURE_WRAP_T, _wrapT); 
-	glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
-	glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
-	glTexImage3D(_target, 0, _internalColorFormat, _width, _height, _depth, 0, _colorFormat, _type, data);
-	/*
-	glBindTexture(_target, _objectID);
-	glTexSubImage3D(_target, 
-						0,
-						0, 
-						0,
-						0,
-						_width,
-						_height,
-						_depth,
-						_colorFormat,
-						_type,
-						data);
-						*/
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+    glBindTexture(_target, _objectID);
+    glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
+    glTexParameteri(_target, GL_TEXTURE_WRAP_T, _wrapT); 
+    glTexParameteri(_target, GL_TEXTURE_MAG_FILTER, _magFilter);
+    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
+    glTexImage3D(_target, 0, _internalColorFormat, _width, _height, _depth, 0, _colorFormat, _type, data);
 }
-
-#endif
