Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] JOGL: need help with setting color

Started by christo7 Feb 15, 2007 at 8:34 AM 0 replies 550+ views
Original Post
christo7
christo7
Hi, I just started to work with Java Jogl because I am extending an existing program that uses Jogl. I am really fascinated. I am trying to add a sphere to the 3d scene that is generated by the program. I see the sphere but I can not specify the color. However, it is sometimes red or green but not blue. I added the following lines at the end of the display(GLAutoDrawable drawable)-method: gl.glColor3f(0f,0f,1f); // not working final GLUquadric qobj = glu.gluNewQuadric(); glu.gluQuadricDrawstyle(qobj, GLU.GLU_POINT); glu.gluSphere(qobj,2, 17,17); glu.gluDeleteQuadric(qobj); Why is it not drawn in blue? Many thanks Christoph

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.