Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C (https://www.askmehelpdesk.com/forumdisplay.php?f=438)
-   -   Can't see spheres anymore (https://www.askmehelpdesk.com/showthread.php?t=323128)

  • Feb 28, 2009, 09:52 AM
    albear
    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 )

  • All times are GMT -7. The time now is 07:06 AM.