- Timestamp:
- Mar 7, 2012 1:36:28 PM (12 years ago)
- Location:
- trunk/packages/vizservers/nanovis/vr3d
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture.h
r2824 r2825 12 12 #include <vr3d/vrEnums.h> 13 13 14 class Vr3DExportvrTexture14 class vrTexture 15 15 { 16 16 protected: -
trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture1D.h
r2824 r2825 6 6 #include <vr3d/vrTexture.h> 7 7 8 class Vr3DExportvrTexture1D : public vrTexture8 class vrTexture1D : public vrTexture 9 9 { 10 10 /** -
trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture2D.h
r2824 r2825 6 6 #include <vr3d/vrTexture.h> 7 7 8 class Vr3DExportvrTexture2D : public vrTexture8 class vrTexture2D : public vrTexture 9 9 { 10 10 /** -
trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture3D.h
r2824 r2825 5 5 #include <vr3d/vrTexture.h> 6 6 7 class Vr3DExportvrTexture3D : public vrTexture7 class vrTexture3D : public vrTexture 8 8 { 9 9 /** … … 161 161 } 162 162 163 #endif 163 #endif -
trunk/packages/vizservers/nanovis/vr3d/vr3d.cpp
r2824 r2825 30 30 void vrInit() 31 31 { 32 ::glewInit();32 glewInit(); 33 33 } 34 34 -
trunk/packages/vizservers/nanovis/vr3d/vrTexture.cpp
r2824 r2825 16 16 vrTexture::~vrTexture() 17 17 { 18 ::glDeleteTextures(1, &_objectID);18 glDeleteTextures(1, &_objectID); 19 19 } -
trunk/packages/vizservers/nanovis/vr3d/vrTexture1D.cpp
r2824 r2825 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 2 3 #include <vr3d/vrTexture1D.h> 3 4 #include <string.h>5 #include <math.h>6 #include <valarray>7 8 #ifdef _WIN329 inline unsigned int log2(unsigned int x)10 {11 unsigned int i = 0;12 while ( ( x = ( x >> 1 ) ) != 0 ) i++;13 return i;14 }15 #endif16 4 17 5 vrTexture1D::vrTexture1D(bool depth): … … 43 31 _compCount = GetNumComponent(_colorFormat); 44 32 45 if (_objectID) 46 { 47 glDeleteTextures(1, &_objectID); 48 } 33 if (_objectID) { 34 glDeleteTextures(1, &_objectID); 35 } 49 36 50 37 glPixelStorei(GL_UNPACK_ALIGNMENT, 1); … … 55 42 glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter); 56 43 glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS); 57 58 44 glTexImage1D(_target, 0, _internalColorFormat, _width, 0, _colorFormat, _type, data); 59 45 } -
trunk/packages/vizservers/nanovis/vr3d/vrTexture2D.cpp
r2824 r2825 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 3 #include <string.h>4 #include <math.h>5 #include <valarray>6 2 7 3 #include <vr3d/vrTexture2D.h> … … 31 27 void vrTexture2D::setPixels(COLORFORMAT colorFormat, DATATYPE type, 32 28 int width, int height, void *data) 33 34 29 { 35 30 TEXTARGET target; 36 #ifndef OPENGLES37 31 if ((pow(2.0f, (float)log2(width)) != width) && 38 32 (pow(2.0f, (float)log2(height)) != height)) { … … 45 39 target = TT_TEXTURE_2D; 46 40 } 47 #else48 target = TT_TEXTURE_2D;49 #endif50 41 51 42 setPixels(target, colorFormat, colorFormat, type, width, height, data); … … 55 46 COLORFORMAT internalColorFormat, 56 47 COLORFORMAT colorFormat, 57 DATATYPE type, int width, int height, void* data) 48 DATATYPE type, 49 int width, int height, void *data) 58 50 { 59 51 _target = target; -
trunk/packages/vizservers/nanovis/vr3d/vrTexture3D.cpp
r2824 r2825 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 2 3 #include <string.h>4 #include <math.h>5 #include <valarray>6 7 3 #include <vr3d/vrTexture3D.h> 8 9 #ifdef _WIN3210 inline unsigned int log2(unsigned int x)11 {12 unsigned int i = 0;13 while ( ( x = ( x >> 1 ) ) != 0 ) i++;14 return i;15 }16 #endif17 4 18 5 vrTexture3D::vrTexture3D() :
Note: See TracChangeset
for help on using the changeset viewer.