Ask Experts Questions for FREE Help !
Ask
    albear's Avatar
    albear Posts: 1,594, Reputation: 222
    Ultra Member
     
    #1

    Feb 28, 2009, 09:52 AM
    cant see spheres anymore
    I've had some help modifying my original code and now when I run the program the spheres won't show, they are supposed to be moving around the screen

    I thinkit cas something to do with 'ctemp'

    float ctemp[4][3]={{1.0f,0.0f,0.0f},
    {0.0f,1.0f,0.0f},
    {0.0f,0.0f,1.0f},
    {1.0f,0.0f,1.0f}};

    for(int I=0;i<nSprites;i++){
    mySprite[i].setx(startarray[i][0]);
    mySprite[i].sety( startarray[i][1] );
    mySprite[i].setz(startarray[i][2] );

    mySprite[i].setvx(startarray[i][3] );
    mySprite[i].setvy(startarray[i][4] );
    mySprite[i].setvz(startarray[i][5] );

    mySprite[i].setr(ctemp[i][0]);
    mySprite[i].setg(ctemp[i][1]);
    mySprite[i].setb(ctemp[i][2]);

    mySprite[i].seta(0.1+(0.1*(float)i));

    }

    }

    which is how I'm trying to give the spheres a different colour,
    be fore it was modified I allocated the colour using 'glColour3f' but now I don't have any reference to it, or any idea how to add it in so that it will work with this?
    any help would be greatly appreciated, thanks
    if youned or want to know anything else that you think you would need to help then just ask
    oh this is in C++ (but I could only select ask a question in C )

Check out some similar questions!

I'm not sure what to think or do anymore [ 3 Answers ]

I've been with the same guy for a year and a half now, and he is a great guy, he treats me really well, but lately he's been bringing stuff to my attention that I didn't even realize I was doing Back when we first started dating I was going through a rough stage, I partied way too much and had a...

How not to be shy anymore [ 1 Answers ]

How not to become shy anymore and turned red. I need some tips please

Don't know anymore. [ 10 Answers ]

Im confused.. and don't know what to do or what to think... Ive been with this guy now for a while... I love him.. he means the world to me... we have had a rocky relationship.. broke up a few times and then got back together... It's a rocky relationship anyway because he has 3 children...


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search