   Rotating around 45 minimizes the result
  Hello everyone!I am quite new to OpenGL and I hope that someone can help me with my problem:I have 3 lines that represent my coordinate system: a red one for the x-axis, a green one for the y-axis and a blue one for the z-axis.When I try to rotate the x, the y or the z around 90°, everything wents right, but when I try to rotate them around 45°, the rotated lines nearly disappear. I do no really understand why this happens, but I hope that someone of you might be able to find my mistakes.glTranslatef( (float)(SCREEN_WIDTH/2), (float)(SCREEN_HEIGHT/2), 0 );glRotatef( 45.0f, 1.0f, 0.0f, 0.0f );glLineWidth( 1.0 );glBegin( GL_LINES );glColor3f( 1.0, 0.0, 0.0 );glVertex3f( -50, 0, 0 );glVertex3f( 50, 0, 0 );glColor3f( 0.0, 1.0, 0.0 );glVertex3f( 0, -50, 0 );glVertex3f( 0, 50, 0 );glColor3f( 0.0, 0.0, 1.0 );glVertex3f( 0, 0, -50 );glVertex3f( 0, 0, 50 );glEnd();glLoadIdentity();Screenshots:no rotation:90° rotation around X axis: 45° rotation around X axis: Thanks in advance![Edited by - muZe on January 22, 2008 11:42:01 AM]
  I don't know OpenGL details, so can't tell you where to look to fix it, but it looks like your green and blue axes are just on top of each other and subtracting to produce black.  Try rotating by just 30 degrees and I'd think you'd see part of one of the axes at the top and the bottom with black in between.  Also change your background to white (or even better a rarely used color) so you can distinguish between when you are drawing something black as opposed to not drawing anything.There's probably some OpenGL option that's making the line colors mix, but I don't know what it would be called - something about transparency maybe?;  try color based additive:glEnable(GL_BLEND);glBlendFunc(GL_SRC_COLOR, GL_ONE);prior to drawing   ;  I looked through my code again and I recognized that I did a very stupid mistake:copying source code, modifing it and not knowing what the code really means.The z-Axis of the world-view was restricted to -1 till 1: glOrtho( 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1, 1 );I changed it to the length of my z-line and now it works ;)glOrtho( 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -50, 50 );Anyway: Thanks for the replies!! I really appreciate that you took some time and tried to help me.bw,Steffi   