Ignore:
Timestamp:
Mar 9, 2012 10:12:14 AM (8 years ago)
Author:
ldelgass
Message:

Refactor texture classes, misc. cleanups, cut down on header pollution -- still
need to fix header deps in Makefile.in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Texture3D.h

    r2798 r2831  
    1414 * ======================================================================
    1515 */
    16 #ifndef _TEXTURE_3D_H_
    17 #define _TEXTURE_3D_H_
     16#ifndef TEXTURE3D_H
     17#define TEXTURE3D_H
    1818
    1919#include <GL/glew.h>
    20 #include "config.h"
    2120
    22 class Texture3D{
    23        
     21class Texture3D
     22{
     23public:
     24    Texture3D();
    2425
    25 public:
    26         int width;
    27         int height;
    28         int depth;
     26    Texture3D(int width, int height, int depth,
     27              GLuint type = GL_FLOAT,
     28              GLuint interp = GL_LINEAR,
     29              int numComponents = 4,
     30              void *data = NULL);
    2931
    30         double aspect_ratio_width;
    31         double aspect_ratio_height;
    32         double aspect_ratio_depth;
     32    ~Texture3D();
    3333
    34         GLuint type;
    35         GLuint interp_type;
    36         int n_components;
    37         bool gl_resource_allocated;
     34    GLuint initialize(void *data);
    3835
    39         GLuint id;
    40         GLuint tex_unit;
     36    void update(void *data);
    4137
    42         Texture3D();
    43         Texture3D(int width, int height, int depth, GLuint type, GLuint interp, int n);
    44         ~Texture3D();
    45        
    46         void activate();
    47         void deactivate();
    48         GLuint initialize(float* data);
    49         static void check_max_size();
    50         static void check_max_unit();
     38    void activate();
    5139
    52     void update(float* data);
     40    void deactivate();
    5341
     42    static void check_max_size();
     43
     44    static void check_max_unit();
     45
     46    int width;
     47    int height;
     48    int depth;
     49
     50    double aspect_ratio_width;
     51    double aspect_ratio_height;
     52    double aspect_ratio_depth;
     53
     54    int n_components;
     55
     56    bool gl_resource_allocated;
     57    GLuint id;
     58    GLuint type;
     59    GLuint interp_type;
     60    //GLuint tex_unit;
    5461};
    5562
Note: See TracChangeset for help on using the changeset viewer.