Question

What is the "easiest" solution to code a Rubik's Cube with the following features in Opengl:

  • "Camera" moves to let user see the cube from any point of view
  • Smooth display of cube moves in response to user clicks when playing

I started with a solution drawing the cube "Face by Face" but I am not sure it's a good solution (I am facing many problems ...)

May be a solution "unit cube" by unit cube (27 cubes has to be drawn) is easier to implement ?

Was it helpful?

Solution

You will have to draw 27 cubes because almost every cube belongs to several faces, so you want the faces to rotate...

What's the problem with this ? Are you worried about performance because you're on a mobile target ? 12x27 triangles is not a problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top