# OpenGl 3D Room

I am learning openGl and know the basic concepts of 3D in it.
But I could not figure how to create a room of this type which I saw in many Projects.
The walls converge in the end with ceiling and floor.

How can we write this in openGl?

[ATTACH=CONFIG]1025[/ATTACH]

[QUOTE=Torrtuga;1266040]I am learning openGl and know the basic concepts of 3D in it.
But I could not figure how to create a room of this type which I saw in many Projects.
The walls converge in the end with ceiling and floor.

How can we write this in openGl?
[ATTACH=CONFIG]1765[/ATTACH][/QUOTE]
glVertex3f(x1,y1,z1,h);

glEnd();
to draw 6 or 5 plane to construct the room.
you can also use in way of index.

Do we have to make a cube and change the camera position?

Cube is a solid object, but room is a space feature. thus, need not to produce a cube.
To move or not the camera position denpends on which you will watch.

Then how can we create a 3D room in openGL?

This site is useless. Of no help ever.

… is a perfectly valid answer.

What are you having difficulties with?
Drawing the planes and positioning them?

Just a pointer if that helps. The room is just a cube with it’s normals inverted facing towards the inside.
If you get that far you just place the camera on the one side so you are viewing the inside of the cube.
The rest in the photo you provided is done by lighting, it seems they are using some advanced rendering like ray tracing

here is a link to get started with a cube
http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_05

I initially missed his other post where he attempted exactly what you described: