[ create a new paste ] login | about

Link: http://codepad.org/ZNmdRImP    [ raw code | output | fork ]

C, pasted on Jul 17:
import processing.opengl.*;
import com.sun.opengl.util.*;
import com.sun.opengl.util.texture.*;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import java.awt.image.BufferedImage;

GL gl;
PImage img;
Texture texture;
GLUT glut;

void setup(){
size(400, 300, OPENGL);

img = loadImage("1.jpg");
texture=TextureIO.newTexture((BufferedImage)img.getImage(),true);
texture.enable();
texture.bind();
ambientLight(128, 128, 128, 0, 0, 300);
gl = ((PGraphicsOpenGL)g).beginGL();
glut = new GLUT();
gl.glClearColor(0.0, 0.0, 0.0, 0.0);
}
void draw(){
background(0);
PGraphicsOpenGL pgl=(PGraphicsOpenGL)g;
gl=pgl.beginGL();
gl.glClear(GL.GL_COLOR_BUFFER_BIT |GL.GL_DEPTH_BUFFER_BIT );
gl.glTranslatef(width/2, height/2+50, -50);
gl.glPushMatrix();
gl.glRotatef(45f, 1.0f, 0.0f, 0.0f);
gl.glRotatef(frameCount*3, 0.0f, 1.0f, 0.0f);
gl.glTranslatef(100, 10, 0);
glut.glutSolidCylinder(50f, 180f, 16, 4);
gl.glPopMatrix();
pgl.endGL();
}


Output:
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'processing'
Line 2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'com'
Line 3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'com'
Line 4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'javax'
Line 5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'javax'
Line 6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'java'
Line 8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gl'
Line 9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'img'
Line 10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'texture'
Line 11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'glut'
In function 'setup':
Line 14: error: 'OPENGL' undeclared (first use in this function)
Line 14: error: (Each undeclared identifier is reported only once
Line 14: error: for each function it appears in.)
Line 16: error: 'img' undeclared (first use in this function)
Line 17: error: 'texture' undeclared (first use in this function)
Line 17: error: 'TextureIO' undeclared (first use in this function)
Line 17: error: 'BufferedImage' undeclared (first use in this function)
Line 17: error: expected ')' before 'img'
Line 21: error: 'gl' undeclared (first use in this function)
Line 21: error: 'PGraphicsOpenGL' undeclared (first use in this function)
Line 21: error: expected ')' before 'g'
Line 22: error: 'glut' undeclared (first use in this function)
Line 22: error: 'new' undeclared (first use in this function)
Line 22: error: expected ';' before 'GLUT'
In function 'draw':
Line 27: error: 'PGraphicsOpenGL' undeclared (first use in this function)
Line 27: error: expected ';' before 'pgl'
Line 28: error: 'gl' undeclared (first use in this function)
Line 28: error: 'pgl' undeclared (first use in this function)
Line 29: error: 'GL' undeclared (first use in this function)
Line 30: error: 'width' undeclared (first use in this function)
Line 30: error: 'height' undeclared (first use in this function)
Line 13: error: invalid suffix "f" on integer constant
Line 33: error: 'frameCount' undeclared (first use in this function)
Line 35: error: 'glut' undeclared (first use in this function)
Line 23: error: invalid suffix "f" on integer constant
Line 28: error: invalid suffix "f" on integer constant


Create a new paste based on this one


Comments: