Changeset 2825 for trunk


Ignore:
Timestamp:
Mar 7, 2012 1:36:28 PM (12 years ago)
Author:
ldelgass
Message:

A few further cleanups on vr3d

Location:
trunk/packages/vizservers/nanovis/vr3d
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture.h

    r2824 r2825  
    1212#include <vr3d/vrEnums.h>
    1313
    14 class Vr3DExport vrTexture
     14class vrTexture
    1515{
    1616protected:
  • trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture1D.h

    r2824 r2825  
    66#include <vr3d/vrTexture.h>
    77
    8 class Vr3DExport vrTexture1D : public vrTexture
     8class vrTexture1D : public vrTexture
    99{
    1010    /**
  • trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture2D.h

    r2824 r2825  
    66#include <vr3d/vrTexture.h>
    77
    8 class Vr3DExport vrTexture2D : public vrTexture
     8class vrTexture2D : public vrTexture
    99{
    1010    /**
  • trunk/packages/vizservers/nanovis/vr3d/include/vr3d/vrTexture3D.h

    r2824 r2825  
    55#include <vr3d/vrTexture.h>
    66
    7 class Vr3DExport vrTexture3D : public vrTexture
     7class vrTexture3D : public vrTexture
    88{
    99    /**
     
    161161}
    162162
    163 #endif 
     163#endif
  • trunk/packages/vizservers/nanovis/vr3d/vr3d.cpp

    r2824 r2825  
    3030void vrInit()
    3131{
    32     ::glewInit();
     32    glewInit();
    3333}
    3434
  • trunk/packages/vizservers/nanovis/vr3d/vrTexture.cpp

    r2824 r2825  
    1616vrTexture::~vrTexture()
    1717{
    18     ::glDeleteTextures(1, &_objectID);
     18    glDeleteTextures(1, &_objectID);
    1919}
  • trunk/packages/vizservers/nanovis/vr3d/vrTexture1D.cpp

    r2824 r2825  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
     2
    23#include <vr3d/vrTexture1D.h>
    3 
    4 #include <string.h>
    5 #include <math.h>
    6 #include <valarray>
    7 
    8 #ifdef _WIN32
    9 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 #endif
    164
    175vrTexture1D::vrTexture1D(bool depth):
     
    4331    _compCount = GetNumComponent(_colorFormat);
    4432
    45     if (_objectID)
    46         {
    47             glDeleteTextures(1, &_objectID);
    48         }
     33    if (_objectID) {
     34        glDeleteTextures(1, &_objectID);
     35    }
    4936
    5037    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
     
    5542    glTexParameteri(_target, GL_TEXTURE_MIN_FILTER, _minFilter);
    5643    glTexParameteri(_target, GL_TEXTURE_WRAP_S, _wrapS);
    57 
    5844    glTexImage1D(_target, 0, _internalColorFormat, _width, 0, _colorFormat, _type, data);
    5945}
  • trunk/packages/vizservers/nanovis/vr3d/vrTexture2D.cpp

    r2824 r2825  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    2 
    3 #include <string.h>
    4 #include <math.h>
    5 #include <valarray>
    62
    73#include <vr3d/vrTexture2D.h>
     
    3127void vrTexture2D::setPixels(COLORFORMAT colorFormat, DATATYPE type,
    3228                            int width, int height, void *data)
    33 
    3429{
    3530    TEXTARGET target;
    36 #ifndef OPENGLES
    3731    if ((pow(2.0f, (float)log2(width)) != width) &&
    3832        (pow(2.0f, (float)log2(height)) != height)) {
     
    4539        target = TT_TEXTURE_2D;
    4640    }
    47 #else
    48     target = TT_TEXTURE_2D;
    49 #endif
    5041
    5142    setPixels(target, colorFormat, colorFormat, type, width, height, data);
     
    5546                            COLORFORMAT internalColorFormat,
    5647                            COLORFORMAT colorFormat,
    57                             DATATYPE type, int width, int height, void* data)
     48                            DATATYPE type,
     49                            int width, int height, void *data)
    5850{
    5951    _target = target;
  • trunk/packages/vizservers/nanovis/vr3d/vrTexture3D.cpp

    r2824 r2825  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22
    3 #include <string.h>
    4 #include <math.h>
    5 #include <valarray>
    6 
    73#include <vr3d/vrTexture3D.h>
    8 
    9 #ifdef _WIN32
    10 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 #endif
    174
    185vrTexture3D::vrTexture3D() :
Note: See TracChangeset for help on using the changeset viewer.