Draw a cube and rotate it: a part of the cube disappears


Justin Blanton
HOME » Programming Languages

In this code I try to draw a cube.I try to draw all faces vertices anticlockwise.
The problem is that if I don't rotate the cube only the red face is drawn, if instead I rotate it of 5 degrees, I just see a part of the cube.


#import <OpenGL/OpenGL.h>
#import <GLUT/GLUT.h>
int width=500, height=500, depth=500;
void init()
{
glEnable(GL_DEPTH_TEST);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(200, 200,-200, 200, 200, 0, 0, 1, 0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0,width,0,height);
gluPerspect

Related to : Draw a cube and rotate it: a part of the cube disappears
Draw a cube and rotate it: a part of the cube disappears
by Justin Blanton in Programming Languages

In this code I try to draw a cube.I try to draw all faces vertices anticlockwise.
The problem is that if I don't rotate the cube only the red face is drawn, if instead I rotate it of 5 degrees, I just see a part of the cube.


#import <OpenGL/OpenGL.h>
#import <GLU
[ubuntu] Compiz Cube - Left & Right, 3rd button cube rotate.
by Javed in Programming Languages
Im pretty sure this is a simple fix but I cannot figure it out.
I once had my left & right mouse buttons binded so they would initiate a cube rotate, and even had my 3rd button (scroll wheel click) to do the same at one point.
After 10.10 update I cannot do this any more. Does any one
[ubuntu] Rotate Cube / Desktop cube
by turret in Programming Languages
Dear
i just installed compiz config settings manager, i enabled Desktop cube and rotate cube but when i tried to test it "Ctrl Alt down" dosen't work.
could you please help me to solve this problem
thanks and best regard
[ubuntu] Problem with compiz rotate cube and draw fire
by Dan Ingraham in Programming Languages
Hi all
First off, I just want to say I am new to Ubuntu and Linux (have been using is for 3 weeks now) and I love it.
The problem I am having is in order to use rotate cube and draw fire, i MUST be on top of a window from an app in order for it to work. When i use the key command to rotat
Compiz Cube, can't rotate cube.
by tanknique in Programming Languages
Hi, I use the hotkey ctrl+alt+left click in Blender to zoom object...
So I didn't want Compiz to use the same key to move around the cube.
I changed a setting in window move, and either the old or the new key works.
New is alt+1 but it does nothing, same with ctrl+alt+left click.
TAGS: Compiz Cube rotate cube
Enabled desktop cube and rotate cube and lost desktop functionality
by Gunbuster in Programming Languages
I feel like a grade A noob but here it goes... :popcorn:
I went into the Compiz settings panel and I wanted to enable the 3d rotating cube. I enabled both functions which meant I had to disable two things, I am pretty sure one was the sidebar program that holds icons. I rebooted and now all I c
[ubuntu] rotate screen or window (not compiz rotate cube)
by Tim Tyrrell in Programming Languages
My wife takes a lot of movies in portrait format, which means a lot of fiddling with VLC to play back them the right way round.
Given that compiz.real does nice zooming (windows key + mousewheel), I wonder if there's some magic key combination to rotate the whole screen (or maybe a window).
TAGS: ubuntu rotate screen window compiz rotate
Rotate Cube by button
by Mandaris in Programming Languages
Hi,
How to make a rotating cube that rotate by button. Give me some idea on how to do this?
Thank you in advance...
What is the best way to rotate cube in Opengl
by micaleel in Programming Languages

I have a Rubik's cube displayed using OpenGl in a Java Eclipse application and I want to "rotate" this cube in response to mouse events.


I started with a "naive" (isn't it ?) solution as described here: OpenGL - moving camera with mouse. With such solution in addition to the problem d


3D cube rotate effect
by André Rocheleau in Programming Languages
anyone have any idea how to achieve an effect like this?
http://wonder-wall.com/#project/en/187
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .