Ignore:
Timestamp:
Mar 12, 2008, 3:48:06 PM (17 years ago)
Author:
gah
Message:

remove warnings from compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/nanovis/PointSetRenderer.cpp

    r915 r953  
     1
    12#include "Nv.h"
    23#include <GL/gl.h>
     
    1718    _shader = new PointShader();
    1819    R2string path = R2FilePath::getInstance()->getPath("particle2.bmp");
    19     if (path.getLength() == 0)
    20     {
     20    if (path.getLength() == 0) {
    2121        printf("ERROR : pointset file not found - %s\n", (const char*) path);
    2222        fflush(stdout);
     
    2828
    2929    unsigned char* bytes = (unsigned char*) image->getImageBuffer();
    30     if (bytes)
    31     {
    32         for (int y = 0; y < image->getHeight(); ++y)
    33            for (int x = 0; x < image->getWidth(); ++x, bytes +=4)
    34            {
     30    if (bytes) {
     31        for (unsigned int y = 0; y < image->getHeight(); ++y) {
     32            for (unsigned int x = 0; x < image->getWidth(); ++x, bytes +=4) {
    3533                bytes[3] =  (bytes[0] == 0)? 0 : 255;
    36            }
     34            }
     35        }
    3736    }
    3837
    39     if (image)
    40     {
    41         _pointTexture = new Texture2D(image->getWidth(), image->getHeight(), GL_UNSIGNED_BYTE, GL_LINEAR,   
    42                                 4, (float*) image->getImageBuffer());
    43     }
    44     else
    45     {
     38    if (image) {
     39        _pointTexture = new Texture2D(image->getWidth(), image->getHeight(),
     40                                      GL_UNSIGNED_BYTE, GL_LINEAR,   
     41                                      4, (float*) image->getImageBuffer());
     42    } else {
    4643        printf("fail to load image [%s]\n", "particles2.bmp");
    4744    }
    4845
    4946    delete loader;
    50 
    5147    _bucketSort = new PCA::BucketSort(1024);
    5248}
Note: See TracChangeset for help on using the changeset viewer.