"OpenGL error 1280...", tried to fix it with newest graphics card drivers, the problem is still here.
in
Integration and Hardware
•
8 months ago
So, I really don't know what to do anymore.
I have the latest Processing version (2.0b7) and I tried to run some 3D code. That code runs perfectly on my brother's laptop (which is in fact older than mine), but on my computer I get the "OpenGL error 1280 at bot beginDraw(): invalid enumerant" error.
Although I get the error, the sketch runs, but it's very slow and the smooth() function (that is run by default in this Processing version) is just not working (and this is very important to me), my sketch is obviously not antialiased when compared to the sketch on my brother's computer.
I really don't know how to fix this, I downloaded the latest drivers for my Nvidia GeForce Gt 425M card, but the problem won't go away.
Here's the code I've been trying to run. Just to mention it one more time, it's NOT about the code because this same code runs perfectly on my brother's laptop, it runs at normal speed with the smoothing filter working.
I have the latest Processing version (2.0b7) and I tried to run some 3D code. That code runs perfectly on my brother's laptop (which is in fact older than mine), but on my computer I get the "OpenGL error 1280 at bot beginDraw(): invalid enumerant" error.
Although I get the error, the sketch runs, but it's very slow and the smooth() function (that is run by default in this Processing version) is just not working (and this is very important to me), my sketch is obviously not antialiased when compared to the sketch on my brother's computer.
I really don't know how to fix this, I downloaded the latest drivers for my Nvidia GeForce Gt 425M card, but the problem won't go away.
Here's the code I've been trying to run. Just to mention it one more time, it's NOT about the code because this same code runs perfectly on my brother's laptop, it runs at normal speed with the smoothing filter working.
- int maxPoints = 8000;
- PVector[] points = new PVector[maxPoints];
- float rotX, rotY = 0.0;
- //--------------------------------------------------------
- void setup()
- {
- size(512, 512, P3D);
- smooth();
- fill(255);
- strokeWeight(2.0);
- createSpherePoints();
- }
- //--------------------------------------------------------
- void createSpherePoints()
- {
- for (int ni=0; ni<maxPoints; ni++)
- points[ni] = randomSpherePoint(210);
- }
- //--------------------------------------------------------
- void draw()
- {
- background(222);
- translate(width*0.5, height*0.5);
- rotateX (rotX);
- rotateY (rotY);
- for (int ni=0; ni<maxPoints; ni++)
- point (points[ni].x, points[ni].y, points[ni].z);
- if (mousePressed)
- {
- rotY += (pmouseX - mouseX) * -0.002;
- rotX += (pmouseY - mouseY) * +0.002;
- }
- rotY += 0.002;
- //println (round(frameRate));
- }
- //--------------------------------------------------------
- // return random sphere point using method of Cook/Neumann
- //--------------------------------------------------------
- PVector randomSpherePoint(float radius)
- {
- float a=0, b=0, c=0, d=0, k=99;
- while (k >= 1.0)
- {
- a = random (-1.0, 1.0);
- b = random (-1.0, 1.0);
- c = random (-1.0, 1.0);
- d = random (-1.0, 1.0);
- k = a*a +b*b +c*c +d*d;
- //print('.');
- }
- //println ("s");
- k = k/radius;
- return new PVector
- ( 2*(b*d + a*c) / k
- , 2*(c*d - a*b) / k
- , (a*a + d*d - b*b - c*c) / k);
- }
- //--------------------------------------------------------
- void keyPressed()
- {
- if (key == 's') save("RandomSpherePoints.png");
- if (key == ' ') createSpherePoints();
- }
(I hope I posted this in the right subforum)
1