Esempio n. 1
0
int main()
{
    bool Running = true;
    int STATE = 0;
    Window App;
    App.CreateWindow(600,480,"Linux",false);

    switch (STATE) {
    case 0:
        STATE = UpdateMenu(App);
        break;
    default:
        break;
    }
    return 0;
}
Esempio n. 2
0
void FinalGame::init()
{

    Window win;
    win.CreateWindow(1360,748,"Trabalho Final",false);
	glEnable(GL_DEPTH_TEST);
//    glEnable(GL_LINE_SMOOTH);
//    glEnable(GL_CULL_FACE);
//    glCullFace(GL_BACK);
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    float altura = 2.0f;



//    etc.push_back(new Bezier(control_points,500));
//    etc.push_back(new CoordinateArrows(vec3(0,0,0)));

//    meshes.push_back(new Box(vec3(1.0,1.0,1.0),vec3(0,0.5,0.5)));r
//    meshes.push_back(new Square(glm::vec2(1.0,1.0),vec3(0.5,0.5,0),vec3(0,0,-2)));
//    meshes.push_back(new Quarto);

//    etc.push_back(new Grid(vec3(0,0,0),vec2(TAM_LADRILHO,TAM_LADRILHO),27,
//                                    vec3(1.f,1.f,1.f)));


//    PAREDES
    etc.push_back(new Box(vec3(10.0f,altura,0.01f),vec4(0.0f,0.3f,1,1),vec3(0,altura/2,5)));
    etc.push_back(new Box(vec3(10.0f,altura,0.01f),vec4(0.0f,0.3f,1,1),vec3(0,altura/2,-5)));

    etc.push_back(new Box(vec3(0.01f,altura,10.0f),vec4(0.0f,0.3f,1,1),vec3(5,altura/2,0)));
    etc.push_back(new Box(vec3(0.01f,altura,10.0f),vec4(0.0f,0.3f,1,1),vec3(-5,altura/2,0)));

    etc.push_back(new Box(vec3(10.0f,0.01f,10.0f),vec4(0.0f,0.3f,1,1),vec3(0,altura,0)));
    etc.push_back(new Box(vec3(10.0f,0.01f,10.0f),vec4(1.0f,1.f,1.0f,1.0f)));

    //COLOCAR OBJETOS

    meshes.push_back(new Box(vec3(1.0f,1.0f,1.0f),vec4(1.0f,0,0,1),vec3(-1,0.5f,-2.0f)));
    meshes.push_back(new Box(vec3(1.0f,1.0f,1.0f),vec4(0.4f,0.5f,0.0f,1.0f),vec3(-2,0.5,1.0)));
    texturizados.push_back(new TexBox(vec3(1.0f,1.0f,1.0f),vec4(0.0f,0.3f,0,1),vec3(2,0.5,1.0)));



    etc.push_back(new Light(glm::vec3(0,altura ,0.0f),vec3(2.0f,0.5f,1.0f)));

    meshes.push_back(new Box(vec3(1.0),vec4(1.0,1.0,0.0,0.5f),vec3(-1,0.5f,0)));
    meshes.push_back(new Box(vec3(1.0),vec4(0.5,0.5,1.0,0.5f),vec3(-1,0.5f,1)));


    // A CAMERA TEM DE IR POR ÚLTIMO, POIS ELA USA O SHADER JÁ SETADO
    cam = new Camera(vec3(0,0.5,3.0f),vec3(0,0.5,0),vec3(0,1,0),70.0f);
    selectedCam = cam;

    multicams[0] = new Camera(vec3(0,0.5,3.0f),vec3(0,0.5,0),vec3(0,1,0),70.0f);
    multicams[1] = new Camera(vec3(0,0.5,3.0f),vec3(0,0.5,0),vec3(0,1,0),70.0f);
    multicams[2] = new Camera(vec3(0,0.5,3.0f),vec3(0,0.5,0),vec3(0,1,0),70.0f);
    multicams[3] = new Camera(vec3(0,0.5,3.0f),vec3(0,0.5,0),vec3(0,1,0),70.0f);



    camNum = 0;

    fb = new FrameBuffer(win.getWidth(),win.getHeight());

}