Posted by
Xerxes Rånby on
Aug 24, 2015; 7:31pm
URL: https://forum.jogamp.org/JOGL-on-Ubuntu-15-04-tp4035124p4035128.html
The bug is in your code
the line
gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
do not actually clear anything, it only specify which color to clear with
if you want to clear you need to call
gl.glClear(GL.GL_COLOR_BUFFER_BIT);
https://www.khronos.org/opengles/sdk/1.1/docs/man/glClearColor.xmlhttps://www.khronos.org/opengles/sdk/1.1/docs/man/glClear.xml2015-08-24 21:06 GMT+02:00 Felipe S. Fernandes [via jogamp] <
ml-node+s762907n4035126h69@n3.nabble.com>:
> I ran the code on my job finely, and took it to my home, just changed
> classes now because it requires different libraries version.
>
> Just showing this part because there are other classes, but that's same
> thing, just drawing the Vertex, but on a Loop from lists. I ran other
> examples and this happens, sadly
>
> Code:
>
> @Override
> public void display(GLAutoDrawable drawable) {
>
> GL2 gl = drawable.getGL().getGL2();
>
> gl.glColor3f(1, 0, 0);
> gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
>
> for(int a = 0; a < objects.size(); a++)
> objects.get(a).render(drawable);
>
> canvas.repaint();
> }
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
http://forum.jogamp.org/JOGL-on-Ubuntu-15-04-tp4035124p4035126.html> To start a new topic under jogl, email
> ml-node+s762907n782158h61@n3.nabble.com
> To unsubscribe from jogamp, click here
> <
http://forum.jogamp.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=762907&code=eGVyeGVzQGd1ZGlubmEuY29tfDc2MjkwN3wtNTE5NjUwMzEw>
> .
> NAML
> <
http://forum.jogamp.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>